added non-shared memory

This commit is contained in:
Evghenii
2014-01-29 13:41:36 +01:00
parent 784eb2d15b
commit f6379dea82
2 changed files with 5 additions and 1 deletions

View File

@@ -93,7 +93,7 @@ void sortPass(
const int mask = (1 << NUMBITS) - 1;
/* copy digit offset from Gmem to Lmem */
#if 1
#if 0
__shared__ int digitOffsets_sh[NUMDIGITS*4];
int *digitOffsets = digitOffsets_sh + warpIdx*NUMDIGITS;
for (int digit = programIndex; digit < NUMDIGITS; digit += programCount)

View File

@@ -64,9 +64,13 @@ void sortPass(
const uniform int mask = (1 << NUMBITS) - 1;
/* copy digit offset from Gmem to Lmem */
#if 1
uniform int digitOffsets[NUMDIGITS];
foreach (digit = 0 ... NUMDIGITS)
digitOffsets[digit] = digitOffsetsAll[blockIdx*NUMDIGITS + digit];
#else
uniform int * uniform digitOffsets = &digitOffsetsAll[blockIdx*NUMDIGITS];
#endif
foreach (i = 0 ... nloc)
{