diff --git a/lib/TH/THGeneral.h.in b/lib/TH/THGeneral.h.in index b36fd863..9f118499 100644 --- a/lib/TH/THGeneral.h.in +++ b/lib/TH/THGeneral.h.in @@ -96,13 +96,4 @@ do { \ #define pclose _pclose #endif -#define TH_Byte 1 -#define TH_Char 2 -#define TH_Short 3 -#define TH_Int 4 -#define TH_Long 5 -#define TH_Float 6 -#define TH_Double 7 -#define TH_Cuda 8 - #endif diff --git a/lib/TH/THStorage.h b/lib/TH/THStorage.h index 376427ba..36ed507b 100644 --- a/lib/TH/THStorage.h +++ b/lib/TH/THStorage.h @@ -11,8 +11,6 @@ #define TH_STORAGE_GET(storage, idx) ((storage)->data[(idx)]) #define TH_STORAGE_SET(storage, idx, value) ((storage)->data[(idx)] = (value)) -#define TH_Type() TH_CONCAT_2(TH_,Real) - #include "generic/THStorage.h" #include "THGenerateAllTypes.h" diff --git a/lib/TH/generic/THStorage.c b/lib/TH/generic/THStorage.c index b6635296..b04e98d3 100644 --- a/lib/TH/generic/THStorage.c +++ b/lib/TH/generic/THStorage.c @@ -38,7 +38,6 @@ THStorage* THStorage_(newWithAllocator)(long size, storage->flag = TH_STORAGE_REFCOUNTED | TH_STORAGE_RESIZABLE | TH_STORAGE_FREEMEM; storage->allocator = allocator; storage->allocatorContext = allocatorContext; - storage->type = TH_Type(); return storage; } @@ -144,7 +143,6 @@ THStorage* THStorage_(newWithDataAndAllocator)(real* data, long size, storage->flag = TH_STORAGE_REFCOUNTED | TH_STORAGE_RESIZABLE | TH_STORAGE_FREEMEM; storage->allocator = allocator; storage->allocatorContext = allocatorContext; - storage->type = TH_Type(); return storage; } diff --git a/lib/TH/generic/THStorage.h b/lib/TH/generic/THStorage.h index a66f7b3d..8952b358 100644 --- a/lib/TH/generic/THStorage.h +++ b/lib/TH/generic/THStorage.h @@ -8,10 +8,10 @@ Pb: THMapStorage is kind of a class THLab_()... comment je m'en sors? - + en template, faudrait que je les instancie toutes!!! oh boy! Et comment je sais que c'est pour Cuda? Le type float est le meme dans les <> - + au bout du compte, ca serait sur des pointeurs float/double... etc... = facile. primitives?? */ @@ -29,7 +29,6 @@ typedef struct THStorage char flag; THAllocator *allocator; void *allocatorContext; - int type; struct THStorage *view; } THStorage;