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

github.com/torch/cunn.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsoumith <soumith@fb.com>2016-09-27 22:24:02 +0300
committersoumith <soumith@fb.com>2016-09-27 22:24:02 +0300
commit5ce26de7f088cad971c868f8971f1d516916339d (patch)
treec825a25f4ee4b60959bbd6c0b11a2bc33fcdd68c
parent5aa68bbaf58480eb3d2c464cf4e70f5c7605aed5 (diff)
newtypesnewtypes
-rw-r--r--lib/THCUNN/CMakeLists.txt1
-rw-r--r--lib/THCUNN/THCUNN.h7
-rw-r--r--lib/THCUNN/generic/THCUNN.h13
3 files changed, 21 insertions, 0 deletions
diff --git a/lib/THCUNN/CMakeLists.txt b/lib/THCUNN/CMakeLists.txt
index f6439e1..27e7ba7 100644
--- a/lib/THCUNN/CMakeLists.txt
+++ b/lib/THCUNN/CMakeLists.txt
@@ -31,6 +31,7 @@ ENDIF()
FILE(GLOB src-cuda *.cu)
+CUDA_INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
CUDA_ADD_LIBRARY(THCUNN MODULE ${src-cuda})
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
diff --git a/lib/THCUNN/THCUNN.h b/lib/THCUNN/THCUNN.h
index 37a339f..f59e06e 100644
--- a/lib/THCUNN/THCUNN.h
+++ b/lib/THCUNN/THCUNN.h
@@ -4,6 +4,10 @@
#define THIndexTensor THCudaLongTensor
#define THIndexTensor_(NAME) THCudaLongTensor_ ## NAME
+#define THNN_(NAME) TH_CONCAT_3(THNN_, CReal, NAME)
+#define THIndexTensor_(NAME) THCudaLongTensor_ ## NAME
+#define THIntegerTensor_(NAME) THCudaIntTensor_ ## NAME
+
TH_API void THNN_CudaAbs_updateOutput(
THCState *state,
THCudaTensor *input,
@@ -1080,3 +1084,6 @@ TH_API void THNN_CudaVolumetricReplicationPadding_updateGradInput(
int pleft, int pright,
int ptop, int pbottom,
int pfront, int pback);
+
+#include "generic/THCUNN.h"
+#include "THCGenerateAllTypes.h"
diff --git a/lib/THCUNN/generic/THCUNN.h b/lib/THCUNN/generic/THCUNN.h
new file mode 100644
index 0000000..b052084
--- /dev/null
+++ b/lib/THCUNN/generic/THCUNN.h
@@ -0,0 +1,13 @@
+#ifndef THC_GENERIC_FILE
+#define THC_GENERIC_FILE "generic/THCUNN.h"
+#else
+TH_API void THNN_(Abs_updateOutput)(
+ THCState *state,
+ THCTensor *input,
+ THCTensor *output);
+TH_API void THNN_(Abs_updateGradInput)(
+ THCState *state,
+ THCTensor *input,
+ THCTensor *gradOutput,
+ THCTensor *gradInput);
+#endif