#ifndef _LIVOX_GEN1_OPENCL_COLLATING_AND_MESHING_ENGINE_H #define _LIVOX_GEN1_OPENCL_COLLATING_AND_MESHING_ENGINE_H #include #include #include #define CL_TARGET_OPENCL_VERSION 300 #include namespace smo { namespace stim_buff { class PcloudStimulusBuffer; class OpenClCollatingAndMeshingEngine { public: explicit OpenClCollatingAndMeshingEngine(PcloudStimulusBuffer& parent); ~OpenClCollatingAndMeshingEngine(); // Non-copyable, movable OpenClCollatingAndMeshingEngine( const OpenClCollatingAndMeshingEngine&) = delete; OpenClCollatingAndMeshingEngine& operator=( const OpenClCollatingAndMeshingEngine&) = delete; OpenClCollatingAndMeshingEngine( OpenClCollatingAndMeshingEngine&&) = default; OpenClCollatingAndMeshingEngine& operator=( OpenClCollatingAndMeshingEngine&&) = default; bool setup(); void finalize(); private: PcloudStimulusBuffer& parent; // OpenCL infrastructure cl_platform_id platform; cl_device_id device; cl_context context; cl_command_queue commandQueue; cl_program program; cl_kernel kernel; bool isSetup; // OpenCL buffers cl_mem assemblyBuffer; cl_mem xyzBuffer; cl_mem intensityBuffer; }; } // namespace stim_buff } // namespace smo #endif // _LIVOX_GEN1_OPENCL_COLLATING_AND_MESHING_ENGINE_H