Exemple #1
0
 public static CUevent cuEventCreate(CUevent_flags Flags)
 {
     return Wrap(() =>
     {
         try
         {
             CUevent hevent;
             var error = nativeEventCreate(out hevent, Flags);
             if (error != CUresult.CUDA_SUCCESS) throw new CudaException(error);
             return hevent;
         }
         catch (CudaException)
         {
             throw;
         }
         catch (DllNotFoundException dnfe)
         {
             throw new CudaException(CudaError.NoDriver, dnfe);
         }
         catch (Exception e)
         {
             throw new CudaException(CudaError.Unknown, e);
         }
     });
 }
Exemple #2
0
 public static CUevent cuEventCreate(CUevent_flags Flags)
 {
     return(Wrap(() =>
     {
         try
         {
             CUevent hevent;
             var error = nativeEventCreate(out hevent, Flags);
             if (error != CUresult.CUDA_SUCCESS)
             {
                 throw new CudaException(error);
             }
             return hevent;
         }
         catch (CudaException)
         {
             throw;
         }
         catch (DllNotFoundException dnfe)
         {
             throw new CudaException(CudaError.NoDriver, dnfe);
         }
         catch (Exception e)
         {
             throw new CudaException(CudaError.Unknown, e);
         }
     }));
 }
Exemple #3
0
 // http://developer.download.nvidia.com/compute/cuda/3_1/toolkit/docs/online/group__CUEVENT_g433317083f929b9298f8a88d57aa5017.html
 private static extern CUresult nativeEventCreate(out CUevent phEvent, CUevent_flags Flags);
Exemple #4
0
 // http://developer.download.nvidia.com/compute/cuda/3_1/toolkit/docs/online/group__CUEVENT_g433317083f929b9298f8a88d57aa5017.html
 private static extern CUresult nativeEventCreate(out CUevent phEvent, CUevent_flags Flags);