|
|
|
@ -1,14 +1,6 @@ |
|
|
|
|
#if defined(ENABLE_TORCH_IMPORTER) && ENABLE_TORCH_IMPORTER |
|
|
|
|
#include "THGeneral.h" |
|
|
|
|
#include <opencv2/core.hpp> |
|
|
|
|
|
|
|
|
|
extern "C" |
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
#ifndef TH_HAVE_THREAD |
|
|
|
|
#define __thread |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
#if defined(TH_DISABLE_HEAP_TRACKING) |
|
|
|
|
#elif (defined(__unix) || defined(_WIN32)) |
|
|
|
|
#include <malloc.h> |
|
|
|
@ -16,6 +8,15 @@ extern "C" |
|
|
|
|
#include <malloc/malloc.h> |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
#include "THGeneral.h" |
|
|
|
|
|
|
|
|
|
extern "C" |
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
#ifndef TH_HAVE_THREAD |
|
|
|
|
#define __thread |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
/* Torch Error Handling */ |
|
|
|
|
static void defaultTorchErrorHandlerFunction(const char *msg, void*) |
|
|
|
|
{ |
|
|
|
|