Docs / nablatensor-engine-opencl / com.nablatensor.backend.opencl
final class
OpenClCompute
Public facade over the package-private OpenClRuntime, for code outside this module that needs a raw OpenCL compute surface: build-from-source compilation, device allocation, host<->device double transfers and a 1-D kernel launch.
The AAD OpenCL replay engine (com.nablatensor.engine.opencl) is the intended caller; it mirrors com.nablatensor.backend.rocm.HipCompute.
Methods
Whether a usable OpenCL device is present. Never throws.
Whether the selected device can compute in double. The replay kernel keeps its accumulators and the host-visible partials in double even when the working precision is fp32, so a device without cl_khr_fp64 cannot run it and the engine must decline.
Largest work-group the device accepts; the replay kernel needs at least 256.
"<platform> · <device>" for diagnostics, or a placeholder.
Builds OpenCL C source and returns a launchable kernel handle for kernelName. Callers should cache the handle by source; this does not.
As String) but with explicit clBuildProgram flags.
Blocking host-to-device copy into an already-allocated buffer.
Launches a 1-D range of groups work-groups of local work-items. Arguments are Long (device buffer handles / 64-bit scalars), Integer or Float, matched positionally.