Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/cutorch.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgchanan <gregchanan@gmail.com>2016-12-29 22:23:45 +0300
committerSoumith Chintala <soumith@gmail.com>2016-12-29 22:23:45 +0300
commit1ac06689dba1a4a672ed1fb3c3117000a46d7af5 (patch)
tree5edb7b33c8ef506cbe488fe5d83de6349e42aaeb /Tensor.c
parent6b763fd55f9919ec2f1ccf58c962213e6fb755ea (diff)
Add THHalfTensor support to cutorch (#655)
* Add THHalfTensor support to cutorch.
Diffstat (limited to 'Tensor.c')
-rw-r--r--Tensor.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/Tensor.c b/Tensor.c
index 3adeddd..560d224 100644
--- a/Tensor.c
+++ b/Tensor.c
@@ -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"