File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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+
2036namespace 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}
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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-
3626namespace 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
Original file line number Diff line number Diff 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-
3323namespace tensor_array
3424{
3525 namespace layers
You can’t perform that action at this time.
0 commit comments