Esempio n. 1
0
 public static int clSetMemObjectDestructorCallback(
     CLMem memobj, CLMemObjectDestructorCallback pfn_notify) {
   long function_pointer = CLCapabilities.clSetMemObjectDestructorCallback;
   BufferChecks.checkFunctionAddress(function_pointer);
   long user_data = CallbackUtil.createGlobalRef(pfn_notify);
   int __result = 0;
   try {
     __result =
         nclSetMemObjectDestructorCallback(
             memobj.getPointer(), pfn_notify.getPointer(), user_data, function_pointer);
     return __result;
   } finally {
     CallbackUtil.checkCallback(__result, user_data);
   }
 }
Esempio n. 2
0
 public static int clSetEventCallback(
     CLEvent event, int command_exec_callback_type, CLEventCallback pfn_notify) {
   long function_pointer = CLCapabilities.clSetEventCallback;
   BufferChecks.checkFunctionAddress(function_pointer);
   long user_data = CallbackUtil.createGlobalRef(pfn_notify);
   pfn_notify.setRegistry(event.getParentRegistry());
   int __result = 0;
   try {
     __result =
         nclSetEventCallback(
             event.getPointer(),
             command_exec_callback_type,
             pfn_notify.getPointer(),
             user_data,
             function_pointer);
     return __result;
   } finally {
     CallbackUtil.checkCallback(__result, user_data);
   }
 }