Class CUDAExecutionContext
java.lang.Object
org.episteme.nativ.technical.backend.gpu.cuda.CUDAExecutionContext
- All Implemented Interfaces:
AutoCloseable, ExecutionContext
Execution context for CUDA operations.
Manages Driver API context state.
- Since:
- 1.2
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.CUDAExecutionContext(jcuda.driver.CUcontext context, jcuda.driver.CUdevice device) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Releases resources associated with this context.<T> TExecutes an operation synchronously and returns the result.static CUDAExecutionContextfromNative(long contextHandle, int deviceOrdinal) Creates a context from raw native handles.jcuda.driver.CUcontextjcuda.driver.CUdeviceMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ExecutionContext
executeAsync
-
Constructor Details
-
CUDAExecutionContext
Deprecated.UseCUDAExecutionContext(CUcontext, CUdevice)for explicit context management. -
CUDAExecutionContext
public CUDAExecutionContext(jcuda.driver.CUcontext context, jcuda.driver.CUdevice device)
-
-
Method Details
-
getContext
public jcuda.driver.CUcontext getContext() -
getDevice
public jcuda.driver.CUdevice getDevice() -
execute
Description copied from interface:ExecutionContextExecutes an operation synchronously and returns the result.- Specified by:
executein interfaceExecutionContext- Type Parameters:
T- the result type- Parameters:
operation- the operation to execute- Returns:
- the operation result
-
close
public void close()Description copied from interface:ExecutionContextReleases resources associated with this context.This method is called automatically when used in try-with-resources.
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceExecutionContext
-
fromNative
Creates a context from raw native handles. Useful for Panama/FFM integration.
-
CUDAExecutionContext(CUcontext, CUdevice)for explicit context management.