From 22b7c9dfa80d0f7abca40f061865c2ab3c136a74 Mon Sep 17 00:00:00 2001 From: Oussama Date: Thu, 3 Jan 2019 14:26:51 +0100 Subject: Update Bullet to the latest commit 126b676 --- .../ParallelPrimitives/b3RadixSort32CL.h | 103 +++++++++------------ 1 file changed, 46 insertions(+), 57 deletions(-) (limited to 'thirdparty/bullet/Bullet3OpenCL/ParallelPrimitives/b3RadixSort32CL.h') diff --git a/thirdparty/bullet/Bullet3OpenCL/ParallelPrimitives/b3RadixSort32CL.h b/thirdparty/bullet/Bullet3OpenCL/ParallelPrimitives/b3RadixSort32CL.h index 975bd80e53..69caf182d7 100644 --- a/thirdparty/bullet/Bullet3OpenCL/ParallelPrimitives/b3RadixSort32CL.h +++ b/thirdparty/bullet/Bullet3OpenCL/ParallelPrimitives/b3RadixSort32CL.h @@ -6,90 +6,79 @@ struct b3SortData { - union - { + union { unsigned int m_key; unsigned int x; }; - union - { + union { unsigned int m_value; unsigned int y; - }; }; #include "b3BufferInfoCL.h" -class b3RadixSort32CL +class b3RadixSort32CL { + b3OpenCLArray* m_workBuffer1; + b3OpenCLArray* m_workBuffer2; - b3OpenCLArray* m_workBuffer1; - b3OpenCLArray* m_workBuffer2; - - b3OpenCLArray* m_workBuffer3; - b3OpenCLArray* m_workBuffer4; - - b3OpenCLArray* m_workBuffer3a; - b3OpenCLArray* m_workBuffer4a; + b3OpenCLArray* m_workBuffer3; + b3OpenCLArray* m_workBuffer4; - cl_command_queue m_commandQueue; + b3OpenCLArray* m_workBuffer3a; + b3OpenCLArray* m_workBuffer4a; - cl_kernel m_streamCountSortDataKernel; - cl_kernel m_streamCountKernel; + cl_command_queue m_commandQueue; - cl_kernel m_prefixScanKernel; - cl_kernel m_sortAndScatterSortDataKernel; - cl_kernel m_sortAndScatterKernel; + cl_kernel m_streamCountSortDataKernel; + cl_kernel m_streamCountKernel; + cl_kernel m_prefixScanKernel; + cl_kernel m_sortAndScatterSortDataKernel; + cl_kernel m_sortAndScatterKernel; - bool m_deviceCPU; + bool m_deviceCPU; - class b3PrefixScanCL* m_scan; - class b3FillCL* m_fill; + class b3PrefixScanCL* m_scan; + class b3FillCL* m_fill; public: struct b3ConstData - { - int m_n; - int m_nWGs; - int m_startBit; - int m_nBlocksPerWG; - }; + { + int m_n; + int m_nWGs; + int m_startBit; + int m_nBlocksPerWG; + }; enum - { - DATA_ALIGNMENT = 256, - WG_SIZE = 64, - BLOCK_SIZE = 256, - ELEMENTS_PER_WORK_ITEM = (BLOCK_SIZE/WG_SIZE), - BITS_PER_PASS = 4, - NUM_BUCKET=(1<& keysIn, b3OpenCLArray& keysOut, b3OpenCLArray& valuesIn, + b3OpenCLArray& valuesOut, int n, int sortBits = 32); - void execute(b3OpenCLArray& keysIn, b3OpenCLArray& keysOut, b3OpenCLArray& valuesIn, - b3OpenCLArray& valuesOut, int n, int sortBits = 32); - - ///keys only - void execute(b3OpenCLArray& keysInOut, int sortBits = 32 ); - - void execute(b3OpenCLArray& keyValuesInOut, int sortBits = 32 ); - void executeHost(b3OpenCLArray& keyValuesInOut, int sortBits = 32); - void executeHost(b3AlignedObjectArray& keyValuesInOut, int sortBits = 32); + ///keys only + void execute(b3OpenCLArray& keysInOut, int sortBits = 32); + void execute(b3OpenCLArray& keyValuesInOut, int sortBits = 32); + void executeHost(b3OpenCLArray& keyValuesInOut, int sortBits = 32); + void executeHost(b3AlignedObjectArray& keyValuesInOut, int sortBits = 32); }; -#endif //B3_RADIXSORT32_H - +#endif //B3_RADIXSORT32_H -- cgit v1.2.3