jcuda.runtime.JCuda.checkResult()方法的使用及代码示例

x33g5p2x  于2022-01-22 转载在 其他  
字(6.2k)|赞(0)|评价(0)|浏览(87)

本文整理了Java中jcuda.runtime.JCuda.checkResult()方法的一些代码示例,展示了JCuda.checkResult()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JCuda.checkResult()方法的具体详情如下:
包路径:jcuda.runtime.JCuda
类名称:JCuda
方法名:checkResult

JCuda.checkResult介绍

[英]If the given result is different to cudaError.cudaSuccess and exceptions have been enabled, this method will throw a CudaException with an error message that corresponds to the given result code. Otherwise, the given result is simply returned.
[中]如果给定的结果与cudaError不同。cudaSuccess和异常已启用,此方法将抛出一个CudaException,并显示与给定结果代码对应的错误消息。否则,只返回给定的结果。

代码示例

代码示例来源:origin: org.jcuda/jcuda

public static int cudaStreamCreateWithPriority(cudaStream_t pStream, int flags, int priority)
{
  return checkResult(cudaStreamCreateWithPriorityNative(pStream, flags, priority));
}
private static native int cudaStreamCreateWithPriorityNative(cudaStream_t pStream, int flags, int priority);

代码示例来源:origin: org.nd4j/jcuda

public static int cudaStreamCreateWithPriority(cudaStream_t pStream, int flags, int priority)
{
  return checkResult(cudaStreamCreateWithPriorityNative(pStream, flags, priority));
}
private static native int cudaStreamCreateWithPriorityNative(cudaStream_t pStream, int flags, int priority);

代码示例来源:origin: org.nd4j/jcuda

public static int cudaStreamGetPriority(cudaStream_t hStream, int priority[])
{
  return checkResult(cudaStreamGetPriorityNative(hStream, priority));
}
private static native int cudaStreamGetPriorityNative(cudaStream_t hStream, int priority[]);

代码示例来源:origin: org.nd4j/nd4j-jcublas-common

public static int cudaStreamCreateWithPriority(cudaStream_t pStream, int flags, int priority)
{
  return checkResult(cudaStreamCreateWithPriorityNative(pStream, flags, priority));
}
private static native int cudaStreamCreateWithPriorityNative(cudaStream_t pStream, int flags, int priority);

代码示例来源:origin: org.nd4j/nd4j-jcublas-common

public static int cudaStreamGetPriority(cudaStream_t hStream, int priority[])
{
  return checkResult(cudaStreamGetPriorityNative(hStream, priority));
}
private static native int cudaStreamGetPriorityNative(cudaStream_t hStream, int priority[]);

代码示例来源:origin: org.nd4j/jcuda-windows64

public static int cudaStreamGetPriority(cudaStream_t hStream, int priority[])
{
  return checkResult(cudaStreamGetPriorityNative(hStream, priority));
}
private static native int cudaStreamGetPriorityNative(cudaStream_t hStream, int priority[]);

代码示例来源:origin: org.jcuda/jcuda

public static int cudaStreamAttachMemAsync(cudaStream_t stream, Pointer devPtr, long length, int flags)
{
 return checkResult(cudaStreamAttachMemAsyncNative(stream, devPtr, length, flags));
}
private static native int cudaStreamAttachMemAsyncNative(cudaStream_t stream, Pointer devPtr, long length, int flags);

代码示例来源:origin: org.nd4j/jcuda-windows64

public static int cudaStreamCreateWithPriority(cudaStream_t pStream, int flags, int priority)
{
  return checkResult(cudaStreamCreateWithPriorityNative(pStream, flags, priority));
}
private static native int cudaStreamCreateWithPriorityNative(cudaStream_t pStream, int flags, int priority);

代码示例来源:origin: org.jcuda/jcuda

public static int cudaStreamGetPriority(cudaStream_t hStream, int priority[])
{
  return checkResult(cudaStreamGetPriorityNative(hStream, priority));
}
private static native int cudaStreamGetPriorityNative(cudaStream_t hStream, int priority[]);

代码示例来源:origin: org.jcuda/jcuda

public static int cudaStreamGetFlags(cudaStream_t hStream, int flags[])
{
  return checkResult(cudaStreamGetFlagsNative(hStream, flags));
}
private static native int cudaStreamGetFlagsNative(cudaStream_t hStream, int flags[]);

代码示例来源:origin: org.jcuda/jcuda

public static int cudaDeviceGetStreamPriorityRange(int leastPriority[], int greatestPriority[])
{
  return checkResult(cudaDeviceGetStreamPriorityRangeNative(leastPriority, greatestPriority));
}
private static native int cudaDeviceGetStreamPriorityRangeNative(int leastPriority[], int greatestPriority[]);

代码示例来源:origin: org.nd4j/jcuda

public static int cudaMallocManaged(Pointer devPtr, long size, int flags)
{
 return checkResult(cudaMallocManagedNative(devPtr, size, flags));
}
private static native int cudaMallocManagedNative(Pointer devPtr, long size, int flags);

代码示例来源:origin: org.nd4j/jcuda

public static int cudaDeviceGetStreamPriorityRange(int leastPriority[], int greatestPriority[])
{
  return checkResult(cudaDeviceGetStreamPriorityRangeNative(leastPriority, greatestPriority));
}
private static native int cudaDeviceGetStreamPriorityRangeNative(int leastPriority[], int greatestPriority[]);

代码示例来源:origin: org.nd4j/nd4j-jcublas-common

public static int cudaStreamGetFlags(cudaStream_t hStream, int flags[])
{
  return checkResult(cudaStreamGetFlagsNative(hStream, flags));
}
private static native int cudaStreamGetFlagsNative(cudaStream_t hStream, int flags[]);

代码示例来源:origin: org.nd4j/nd4j-jcublas-common

public static int cudaStreamAttachMemAsync(cudaStream_t stream, Pointer devPtr, long length, int flags)
{
 return checkResult(cudaStreamAttachMemAsyncNative(stream, devPtr, length, flags));
}    
private static native int cudaStreamAttachMemAsyncNative(cudaStream_t stream, Pointer devPtr, long length, int flags);

代码示例来源:origin: org.nd4j/jcuda-windows64

public static int cudaMallocManaged(Pointer devPtr, long size, int flags)
{
 return checkResult(cudaMallocManagedNative(devPtr, size, flags));
}
private static native int cudaMallocManagedNative(Pointer devPtr, long size, int flags);

代码示例来源:origin: org.nd4j/jcuda

public static int cudaStreamGetFlags(cudaStream_t hStream, int flags[])
{
  return checkResult(cudaStreamGetFlagsNative(hStream, flags));
}
private static native int cudaStreamGetFlagsNative(cudaStream_t hStream, int flags[]);

代码示例来源:origin: org.nd4j/nd4j-jcublas-common

public static int cudaDeviceGetStreamPriorityRange(int leastPriority[], int greatestPriority[])
{
  return checkResult(cudaDeviceGetStreamPriorityRangeNative(leastPriority, greatestPriority));
}
private static native int cudaDeviceGetStreamPriorityRangeNative(int leastPriority[], int greatestPriority[]);

代码示例来源:origin: org.nd4j/jcuda-windows64

public static int cudaStreamAttachMemAsync(cudaStream_t stream, Pointer devPtr, long length, int flags)
{
 return checkResult(cudaStreamAttachMemAsyncNative(stream, devPtr, length, flags));
}    
private static native int cudaStreamAttachMemAsyncNative(cudaStream_t stream, Pointer devPtr, long length, int flags);

代码示例来源:origin: org.nd4j/jcuda-windows64

public static int cudaDeviceGetStreamPriorityRange(int leastPriority[], int greatestPriority[])
{
  return checkResult(cudaDeviceGetStreamPriorityRangeNative(leastPriority, greatestPriority));
}
private static native int cudaDeviceGetStreamPriorityRangeNative(int leastPriority[], int greatestPriority[]);

相关文章

JCuda类方法