hara.runtime.jocl.type

buffer-type

added in 3.0

(buffer-type input)

outputs type information for buffers

to-array

added in 3.0

(to-array obj)

converts a value to an array

(str (type (to-array 10))) => “class [J”

type-args

added in 3.0

(type-args spec args)

returns and checks type information of inputs

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).

unit-type

added in 3.0

(unit-type input)

outputs type information for unit inputs