Dear Everyone,
I have a runtime problem,
I post 2D small arrays to kernel, there is no problem in building this project (There was a lot of problems, that has been solved.),
But in runtime, coressponding to each cudaMalloc one exception occurs and Break Message appears.
my code is:
[font="Courier New"]
int random [iter_end_1][iter_end_2]; // 3*15 array
int res [iter_end_1][iter_end_2]; // 3*15 array
int * result ;
int res_size = iter_end_1 * iter_end_2 * sizeof (int);
int * rand;
int rand_size = iter_end_1 * iter_end_2 * sizeof (int);
cudaMalloc( (void**)&rand, rand_size ); // exception occurs but not break message
cudaMemcpy( rand, random, rand_size, cudaMemcpyHostToDevice ); // both exception and break message occur
cudaMalloc( (void**)&result, res_size );
cudaMemcpy( result, res, res_size, cudaMemcpyHostToDevice );
// kernel call
[/font]