Module Opencl_plugin_base.For_testing

TEST-ONLY hooks and counters. Production behaviour never depends on them; the library only increments the counters.

val host_ptr_on_any_device : bool Stdlib.ref

When true, alloc_host_ptr also accepts non-CPU devices, so the CL_MEM_USE_HOST_PTR synchronisation paths can be exercised on a GPU. Test-only: it breaks the production assumption "a host-pointer buffer implies a CPU device implies no launch deferral" (Execute.ml, defers_device).

val host_ptr_release_finishes : int Stdlib.Atomic.t

Number of host-pointer buffer releases that finished the device's queue first (see Memory.free). Set by the library; read by tests.

val device_states_created : int Stdlib.Atomic.t

Number of per-device states (context, default queue) created. Set by the library; read by tests.