memcpy is super slow in cuda kernels....

This commit is contained in:
erikwijmans
2018-01-29 18:22:27 -05:00
parent 009c30e5e3
commit c4ddd6b099
7 changed files with 30 additions and 14 deletions
+3 -2
View File
@@ -21,8 +21,9 @@ __global__ void group_points_kernel(int b, int n, int c, int npoints,
for (int j = index; j < npoints; j += stride) {
for (int k = 0; k < nsample; ++k) {
int ii = idx[j * nsample + k];
memcpy(out + j * nsample * c + k * c, points + ii * c,
sizeof(float) * c);
for (int l = 0; l < c; ++l) {
out[j * nsample * c + k * c + l] = points[ii * c + l];
}
}
}
}