2 Physics Effects Copyright(C) 2010 Sony Computer Entertainment Inc.
\r
5 Physics Effects is open software; you can redistribute it and/or
\r
6 modify it under the terms of the BSD License.
\r
8 Physics Effects is distributed in the hope that it will be useful,
\r
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
\r
11 See the BSD License for more details.
\r
13 A copy of the BSD License is distributed with
\r
14 Physics Effects under the filename: physics_effects_license.txt
\r
17 #include "../../../include/physics_effects/base_level/base/pfx_perf_counter.h"
\r
18 #include "../../../include/physics_effects/low_level/sort/pfx_parallel_sort.h"
\r
19 #include "../../../include/physics_effects/base_level/sort/pfx_sort.h"
\r
21 ///////////////////////////////////////////////////////////////////////////////
\r
25 namespace PhysicsEffects {
\r
27 PfxInt32 pfxParallelSort(
\r
28 PfxSortData16 *data,PfxUInt32 numData,
\r
29 void *workBuff,PfxUInt32 workBytes)
\r
31 if(!SCE_PFX_PTR_IS_ALIGNED16(workBuff)) return SCE_PFX_ERR_INVALID_ALIGN;
\r
32 if(SCE_PFX_AVAILABLE_BYTES_ALIGN16(workBuff,workBytes) < sizeof(PfxSortData16) * numData) return SCE_PFX_ERR_OUT_OF_BUFFER;
\r
34 SCE_PFX_PUSH_MARKER("pfxParallelSort");
\r
35 pfxSort(data,(PfxSortData16*)workBuff,numData);
\r
36 SCE_PFX_POP_MARKER();
\r
41 PfxInt32 pfxParallelSort(
\r
42 PfxSortData32 *data,PfxUInt32 numData,
\r
43 void *workBuff,PfxUInt32 workBytes)
\r
45 if(!SCE_PFX_PTR_IS_ALIGNED16(workBuff)) return SCE_PFX_ERR_INVALID_ALIGN;
\r
46 if(SCE_PFX_AVAILABLE_BYTES_ALIGN16(workBuff,workBytes) < sizeof(PfxSortData32) * numData) return SCE_PFX_ERR_OUT_OF_BUFFER;
\r
48 SCE_PFX_PUSH_MARKER("pfxParallelSort");
\r
49 pfxSort(data,(PfxSortData32*)workBuff,numData);
\r
50 SCE_PFX_POP_MARKER();
\r
55 } //namespace PhysicsEffects
\r