#ifndef BT_FILL_CL_H #define BT_FILL_CL_H #include "btOpenCLArray.h" #include "Bullet3Common/b3Scalar.h" #include "btInt2.h" #include "btInt4.h" class btFillCL { cl_command_queue m_commandQueue; cl_kernel m_fillKernelInt2; cl_kernel m_fillIntKernel; cl_kernel m_fillUnsignedIntKernel; cl_kernel m_fillFloatKernel; public: struct btConstData { union { btInt4 m_data; btUnsignedInt4 m_UnsignedData; }; int m_offset; int m_n; int m_padding[2]; }; protected: public: btFillCL(cl_context ctx, cl_device_id device, cl_command_queue queue); virtual ~btFillCL(); void execute(btOpenCLArray& src, const unsigned int value, int n, int offset = 0); void execute(btOpenCLArray& src, const int value, int n, int offset = 0); void execute(btOpenCLArray& src, const float value, int n, int offset = 0); void execute(btOpenCLArray& src, const btInt2& value, int n, int offset = 0); void executeHost(b3AlignedObjectArray &src, const btInt2 &value, int n, int offset); void executeHost(b3AlignedObjectArray &src, const int value, int n, int offset); // void execute(btOpenCLArray& src, const btInt4& value, int n, int offset = 0); }; #endif //BT_FILL_CL_H