cpu.c 335 Bytes
Newer Older
rusty1s's avatar
rusty1s committed
1
2
3
4
5
6
7
8
9
#include <TH/TH.h>

#define scatter_(NAME) TH_CONCAT_4(scatter_, NAME, _, Real)
#define check_(NAME) TH_CONCAT_4(check_, NAME, _, Real)

inline void check_inBoundaries(int idx, int size, long *free) {
  if (idx < 0 || idx >= size) { THFree(free); THError("Invalid index"); }
}

rusty1s's avatar
rusty1s committed
10
#include "generic/cpu.c"
rusty1s's avatar
rusty1s committed
11
#include "THGenerateAllTypes.h"