Commit 8b3f88a2 authored by rusty1s's avatar rusty1s
Browse files

max dim

parent 69d628f3
......@@ -3,6 +3,10 @@
#else
void scatter_(mul)(THCState *state, int dim, THCTensor *output, THCudaLongTensor *index, THCTensor *input) {
THCAssertSameGPU(THCTensor_(checkGPU)(state, 1, output, input));
THCAssertSameGPU(THCudaLongTensor_checkGPU(state, 2, index));
THArgCheck(THCTensor_(nDimension)(state, output) <= MAX_DIMS, 1, "Tensor too large or too many dimensions");
printf("mul");
}
......
......@@ -5,5 +5,7 @@
#define scatter_(NAME) TH_CONCAT_4(scatter_, NAME, _kernel_, Real)
#define index_backward TH_CONCAT_2(index_backward_kernel_, Real)
#define MAX_DIMS 25
#include "generic/kernel.cu"
#include "THCGenerateAllTypes.h"
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