Пример #1
0
 public static int cuFuncGetAttribute(CUfunction_attribute attrib, CUfunction hfunc)
 {
     return(Wrap(() =>
     {
         try
         {
             int i;
             var error = nativeFuncGetAttribute(out i, attrib, hfunc);
             if (error != CUresult.CUDA_SUCCESS)
             {
                 throw new CudaException(error);
             }
             return i;
         }
         catch (CudaException)
         {
             throw;
         }
         catch (DllNotFoundException dnfe)
         {
             throw new CudaException(CudaError.NoDriver, dnfe);
         }
         catch (Exception e)
         {
             throw new CudaException(CudaError.Unknown, e);
         }
     }));
 }
Пример #2
0
 public static int cuFuncGetAttribute(CUfunction_attribute attrib, CUfunction hfunc)
 {
     return Wrap(() =>
     {
         try
         {
             int i;
             var error = nativeFuncGetAttribute(out i, attrib, hfunc);
             if (error != CUresult.CUDA_SUCCESS) throw new CudaException(error);
             return i;
         }
         catch (CudaException)
         {
             throw;
         }
         catch (DllNotFoundException dnfe)
         {
             throw new CudaException(CudaError.NoDriver, dnfe);
         }
         catch (Exception e)
         {
             throw new CudaException(CudaError.Unknown, e);
         }
     });
 }
Пример #3
0
 // http://developer.download.nvidia.com/compute/cuda/3_1/toolkit/docs/online/group__CUEXEC_g7bde0e4a4ce32ce7460348e01a91f45f.html
 private static extern CUresult nativeFuncGetAttribute(out int pi, CUfunction_attribute attrib, CUfunction hfunc);
Пример #4
0
 // http://developer.download.nvidia.com/compute/cuda/3_1/toolkit/docs/online/group__CUEXEC_g7bde0e4a4ce32ce7460348e01a91f45f.html
 private static extern CUresult nativeFuncGetAttribute(out int pi, CUfunction_attribute attrib, CUfunction hfunc);
Пример #5
0
 /// <summary> see CUDA doc; </summary>
 static public void FuncGetAttribute(out int value, CUfunction_attribute attrib, CUfunction hfunc)
 {
     testResult(my.cuFuncGetAttribute(out value, attrib, hfunc));
 }