A user CUDA stream or OpenCL command queue, selected by which member is populated.
More...
A user CUDA stream or OpenCL command queue, selected by which member is populated.
Used by SDK acquisition methods (e.g. Frame2D::imageDeviceArray, PointCloud::devicePointsXYZ) so that callers pass either a CUDAStreamPtr or an OpenCLCommandQueuePtr through a single method signature. Both wrapper types convert implicitly to StreamOrQueue. The active backend (set at SDK build time) picks the corresponding member; the other must be left null or the call throws:
- CUDA build: reads stream.stream as the destination CUDA stream (nullptr is allowed and means CUDA's default/legacy stream); commandQueue.commandQueue must be null.
- OpenCL build: reads commandQueue.commandQueue as the destination OpenCL queue (must be non-null); stream.stream must be null. A default-constructed StreamOrQueue (both members null) is therefore valid only against a CUDA build, where it means "sync to the CUDA default stream".