/** * Returns a String representation of this object. * * @return A String representation of this object. */ @Override public String toString() { return "cudaStream_t["+ "nativePointer="+getNativePointer()+"]"; }
/** * Cuda stream create cuda resource. * * @return the cuda resource */ public static CudaResource<cudaStream_t> cudaStreamCreate() { long startTime = System.nanoTime(); @Nonnull cudaStream_t stream = new cudaStream_t(); int result = JCuda.cudaStreamCreate(stream); cudaStreamCreate_execution.accept((System.nanoTime() - startTime) / 1e9); log("cudaStreamCreate", result, new Object[]{stream}); handle(result); return new CudaStream(stream); }
/** * Cuda stream create cuda resource. * * @return the cuda resource */ public static CudaResource<cudaStream_t> cudaStreamCreate() { long startTime = System.nanoTime(); @Nonnull cudaStream_t stream = new cudaStream_t(); int result = JCuda.cudaStreamCreate(stream); cudaStreamCreate_execution.accept((System.nanoTime() - startTime) / 1e9); log("cudaStreamCreate", result, new Object[]{stream}); handle(result); return new CudaStream(stream); }
/** * Returns a String representation of this object. * * @return A String representation of this object. */ @Override public String toString() { return "cudaStream_t["+ "nativePointer="+getNativePointer()+"]"; }
/** * Get the stream for the current thread * based on the device for the thread * @return the stream for the device and * thread */ public synchronized cudaStream_t getCudaStream() { Thread currentThread = Thread.currentThread(); CUcontext ctx = getContext(getDeviceForThread()); cudaStream_t stream = cudaStreams.get(ctx, currentThread.getName()); if(stream == null) { stream = new cudaStream_t(); checkResult(JCudaDriver.cuCtxSetCurrent(ctx)); JCuda.cudaStreamCreate(stream); checkResult(JCuda.cudaStreamCreate(stream)); cudaStreams.put(ctx, currentThread.getName(), stream); } return stream; }
/** * Returns a String representation of this object. * * @return A String representation of this object. */ @Override public String toString() { return "cudaStream_t["+ "nativePointer="+getNativePointer()+"]"; }
/** * Returns a String representation of this object. * * @return A String representation of this object. */ @Override public String toString() { return "cudaStream_t["+ "nativePointer="+getNativePointer()+"]"; }