added non-shared memory
This commit is contained in:
@@ -93,7 +93,7 @@ void sortPass(
|
|||||||
const int mask = (1 << NUMBITS) - 1;
|
const int mask = (1 << NUMBITS) - 1;
|
||||||
|
|
||||||
/* copy digit offset from Gmem to Lmem */
|
/* copy digit offset from Gmem to Lmem */
|
||||||
#if 1
|
#if 0
|
||||||
__shared__ int digitOffsets_sh[NUMDIGITS*4];
|
__shared__ int digitOffsets_sh[NUMDIGITS*4];
|
||||||
int *digitOffsets = digitOffsets_sh + warpIdx*NUMDIGITS;
|
int *digitOffsets = digitOffsets_sh + warpIdx*NUMDIGITS;
|
||||||
for (int digit = programIndex; digit < NUMDIGITS; digit += programCount)
|
for (int digit = programIndex; digit < NUMDIGITS; digit += programCount)
|
||||||
|
|||||||
@@ -64,9 +64,13 @@ void sortPass(
|
|||||||
const uniform int mask = (1 << NUMBITS) - 1;
|
const uniform int mask = (1 << NUMBITS) - 1;
|
||||||
|
|
||||||
/* copy digit offset from Gmem to Lmem */
|
/* copy digit offset from Gmem to Lmem */
|
||||||
|
#if 1
|
||||||
uniform int digitOffsets[NUMDIGITS];
|
uniform int digitOffsets[NUMDIGITS];
|
||||||
foreach (digit = 0 ... NUMDIGITS)
|
foreach (digit = 0 ... NUMDIGITS)
|
||||||
digitOffsets[digit] = digitOffsetsAll[blockIdx*NUMDIGITS + digit];
|
digitOffsets[digit] = digitOffsetsAll[blockIdx*NUMDIGITS + digit];
|
||||||
|
#else
|
||||||
|
uniform int * uniform digitOffsets = &digitOffsetsAll[blockIdx*NUMDIGITS];
|
||||||
|
#endif
|
||||||
|
|
||||||
foreach (i = 0 ... nloc)
|
foreach (i = 0 ... nloc)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user