Hi there I have a CUDA program that has a global that has an array as input which contains my constants for running several kernels. If I set them inside the global without the array it runs at 6400ms if I set them from the array it slows right down to about 420000ms. Any ideas? E.g
Slow:-
__global__ void(int* array, int iter){
const int one = array[iter*2+0];
const int two = array[iter*2+1];
}
Fast:-
__global__ void(int* array,int iter){
const int one = 2;
const int two = 1;
}
I havent tried anything yet.
New contributor
Housebyte Bestofnet is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.