Commit a2f2986a authored by rusty1s's avatar rusty1s
Browse files

no need to convert

parent 56ae40e7
...@@ -11,7 +11,7 @@ void cluster_(grid)(int C, THLongTensor *output, THTensor *position, THTensor *s ...@@ -11,7 +11,7 @@ void cluster_(grid)(int C, THLongTensor *output, THTensor *position, THTensor *s
tmp = C; c = 0; tmp = C; c = 0;
for (i = 0; i < d; i++) { for (i = 0; i < d; i++) {
tmp = tmp / *(count_data + i); tmp = tmp / *(count_data + i);
c += tmp * (int64_t)floor((float)(*(position_data + i * position_stride) / *(size_data + i))); c += tmp * (int64_t)floor(*(position_data + i * position_stride) / *(size_data + i));
} }
output_data[0] = c; output_data[0] = c;
) )
......
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