Commit 4452db19 by xiaotong

move #include <pthread.h> outside the namespace nts

parent 3a3b625a
...@@ -32,9 +32,6 @@ ...@@ -32,9 +32,6 @@
#define USE_PTHREAD // for linux #define USE_PTHREAD // for linux
#endif #endif
/* the nts (NiuTrans.Tensor) namespace */
namespace nts{
////////////////////////////////////////////////// //////////////////////////////////////////////////
// neccessary libs // neccessary libs
#ifdef USE_PTHREAD #ifdef USE_PTHREAD
...@@ -46,12 +43,15 @@ namespace nts{ ...@@ -46,12 +43,15 @@ namespace nts{
#endif #endif
#endif #endif
/* the nts (NiuTrans.Tensor) namespace */
namespace nts{
#if(defined(_WIN32) && !defined (__CYGWIN__)) #if(defined(_WIN32) && !defined (__CYGWIN__))
#define CRFPP_USE_THREAD 1 #define CRFPP_USE_THREAD 1
#define BEGINTHREAD(src, stack, func, arg, flag, id) \ #define BEGINTHREAD(src, stack, func, arg, flag, id) \
(HANDLE)_beginthreadex((void *)(src), (unsigned)(stack), \ (HANDLE)_beginthreadex((void *)(src), (unsigned)(stack), \
(unsigned(_stdcall *)(void *))(func), (void *)(arg), \ (unsigned(_stdcall *)(void *))(func), (void *)(arg), \
(unsigned)(flag), (unsigned *)(id)) (unsigned)(flag), (unsigned *)(id))
#endif #endif
////////////////////////////////////////////////// //////////////////////////////////////////////////
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论