pytorch/torch/csrc/THP_export.h
peterjc123 63af898d46 Fix extension test on Windows (#5548)
* Change cpp_extensions.py to make it work on Windows

* Fix linting

* Show python paths

* Debug

* Debug 1

* set PYTHONPATH

* Add ATen into library

* expose essential libs and functions, and copy _C.lib

* Specify dir in header

* Update check_abi for MSVC

* Activate cl environment to compile cpp extensions

* change version string

* Redirect stderr to stdout

* Add monkey patch for windows

* Remove unnecessary self

* Fix various issues

* Append necessary flags

* add /MD flag to cuda

* Install ninja

* Use THP_API instead of THP_CLASS

* Beautify the paths

* Revert "Use THP_API instead of THP_CLASS"

This reverts commit dd7e74c44db48e4c5f85bb8e3c698ff9de71ba2d.

* Use THP_API instead of THP_CLASS(new)
2018-04-02 13:53:25 -04:00

24 lines
440 B
C

#ifndef THP_EXPORT_H
#define THP_EXPORT_H
#ifdef __cplusplus
# define THP_EXTERNC extern "C"
#else
# define THP_EXTERNC extern
#endif
#ifdef _WIN32
# ifdef _THP_CORE
# define THP_API THP_EXTERNC __declspec(dllexport)
# define THP_CLASS __declspec(dllexport)
# else
# define THP_API THP_EXTERNC __declspec(dllimport)
# define THP_CLASS __declspec(dllimport)
# endif
#else
# define THP_API THP_EXTERNC
# define THP_CLASS
#endif
#endif