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
path: root/torch
diff options
context:
space:
mode:
authorRicardo Barreira <rsf@google.com>2016-06-13 20:52:43 +0300
committerRicardo Barreira <rsf@google.com>2016-06-13 20:52:43 +0300
commit733f85965faeb9a8c5f682bf8d9056a64de8996d (patch)
tree1691e1ee7a93021093e36df38a5ee6bd2bd1acd9 /torch
parentffa15ab890167511a9b2c6576d737b68d9c4de69 (diff)
Fix "unused variable" warnings when THC_REAL_IS_FLOAT is not defined.
Diffstat (limited to 'torch')
-rw-r--r--torch/generic/Tensor.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/torch/generic/Tensor.c b/torch/generic/Tensor.c
index 873e8d8..a4dbed9 100644
--- a/torch/generic/Tensor.c
+++ b/torch/generic/Tensor.c
@@ -655,8 +655,10 @@ static int torch_Tensor_(__newindex__)(lua_State *L)
THCState *state = cutorch_getstate(L);
THCTensor *tensor = luaT_checkudata(L, 1, torch_Tensor);
THLongStorage *idx = NULL;
+#ifdef THC_REAL_IS_FLOAT
THByteTensor *mask;
THCudaTensor *maskCuda;
+#endif
if(lua_isnumber(L, 2))
{
@@ -898,8 +900,10 @@ static int torch_Tensor_(__index__)(lua_State *L)
THCState *state = cutorch_getstate(L);
THCTensor *tensor = luaT_checkudata(L, 1, torch_Tensor);
THLongStorage *idx = NULL;
+#ifdef THC_REAL_IS_FLOAT
THByteTensor *mask;
THCudaTensor *maskCuda;
+#endif
if(lua_isnumber(L, 2))
{