Skip to content

Commit efc235a

Browse files
remove "#undef TENSOR_ARRAY_API"
1 parent 70e0e85 commit efc235a

4 files changed

Lines changed: 17 additions & 41 deletions

File tree

src/tensor-array/core/extern_type_map.hh

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,26 @@ limitations under the License.
1717
#include <unordered_map>
1818
#include <typeindex>
1919

20+
#ifdef _WIN32
21+
#ifdef TENSOR_ARRAY_EXPORTS
22+
#define TENSOR_ARRAY_API __declspec(dllexport)
23+
#define TENSOR_ARRAY_EXPORT_API __declspec(dllexport)
24+
#define TENSOR_ARRAY_IMPORT_API
25+
#else
26+
#define TENSOR_ARRAY_API __declspec(dllimport)
27+
#define TENSOR_ARRAY_EXPORT_API
28+
#define TENSOR_ARRAY_IMPORT_API __declspec(dllimport)
29+
#endif
30+
#else
31+
#define TENSOR_ARRAY_API
32+
#define TENSOR_ARRAY_EXPORT_API
33+
#define TENSOR_ARRAY_IMPORT_API
34+
#endif
35+
2036
namespace tensor_array
2137
{
2238
namespace value
2339
{
24-
extern std::unordered_map<std::type_index, std::size_t> dynamic_type_size;
40+
extern std::unordered_map<std::type_index, std::size_t> TENSOR_ARRAY_API dynamic_type_size;
2541
}
2642
}

src/tensor-array/core/tensor.hh

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,6 @@ limitations under the License.
2121

2222
#pragma once
2323

24-
#ifdef _WIN32
25-
#ifdef TENSOR_ARRAY_EXPORTS
26-
#define TENSOR_ARRAY_API __declspec(dllexport)
27-
#define TENSOR_ARRAY_EXPORT_API __declspec(dllexport)
28-
#define TENSOR_ARRAY_IMPORT_API
29-
#else
30-
#define TENSOR_ARRAY_API __declspec(dllimport)
31-
#define TENSOR_ARRAY_EXPORT_API
32-
#define TENSOR_ARRAY_IMPORT_API __declspec(dllimport)
33-
#endif
34-
#else
35-
#define TENSOR_ARRAY_API
36-
#define TENSOR_ARRAY_EXPORT_API
37-
#define TENSOR_ARRAY_IMPORT_API
38-
#endif
39-
4024
#define USING_DATA_TYPE_FLOAT() (float)(double)
4125
#define USING_DATA_TYPE_SINT() (int8_t)(int16_t)(int32_t)(int64_t)
4226
#define USING_DATA_TYPE_UINT() (uint8_t)(uint16_t)(uint32_t)(uint64_t)
@@ -458,5 +442,3 @@ struct std::equal_to<tensor_array::value::Tensor>
458442
#undef USING_DATA_TYPE_FLOAT
459443
#undef USING_DATA_TYPE_SINT
460444
#undef USING_DATA_TYPE_UINT
461-
462-
#undef TENSOR_ARRAY_API

src/tensor-array/core/tensorbase.hh

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,6 @@ limitations under the License.
2323
#include "initializer_wrapper.hh"
2424
#pragma once
2525

26-
#ifdef _WIN32
27-
#ifdef TENSOR_ARRAY_EXPORTS
28-
#define TENSOR_ARRAY_API __declspec(dllexport)
29-
#else
30-
#define TENSOR_ARRAY_API __declspec(dllimport)
31-
#endif
32-
#else
33-
#define TENSOR_ARRAY_API
34-
#endif
35-
3626
namespace tensor_array
3727
{
3828
namespace value
@@ -212,5 +202,3 @@ namespace tensor_array
212202
std::size_t get_sizeof_type(const std::type_info&);
213203
}
214204
}
215-
216-
#undef TENSOR_ARRAY_API

src/tensor-array/layers/layer_impl.hh

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,6 @@ limitations under the License.
2020
#include <utility>
2121
#pragma once
2222

23-
#ifdef _WIN32
24-
#ifdef TENSOR_ARRAY_EXPORTS
25-
#define TENSOR_ARRAY_API __declspec(dllexport)
26-
#else
27-
#define TENSOR_ARRAY_API __declspec(dllimport)
28-
#endif
29-
#else
30-
#define TENSOR_ARRAY_API
31-
#endif
32-
3323
namespace tensor_array
3424
{
3525
namespace layers

0 commit comments

Comments
 (0)