diff options
author | Soumith Chintala <soumith@gmail.com> | 2016-10-14 01:09:17 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-14 01:09:17 +0300 |
commit | 1fcbb03fbf8df1caf545c7383ad5e44cd01ff459 (patch) | |
tree | fad2a9c44611bd23f0be8e6c4d8fc5707e8b8888 | |
parent | a5778ec9cf3e560cae49b0006c42b40106aedfa3 (diff) | |
parent | 0c02077498d2cb43050297548a968492d906c456 (diff) |
Merge pull request #546 from torch/revert-543-win-msvc
Revert "changes to make cunn compile on windows with msvc"
-rw-r--r-- | lib/THC/THCDeviceTensor-inl.cuh | 8 | ||||
-rw-r--r-- | lib/THC/THCDeviceTensor.cuh | 9 | ||||
-rw-r--r-- | lib/THC/THCGeneral.h.in | 2 | ||||
-rw-r--r-- | lib/THC/THCTensorTypeUtils.cuh | 2 | ||||
-rw-r--r-- | torch/utils.h | 2 |
5 files changed, 2 insertions, 21 deletions
diff --git a/lib/THC/THCDeviceTensor-inl.cuh b/lib/THC/THCDeviceTensor-inl.cuh index 84cad81..9237d07 100644 --- a/lib/THC/THCDeviceTensor-inl.cuh +++ b/lib/THC/THCDeviceTensor-inl.cuh @@ -28,11 +28,7 @@ template <typename T, int Dim, typename IndexT, template <typename U> class PtrTraits> __host__ __device__ THCDeviceTensor<T, Dim, IndexT, PtrTraits>:: -#ifdef _MSC_VER -THCDeviceTensor(DataPtrType data, const IndexT (&sizes)[Dim]) -#else THCDeviceTensor(DataPtrType data, const IndexT sizes[Dim]) -#endif : data_(data) { thc_static_assert(Dim > 0); @@ -50,11 +46,7 @@ template <typename T, int Dim, typename IndexT, template <typename U> class PtrTraits> __host__ __device__ THCDeviceTensor<T, Dim, IndexT, PtrTraits>::THCDeviceTensor( -#ifdef _MSC_VER - DataPtrType data, const IndexT (&sizes)[Dim], const IndexT (&strides)[Dim]) -#else DataPtrType data, const IndexT sizes[Dim], const IndexT strides[Dim]) -#endif : data_(data) { thc_static_assert(Dim > 0); diff --git a/lib/THC/THCDeviceTensor.cuh b/lib/THC/THCDeviceTensor.cuh index 3122d08..c6b7899 100644 --- a/lib/THC/THCDeviceTensor.cuh +++ b/lib/THC/THCDeviceTensor.cuh @@ -70,21 +70,12 @@ class THCDeviceTensor { /// Constructor that calculates strides with no padding __host__ __device__ THCDeviceTensor(DataPtrType data, -#ifdef _MSC_VER - const IndexT (&sizes)[Dim]); -#else const IndexT sizes[Dim]); -#endif /// Constructor that takes arbitrary size/stride arrays __host__ __device__ THCDeviceTensor(DataPtrType data, -#ifdef _MSC_VER - const IndexT (&sizes)[Dim], - const IndexT (&strides)[Dim]); -#else const IndexT sizes[Dim], const IndexT strides[Dim]); -#endif /// Returns true if the two tensors are of the same dimensionality, /// size and stride. diff --git a/lib/THC/THCGeneral.h.in b/lib/THC/THCGeneral.h.in index 515b616..ce3ffc5 100644 --- a/lib/THC/THCGeneral.h.in +++ b/lib/THC/THCGeneral.h.in @@ -20,10 +20,8 @@ #ifdef _WIN32 # ifdef THC_EXPORTS # define THC_API THC_EXTERNC __declspec(dllexport) -# define THC_CLASS __declspec(dllexport) # else # define THC_API THC_EXTERNC __declspec(dllimport) -# define THC_CLASS __declspec(dllimport) # endif #else # define THC_API THC_EXTERNC diff --git a/lib/THC/THCTensorTypeUtils.cuh b/lib/THC/THCTensorTypeUtils.cuh index 81051f7..4f5d516 100644 --- a/lib/THC/THCTensorTypeUtils.cuh +++ b/lib/THC/THCTensorTypeUtils.cuh @@ -33,7 +33,7 @@ struct TensorUtils { #define TENSOR_UTILS(TENSOR_TYPE, DATA_TYPE, ACC_DATA_TYPE) \ template <> \ - struct THC_CLASS TensorUtils<TENSOR_TYPE> { \ + struct TensorUtils<TENSOR_TYPE> { \ typedef DATA_TYPE DataType; \ typedef ACC_DATA_TYPE AccDataType; \ \ diff --git a/torch/utils.h b/torch/utils.h index ae959b7..a11b842 100644 --- a/torch/utils.h +++ b/torch/utils.h @@ -17,7 +17,7 @@ #endif #ifdef _WIN32 -# ifdef cutorch_EXPORTS +# ifdef torch_EXPORTS # define TORCH_API TORCH_EXTERNC __declspec(dllexport) # else # define TORCH_API TORCH_EXTERNC __declspec(dllimport) |