diff options
author | gchanan <gregchanan@gmail.com> | 2016-12-29 22:23:45 +0300 |
---|---|---|
committer | Soumith Chintala <soumith@gmail.com> | 2016-12-29 22:23:45 +0300 |
commit | 1ac06689dba1a4a672ed1fb3c3117000a46d7af5 (patch) | |
tree | 5edb7b33c8ef506cbe488fe5d83de6349e42aaeb /Tensor.c | |
parent | 6b763fd55f9919ec2f1ccf58c962213e6fb755ea (diff) |
Add THHalfTensor support to cutorch (#655)
* Add THHalfTensor support to cutorch.
Diffstat (limited to 'Tensor.c')
-rw-r--r-- | Tensor.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -8,6 +8,13 @@ #define torch_Tensor_(NAME) TH_CONCAT_4(torch_,CReal,Tensor_,NAME) #define torch_Tensor TH_CONCAT_STRING_3(torch.,CReal,Tensor) #define cutorch_Tensor_(NAME) TH_CONCAT_4(cutorch_,CReal,Tensor_,NAME) +#define cutorch_TensorCopy_(NAME) TH_CONCAT_4(cutorch_,Real,TensorCopy_,NAME) +// generate the torch types -- we could also do this via THGenerateAllTypes, +// but this allows us to be self contained. +#define FORCE_TH_HALF +#include "generic/CTensorCopy.c" +#include "THCGenerateAllTypes.h" +#undef FORCE_TH_HALF #include "generic/CTensor.c" #include "THCGenerateAllTypes.h" |