Passwrong << < 1, 1 >> >(cuda_dcA, cuda_dcAa, a, cuda_factAnum); global void Passwrong(int *a, int*b,int num,int*TN) {int countA = 0; for (int ia = 0; ia < num; ia++) { if (a[ia * 5] == 1 && a[ia * 5 + 1] == 1 && a[ia * 5 + 2] == 1 && a[ia * 5 + 3] == 1 && a[ia * 5 + 4] == 1) { continue; } else { for (int ja = 0; ja < 5; ja++) { b[countA * 5 + ja] = a[ia * 5 + ja]; } countA++; } } TN[0] = countA; }这种写法会爆炸,不明原因。。。。
相关分类