#if USE_TEXTURES==1
uint32_t base = pkInfo[threadIdx.x].base;
#else
uchar* base = packet + pkInfo[threadIdx.x].base;
#endif
size = pkInfo[threadIdx.x].size;
/* Base case */
stBase = pcreTbl[blockIdx.x];
tblSize = pcreTblSize[blockIdx.x];
st = 0;
/* TODO : LOOP unrolling */
for (uint32_t i = 0; i < size; i++) {
#if USE_TEXTURES==1
ch = tex1Dfetch(texRef, base + i);
#else
ch = base[i];
#endif
This is my code for reading data. I bind texture at the packet variable. so I thought the use of USE_TEXTURES doesn’t change the result but it was not.
(cuda-gdb) print ch
$4 = 0 ‘\0’
(cuda-gdb) print packet[0]
$5 = 215 ‘â–’’
I use debugger for it. And the usage of tex1Dfetch and direct access is different.
Can you tell me why it happens? or if you want to know the more information, then plz let me know :)