Exemple #1
0
func CLSetEventCallback(event CL_event,
	command_exec_callback_type CL_int,
	pfn_notify CL_evt_notify,
	user_data unsafe.Pointer) CL_int {

	if pfn_notify != nil {
		evt_notify[event.cl_event] = pfn_notify

		return CL_int(C.CLSetEventCallback(event.cl_event,
			C.cl_int(command_exec_callback_type),
			user_data))
	} else {
		return CL_int(C.clSetEventCallback(event.cl_event,
			C.cl_int(command_exec_callback_type),
			nil,
			nil))
	}
}
Exemple #2
0
func (ev *Event) SetEventCallback(status CommandExecStatus, user_data unsafe.Pointer) error {
	return toError(C.CLSetEventCallback(ev.clEvent, (C.cl_int)(status), user_data))
}