ITK
4.1.0
Insight Segmentation and Registration Toolkit
|
#include <itkFFTWGlobalConfiguration.h>
Public Types | |
typedef SmartPointer< const Self > | ConstPointer |
typedef SmartPointer< Self > | Pointer |
typedef FFTWGlobalConfiguration | Self |
typedef Object | Superclass |
Public Member Functions | |
virtual const char * | GetNameOfClass () const |
Static Public Member Functions | |
static int | GetPlanRigor () |
static std::string | GetPlanRigorName (const int &value) |
static int | GetPlanRigorValue (const std::string &name) |
static bool | GetReadWisdomCache () |
static std::string | GetWisdomCacheBase () |
static std::string | GetWisdomFileDefaultBaseName () |
static bool | GetWriteWisdomCache () |
static void | SetPlanRigor (const std::string &name) |
static void | SetReadWisdomCache (const bool &v) |
static void | SetWisdomCacheBase (const std::string &v) |
static void | SetWisdomFilenameGenerator (WisdomFilenameGeneratorBase *wfg) |
static void | SetWriteWisdomCache (const bool &v) |
static void | Lock () |
static void | Unlock () |
static void | SetNewWisdomAvailable (const bool &v) |
static bool | GetNewWisdomAvailable () |
static void | SetPlanRigor (const int &v) |
static bool | ImportWisdomFileDouble (const std::string &fname) |
static bool | ExportWisdomFileDouble (const std::string &fname) |
static bool | ImportWisdomFileFloat (const std::string &fname) |
static bool | ExportWisdomFileFloat (const std::string &fname) |
static bool | ImportDefaultWisdomFileDouble () |
static bool | ExportDefaultWisdomFileDouble () |
static bool | ImportDefaultWisdomFileFloat () |
static bool | ExportDefaultWisdomFileFloat () |
Private Member Functions | |
virtual ::itk::LightObject::Pointer | CreateAnother (void) const |
FFTWGlobalConfiguration () | |
FFTWGlobalConfiguration (const Self &) | |
void | operator= (const Self &) |
~FFTWGlobalConfiguration () | |
Static Private Member Functions | |
static Pointer | GetInstance () |
static Pointer | New (void) |
Private Attributes | |
SimpleFastMutexLock | m_Lock |
bool | m_NewWisdomAvailable |
int | m_PlanRigor |
bool | m_ReadWisdomCache |
std::string | m_WisdomCacheBase |
WisdomFilenameGeneratorBase * | m_WisdomFilenameGenerator |
bool | m_WriteWisdomCache |
Static Private Attributes | |
static SimpleFastMutexLock | m_CreationLock |
static Pointer | m_Instance |
A class to contain all the global configuration options for FFTW.
A simple global lock is included that must be called before calling FFTW unsafe functions. It also handle cleanly the initialization and cleanup of FFTW.
This implementation was taken from the Insight Journal paper: http://hdl.handle.net/10380/3154 or http://insight-journal.com/browse/publication/717
Definition at line 253 of file itkFFTWGlobalConfiguration.h.
typedef SmartPointer< const Self > itk::FFTWGlobalConfiguration::ConstPointer |
Reimplemented from itk::Object.
Definition at line 261 of file itkFFTWGlobalConfiguration.h.
Reimplemented from itk::Object.
Definition at line 260 of file itkFFTWGlobalConfiguration.h.
Standard class typedefs.
Reimplemented from itk::Object.
Definition at line 258 of file itkFFTWGlobalConfiguration.h.
Reimplemented from itk::Object.
Definition at line 259 of file itkFFTWGlobalConfiguration.h.
itk::FFTWGlobalConfiguration::FFTWGlobalConfiguration | ( | ) | [private] |
itk::FFTWGlobalConfiguration::~FFTWGlobalConfiguration | ( | ) | [private] |
itk::FFTWGlobalConfiguration::FFTWGlobalConfiguration | ( | const Self & | ) | [private] |
virtual ::itk::LightObject::Pointer itk::FFTWGlobalConfiguration::CreateAnother | ( | void | ) | const [private, virtual] |
Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.
Reimplemented from itk::Object.
static bool itk::FFTWGlobalConfiguration::ExportDefaultWisdomFileDouble | ( | ) | [static] |
Import or export some wisdom for the type double to/from the default file
static bool itk::FFTWGlobalConfiguration::ExportDefaultWisdomFileFloat | ( | ) | [static] |
Import or export some wisdom for the type float to/from the default file
static bool itk::FFTWGlobalConfiguration::ExportWisdomFileDouble | ( | const std::string & | fname | ) | [static] |
Import or export some wisdom for the type double to/from a file
static bool itk::FFTWGlobalConfiguration::ExportWisdomFileFloat | ( | const std::string & | fname | ) | [static] |
Import or export some wisdom for the type float to/from a file
static Pointer itk::FFTWGlobalConfiguration::GetInstance | ( | ) | [static, private] |
Return the singleton instance with no reference counting.
virtual const char* itk::FFTWGlobalConfiguration::GetNameOfClass | ( | ) | const [virtual] |
Run-time type information (and related methods).
Reimplemented from itk::Object.
static bool itk::FFTWGlobalConfiguration::GetNewWisdomAvailable | ( | ) | [inline, static] |
Set/Get wether a new wisdom is available compared to the initial state. If a new wisdom is available, the wisdoms may be written to the cache file
Definition at line 281 of file itkFFTWGlobalConfiguration.h.
static int itk::FFTWGlobalConfiguration::GetPlanRigor | ( | ) | [inline, static] |
Definition at line 303 of file itkFFTWGlobalConfiguration.h.
Referenced by itk::FFTWComplexToComplexImageFilter< TImage >::FFTWComplexToComplexImageFilter().
static std::string itk::FFTWGlobalConfiguration::GetPlanRigorName | ( | const int & | value | ) | [static] |
Translate plan rigor value to name. An exception is sent if the value is not valid.
Referenced by itk::FFTWHalfHermitianToRealInverseFFTImageFilter< TInputImage, TOutputImage >::SetPlanRigor(), itk::FFTWInverseFFTImageFilter< TInputImage, TOutputImage >::SetPlanRigor(), itk::FFTWRealToHalfHermitianForwardFFTImageFilter< TInputImage, TOutputImage >::SetPlanRigor(), itk::FFTWForwardFFTImageFilter< TInputImage, TOutputImage >::SetPlanRigor(), and itk::FFTWComplexToComplexImageFilter< TImage >::SetPlanRigor().
static int itk::FFTWGlobalConfiguration::GetPlanRigorValue | ( | const std::string & | name | ) | [static] |
Translate plan rigor name to value. An exception is sent if the name is not valid.
Referenced by itk::FFTWHalfHermitianToRealInverseFFTImageFilter< TInputImage, TOutputImage >::SetPlanRigor(), itk::FFTWInverseFFTImageFilter< TInputImage, TOutputImage >::SetPlanRigor(), and itk::FFTWComplexToComplexImageFilter< TImage >::SetPlanRigor().
static bool itk::FFTWGlobalConfiguration::GetReadWisdomCache | ( | ) | [inline, static] |
Definition at line 330 of file itkFFTWGlobalConfiguration.h.
static std::string itk::FFTWGlobalConfiguration::GetWisdomCacheBase | ( | ) | [inline, static] |
Definition at line 364 of file itkFFTWGlobalConfiguration.h.
static std::string itk::FFTWGlobalConfiguration::GetWisdomFileDefaultBaseName | ( | ) | [static] |
static bool itk::FFTWGlobalConfiguration::GetWriteWisdomCache | ( | ) | [inline, static] |
Definition at line 347 of file itkFFTWGlobalConfiguration.h.
static bool itk::FFTWGlobalConfiguration::ImportDefaultWisdomFileDouble | ( | ) | [static] |
Import or export some wisdom for the type double to/from the default file
static bool itk::FFTWGlobalConfiguration::ImportDefaultWisdomFileFloat | ( | ) | [static] |
Import or export some wisdom for the type float to/from the default file
static bool itk::FFTWGlobalConfiguration::ImportWisdomFileDouble | ( | const std::string & | fname | ) | [static] |
Import or export some wisdom for the type double to/from a file
static bool itk::FFTWGlobalConfiguration::ImportWisdomFileFloat | ( | const std::string & | fname | ) | [static] |
Import or export some wisdom for the type float to/from a file
static void itk::FFTWGlobalConfiguration::Lock | ( | ) | [static] |
Lock() must be run before the call to any FFTW unsafe method, and followed immediatly by a call to Unlock()
Referenced by itk::fftw::Proxy< float >::Plan_dft(), itk::fftw::Proxy< double >::Plan_dft(), itk::fftw::Proxy< float >::Plan_dft_c2r(), itk::fftw::Proxy< double >::Plan_dft_c2r(), itk::fftw::Proxy< float >::Plan_dft_r2c(), and itk::fftw::Proxy< double >::Plan_dft_r2c().
static Pointer itk::FFTWGlobalConfiguration::New | ( | void | ) | [static, private] |
This is a singleton pattern New. There will only be ONE reference to a FFTWGlobalConfiguration object per process. The single instance will be unreferenced when the program exits.
Reimplemented from itk::Object.
void itk::FFTWGlobalConfiguration::operator= | ( | const Self & | ) | [private] |
Mutex lock to protect modification to the reference count
Reimplemented from itk::Object.
static void itk::FFTWGlobalConfiguration::SetNewWisdomAvailable | ( | const bool & | v | ) | [inline, static] |
Set/Get wether a new wisdom is available compared to the initial state. If a new wisdom is available, the wisdoms may be written to the cache file
Definition at line 277 of file itkFFTWGlobalConfiguration.h.
Referenced by itk::fftw::Proxy< float >::Plan_dft(), itk::fftw::Proxy< double >::Plan_dft(), itk::fftw::Proxy< float >::Plan_dft_c2r(), itk::fftw::Proxy< double >::Plan_dft_c2r(), itk::fftw::Proxy< float >::Plan_dft_r2c(), and itk::fftw::Proxy< double >::Plan_dft_r2c().
static void itk::FFTWGlobalConfiguration::SetPlanRigor | ( | const int & | v | ) | [inline, static] |
Set the behavior of wisdom plan creation.
If the environmental variable "ITK_FFTW_PLAN_RIGOR", is set, then the environmental setting overides default settings.
v | One of the FFTW planner rigor flags FFTW_ESTIMATE, FFTW_MEASURE, FFTW_PATIENT, FFTW_EXHAUSTIVE |
Definition at line 295 of file itkFFTWGlobalConfiguration.h.
static void itk::FFTWGlobalConfiguration::SetPlanRigor | ( | const std::string & | name | ) | [inline, static] |
Definition at line 307 of file itkFFTWGlobalConfiguration.h.
static void itk::FFTWGlobalConfiguration::SetReadWisdomCache | ( | const bool & | v | ) | [inline, static] |
Set the behavior of wisdom file caching.
If the environmental variable "ITK_FFTW_WRITE_WISDOM_CACHE", is set, then the environmental setting overides default settings.
v | true will create a wisdom file in the location |
Definition at line 325 of file itkFFTWGlobalConfiguration.h.
static void itk::FFTWGlobalConfiguration::SetWisdomCacheBase | ( | const std::string & | v | ) | [inline, static] |
Define the directory where the wisdom cache will be placed. The environmental variable ITK_FFTW_WISDOM_CACHE_BASE will override the default behavior.
v | the path to the base directory name |
Definition at line 359 of file itkFFTWGlobalConfiguration.h.
static void itk::FFTWGlobalConfiguration::SetWisdomFilenameGenerator | ( | WisdomFilenameGeneratorBase * | wfg | ) | [static] |
allows application developers to create arbitrary rules for auto-generating cache file names. A default cache strategy is set to generate separate cache files for each unique operating system and hardware permutation. Alternate respresentative strategies are available to meet common use cases.
static void itk::FFTWGlobalConfiguration::SetWriteWisdomCache | ( | const bool & | v | ) | [inline, static] |
Set the behavior of wisdom file caching.
If the environmental variable "ITK_FFTW_WRITE_WISDOM_CACHE", is set, then the environmental setting overides default settings.
v | true will create a wisdom file in the location |
Definition at line 342 of file itkFFTWGlobalConfiguration.h.
static void itk::FFTWGlobalConfiguration::Unlock | ( | ) | [static] |
Lock() must be run before the call to any FFTW unsafe method, and followed immediatly by a call to Unlock()
Referenced by itk::fftw::Proxy< float >::Plan_dft(), itk::fftw::Proxy< double >::Plan_dft(), itk::fftw::Proxy< float >::Plan_dft_c2r(), itk::fftw::Proxy< double >::Plan_dft_c2r(), itk::fftw::Proxy< float >::Plan_dft_r2c(), and itk::fftw::Proxy< double >::Plan_dft_r2c().
SimpleFastMutexLock itk::FFTWGlobalConfiguration::m_CreationLock [static, private] |
Definition at line 435 of file itkFFTWGlobalConfiguration.h.
Pointer itk::FFTWGlobalConfiguration::m_Instance [static, private] |
Definition at line 434 of file itkFFTWGlobalConfiguration.h.
Definition at line 437 of file itkFFTWGlobalConfiguration.h.
bool itk::FFTWGlobalConfiguration::m_NewWisdomAvailable [private] |
Definition at line 438 of file itkFFTWGlobalConfiguration.h.
int itk::FFTWGlobalConfiguration::m_PlanRigor [private] |
Definition at line 439 of file itkFFTWGlobalConfiguration.h.
bool itk::FFTWGlobalConfiguration::m_ReadWisdomCache [private] |
Definition at line 441 of file itkFFTWGlobalConfiguration.h.
std::string itk::FFTWGlobalConfiguration::m_WisdomCacheBase [private] |
Definition at line 442 of file itkFFTWGlobalConfiguration.h.
Definition at line 445 of file itkFFTWGlobalConfiguration.h.
bool itk::FFTWGlobalConfiguration::m_WriteWisdomCache [private] |
Definition at line 440 of file itkFFTWGlobalConfiguration.h.