hara.runtime.jocl.type
to-array
added in 3.0
(to-array obj)converts a value to an array
(str (type (to-array 10))) => “class [J”
unit-coerce
added in 4.1
(unit-coerce unit arg)coerces a scalar value to the kernel’s declared primitive unit.
Kernel scalars must be passed to clSetKernelArg with exactly the declared size — a Clojure long (8 bytes) for an :int parameter is rejected with CL_INVALID_KERNEL_ARGS by strict drivers (e.g. NVIDIA OpenCL 3.0 / CUDA 13).