/usr/src/WrapITK/ExternalProjects/MultiThreaderControl/itkMultiThreaderStub.h is in libinsighttoolkit3-dev 3.20.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | #ifndef CABLE_CONFIGURATION
// This file should *only* ever be included on windows systems!
// gcc-xml cannot be allowed to see the full MultiThreader header.
// If we're not gcc_xml, just pass through to the proper header.
#include "itkMultiThreader.h"
#else
// Here follows the restricted header made available just to gcc-xml on windows.
// The problem we are working around is the fact that on windows, the
// ThreadFunctionType (defined in the full header) looks like this
// unsigned long (__stdcall *)(void*)
// Unfortunately, gcc_xml and cswig can't properly wrap __stdcall functions,
// causing compile errors.
#ifndef __itkMultiThreader_h
#define __itkMultiThreader_h
#include "itkObject.h"
#include "itkMutexLock.h"
namespace itk
{
#ifdef ITK_USE_SPROC
#define ITK_MAX_THREADS 128
#endif
#ifdef ITK_USE_PTHREADS
#define ITK_MAX_THREADS 128
#endif
#ifdef ITK_USE_WIN32_THREADS
#define ITK_MAX_THREADS 128
#endif
#ifdef __CYGWIN__
#undef ITK_MAX_THREADS
#define ITK_MAX_THREADS 128
#endif
#if defined(__MINGW32__)
#undef ITK_MAX_THREADS
#define ITK_MAX_THREADS 1
#endif
#if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 730
#undef ITK_MAX_THREADS
#define ITK_MAX_THREADS 1
#endif
#ifndef ITK_MAX_THREADS
#define ITK_MAX_THREADS 1
#endif
class MultiThreader : public Object
{
public:
/** Standard class typedefs. */
typedef MultiThreader Self;
typedef Object Superclass;
typedef SmartPointer<Self> Pointer;
typedef SmartPointer<const Self> ConstPointer;
itkNewMacro(Self);
itkTypeMacro(MultiThreader, Object);
itkSetClampMacro( NumberOfThreads, int, 1, ITK_MAX_THREADS );
itkGetMacro( NumberOfThreads, int );
static void SetGlobalMaximumNumberOfThreads(int val);
static int GetGlobalMaximumNumberOfThreads();
static void SetGlobalDefaultNumberOfThreads(int val);
static int GetGlobalDefaultNumberOfThreads();
void SingleMethodExecute();
void MultipleMethodExecute();
void TerminateThread( int thread_id );
#ifdef ITK_USE_SPROC
static bool GetInitialized()
{ return m_Initialized; }
static usptr_t * GetThreadArena()
{ return m_ThreadArena; }
static void Initialize();
#endif
friend class ProcessObject;
private:
int m_NumberOfThreads;
};
} // end namespace itk
#endif // ifndef stuff
#endif // end if CABLE_CONFIGURATION
|