Class OpenCLExecutionContext
java.lang.Object
org.episteme.nativ.technical.backend.gpu.opencl.OpenCLExecutionContext
- All Implemented Interfaces:
AutoCloseable, ExecutionContext
Execution context for OpenCL operations.
- Since:
- 1.2
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Constructor Summary
ConstructorsConstructorDescriptionOpenCLExecutionContext(org.jocl.cl_context context, org.jocl.cl_command_queue commandQueue, org.jocl.cl_device_id device) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Releases resources associated with this context.<T> TExecutes an operation synchronously and returns the result.org.jocl.cl_command_queueorg.jocl.cl_contextorg.jocl.cl_device_idMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ExecutionContext
executeAsync
-
Constructor Details
-
OpenCLExecutionContext
public OpenCLExecutionContext(org.jocl.cl_context context, org.jocl.cl_command_queue commandQueue, org.jocl.cl_device_id device)
-
-
Method Details
-
getContext
public org.jocl.cl_context getContext() -
getCommandQueue
public org.jocl.cl_command_queue getCommandQueue() -
getDevice
public org.jocl.cl_device_id 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
-