I have problem with char type in kernel function. I want split large char type to small char type.
__global__ void kernelExponentLoad(char* BiExponent,int lines){
// BiExponent is formed from 80x100000 numbers
const int numThreads = blockDim.x * gridDim.x;
const int threadID = blockIdx.x * blockDim.x + threadIdx.x;
for (int k = threadID; k < 100000; k += numThreads){
char* cstr = new char[80];
for(int i=0; i<80; i++){
cstr[i] = BiExponent[(k*80)+i];
...
delete[] cstr;
}
}
}
This my solution doesn't work - kernel crashes (stop work) after start. Data in "char *BiExponent" are ok (the function printf work fine).