From 7d79555f504159f2bfd5302d2b25b0a88ee4abaa Mon Sep 17 00:00:00 2001 From: Erwin Coumans Date: Wed, 19 Jun 2013 23:18:17 -0700 Subject: [PATCH] only disable fastscan in radix sort for __APPLE__, this should improve Linux performance (previously it went through the slower path under Linux) --- .../ParallelPrimitives/b3RadixSort32CL.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/Bullet3OpenCL/ParallelPrimitives/b3RadixSort32CL.cpp b/src/Bullet3OpenCL/ParallelPrimitives/b3RadixSort32CL.cpp index a72e7a183..4f722edc0 100644 --- a/src/Bullet3OpenCL/ParallelPrimitives/b3RadixSort32CL.cpp +++ b/src/Bullet3OpenCL/ParallelPrimitives/b3RadixSort32CL.cpp @@ -319,10 +319,10 @@ void b3RadixSort32CL::execute(b3OpenCLArray& keyValuesInOut, int sor //fast prefix scan is not working properly on Mac OSX yet -#ifdef _WIN32 - bool fastScan=!m_deviceCPU;//only use fast scan on GPU -#else +#ifdef __APPLE__ bool fastScan=false; +#else + bool fastScan=!m_deviceCPU;//only use fast scan on GPU #endif if (fastScan) @@ -653,11 +653,10 @@ void b3RadixSort32CL::execute(b3OpenCLArray& keysInOut, int sortBi //fast prefix scan is not working properly on Mac OSX yet -#ifdef _WIN32 - bool fastScan=!m_deviceCPU; - +#ifdef __APPLE__ + bool fastScan=false; #else - bool fastScan=false; + bool fastScan=!m_deviceCPU; #endif if (fastScan)