Commit 8f302c12 by Zoltan Karsa

chck size

parent 22e6404c
......@@ -27,6 +27,8 @@ __global__
void parosit(const double* x1, const double* x2, double* a, double* b, const int m, const double PI) {
int tid = blockDim.x * blockIdx.x + threadIdx.x;
float alpha = x1[tid];
if (m*m <= tid*m+m-1)
return;
for (int i = 0; i < m; i++) {
float betha = x2[i];
if ((alpha + betha) < PI && betha >= alpha && alpha > 0.0) {
......@@ -46,6 +48,8 @@ __global__
void parosit2(const double* x1, const double* x2, double* a, double* b, const int m, const double PI) {
int tid = blockDim.x * blockIdx.x + threadIdx.x;
float alpha = x1[tid];
if (m*m <= tid*m+m-1)
return;
for (int i = 0; i < m; i++) {
float betha = x2[i];
if ((alpha + betha) < PI && alpha > 0.0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment