Commit dd662618 authored by rusty1s's avatar rusty1s
Browse files

typo

parent fb4632ba
...@@ -14,10 +14,8 @@ ...@@ -14,10 +14,8 @@
template<typename Real, int Dims> template<typename Real, int Dims>
__global__ void gridKernel(int64_t *output, TensorInfo<Real> position, Real *size, int64_t *count, const int C, const int N) { __global__ void gridKernel(int64_t *output, TensorInfo<Real> position, Real *size, int64_t *count, const int C, const int N) {
KERNEL_LOOP(i, N) { KERNEL_LOOP(i, N) {
int positionOffset = 0; int positionOffset = 0; int tmp = C; int64_t c = 0;
IndexToOffset<Real, Dims>::compute(i, position, &positionOffset); IndexToOffset<Real, Dims>::compute(i, position, &positionOffset);
int tmp = C; int64_t c = 0;
for (int d = 0; d < position.size[position.dims - 1]; d++) { for (int d = 0; d < position.size[position.dims - 1]; d++) {
tmp = tmp / count[d]; tmp = tmp / count[d];
c += tmp * (int64_t) (position.data[positionOffset + d] / size[d]); c += tmp * (int64_t) (position.data[positionOffset + d] / size[d]);
......
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 to comment