ITK  5.2.0
Insight Toolkit
Public Types | Public Member Functions | Static Public Member Functions | List of all members
itk::FFTWGlobalConfiguration Class Reference

#include <itkFFTWGlobalConfiguration.h>

+ Inheritance diagram for itk::FFTWGlobalConfiguration:
+ Collaboration diagram for itk::FFTWGlobalConfiguration:

Public Types

using ConstPointer = SmartPointer< const Self >
 
using MutexType = std::mutex
 
using Pointer = SmartPointer< Self >
 
using Self = FFTWGlobalConfiguration
 
using Superclass = Object
 
- Public Types inherited from itk::Object
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = Object
 
using Superclass = LightObject
 
- Public Types inherited from itk::LightObject
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = LightObject
 

Public Member Functions

virtual const char * GetNameOfClass () const
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *)
 
unsigned long AddObserver (const EventObject &event, Command *) const
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
CommandGetCommand (unsigned long tag)
 
bool GetDebug () const
 
MetaDataDictionaryGetMetaDataDictionary ()
 
const MetaDataDictionaryGetMetaDataDictionary () const
 
virtual ModifiedTimeType GetMTime () const
 
virtual const TimeStampGetTimeStamp () const
 
bool HasObserver (const EventObject &event) const
 
void InvokeEvent (const EventObject &)
 
void InvokeEvent (const EventObject &) const
 
virtual void Modified () const
 
void Register () const override
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag)
 
void SetDebug (bool debugFlag) const
 
void SetReferenceCount (int) override
 
void UnRegister () const noexcept override
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
void SetMetaDataDictionary (MetaDataDictionary &&rrhs)
 
virtual void SetObjectName (std::string _arg)
 
virtual const std::string & GetObjectName () const
 
- Public Member Functions inherited from itk::LightObject
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
 itkCloneMacro (Self)
 
void Print (std::ostream &os, Indent indent=0) const
 

Static Public Member Functions

static std::mutex & GetLockMutex ()
 
- Static Public Member Functions inherited from itk::Object
static bool GetGlobalWarningDisplay ()
 
static void GlobalWarningDisplayOff ()
 
static void GlobalWarningDisplayOn ()
 
static Pointer New ()
 
static void SetGlobalWarningDisplay (bool flag)
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 
static FFTWGlobalConfigurationGlobals * m_PimplGlobals
 
std::mutex m_Lock
 
bool m_NewWisdomAvailable { false }
 
int m_PlanRigor { 0 }
 
bool m_WriteWisdomCache { false }
 
bool m_ReadWisdomCache { true }
 
std::string m_WisdomCacheBase
 
WisdomFilenameGeneratorBasem_WisdomFilenameGenerator
 
static void SetNewWisdomAvailable (const bool &v)
 
static bool GetNewWisdomAvailable ()
 
static void SetPlanRigor (const int &v)
 
static int GetPlanRigor ()
 
static void SetPlanRigor (const std::string &name)
 
static int GetPlanRigorValue (const std::string &name)
 
static std::string GetPlanRigorName (const int &value)
 
static void SetReadWisdomCache (const bool &v)
 
static bool GetReadWisdomCache ()
 
static void SetWriteWisdomCache (const bool &v)
 
static bool GetWriteWisdomCache ()
 
static void SetWisdomCacheBase (const std::string &v)
 
static std::string GetWisdomCacheBase ()
 
static void SetWisdomFilenameGenerator (WisdomFilenameGeneratorBase *wfg)
 
static std::string GetWisdomFileDefaultBaseName ()
 
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 ()
 
static bool ImportDefaultWisdomFile ()
 
static bool ExportDefaultWisdomFile ()
 
 FFTWGlobalConfiguration ()
 
 ~FFTWGlobalConfiguration () override
 
 itkGetGlobalDeclarationMacro (FFTWGlobalConfigurationGlobals, PimplGlobals)
 
virtual ::itk::LightObject::Pointer CreateAnother () const
 
static Pointer GetInstance ()
 
static Pointer New ()
 

Additional Inherited Members

- Protected Member Functions inherited from itk::Object
 Object ()
 
 ~Object () override
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void SetTimeStamp (const TimeStamp &time)
 
- Protected Member Functions inherited from itk::LightObject
virtual LightObject::Pointer InternalClone () const
 
 LightObject ()
 
virtual void PrintHeader (std::ostream &os, Indent indent) const
 
virtual void PrintTrailer (std::ostream &os, Indent indent) const
 
virtual ~LightObject ()
 
- Protected Attributes inherited from itk::LightObject
std::atomic< int > m_ReferenceCount
 

Detailed Description

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: https://hdl.handle.net/10380/3154 or http://insight-journal.com/browse/publication/717

Author
Gaetan Lehmann. Biologie du Developpement et de la Reproduction, INRA de Jouy-en-Josas, France.
Hans Johnson, The University of Iowa

Definition at line 204 of file itkFFTWGlobalConfiguration.h.

Member Typedef Documentation

◆ ConstPointer

Definition at line 213 of file itkFFTWGlobalConfiguration.h.

◆ MutexType

Definition at line 214 of file itkFFTWGlobalConfiguration.h.

◆ Pointer

Definition at line 212 of file itkFFTWGlobalConfiguration.h.

◆ Self

Standard class type aliases.

Definition at line 210 of file itkFFTWGlobalConfiguration.h.

◆ Superclass

Definition at line 211 of file itkFFTWGlobalConfiguration.h.

Constructor & Destructor Documentation

◆ FFTWGlobalConfiguration()

itk::FFTWGlobalConfiguration::FFTWGlobalConfiguration ( )
private

Set/Get whether 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

◆ ~FFTWGlobalConfiguration()

itk::FFTWGlobalConfiguration::~FFTWGlobalConfiguration ( )
overrideprivate

Set/Get whether 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

Member Function Documentation

◆ CreateAnother()

virtual ::itk::LightObject::Pointer itk::FFTWGlobalConfiguration::CreateAnother ( ) const
privatevirtual

Set/Get whether 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

Reimplemented from itk::Object.

◆ ExportDefaultWisdomFile()

static bool itk::FFTWGlobalConfiguration::ExportDefaultWisdomFile ( )
static

Set/Get whether 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

◆ ExportDefaultWisdomFileDouble()

static bool itk::FFTWGlobalConfiguration::ExportDefaultWisdomFileDouble ( )
static

Set/Get whether 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

◆ ExportDefaultWisdomFileFloat()

static bool itk::FFTWGlobalConfiguration::ExportDefaultWisdomFileFloat ( )
static

Set/Get whether 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

◆ ExportWisdomFileDouble()

static bool itk::FFTWGlobalConfiguration::ExportWisdomFileDouble ( const std::string &  fname)
static

Set/Get whether 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

◆ ExportWisdomFileFloat()

static bool itk::FFTWGlobalConfiguration::ExportWisdomFileFloat ( const std::string &  fname)
static

Set/Get whether 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

◆ GetInstance()

static Pointer itk::FFTWGlobalConfiguration::GetInstance ( )
staticprivate

Return the singleton instance with no reference counting.

◆ GetLockMutex()

static std::mutex& itk::FFTWGlobalConfiguration::GetLockMutex ( )
static

◆ GetNameOfClass()

virtual const char* itk::FFTWGlobalConfiguration::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

Reimplemented from itk::Object.

◆ GetNewWisdomAvailable()

static bool itk::FFTWGlobalConfiguration::GetNewWisdomAvailable ( )
static

Set/Get whether 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

◆ GetPlanRigor()

static int itk::FFTWGlobalConfiguration::GetPlanRigor ( )
static

Set/Get whether 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

◆ GetPlanRigorName()

static std::string itk::FFTWGlobalConfiguration::GetPlanRigorName ( const int &  value)
static

◆ GetPlanRigorValue()

static int itk::FFTWGlobalConfiguration::GetPlanRigorValue ( const std::string &  name)
static

◆ GetReadWisdomCache()

static bool itk::FFTWGlobalConfiguration::GetReadWisdomCache ( )
static

Set/Get whether 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

◆ GetWisdomCacheBase()

static std::string itk::FFTWGlobalConfiguration::GetWisdomCacheBase ( )
static

Set/Get whether 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

◆ GetWisdomFileDefaultBaseName()

static std::string itk::FFTWGlobalConfiguration::GetWisdomFileDefaultBaseName ( )
static
Returns
Returns the full path for the file to be written if WriteWisdomCache is set to true. The file name is based on the naming strategy set in SetWisdomFilenameGenerator (defaults to HardwareWisdomFilenameGenerator). The file generated by GetWisdomFileDefaultBaseName() (with an "f" suffix for single precision wisdom files). The environmental variable ITK_FFTW_WISDOM_CACHE_BASE can be used to set the base directory name to place the file name specified by the GetWisdomFileDefaultBaseName(). The default location is the users home account directory.

◆ GetWriteWisdomCache()

static bool itk::FFTWGlobalConfiguration::GetWriteWisdomCache ( )
static

Set/Get whether 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

◆ ImportDefaultWisdomFile()

static bool itk::FFTWGlobalConfiguration::ImportDefaultWisdomFile ( )
static

Convenience functions to Import/Export both double and float default wisdom files

◆ ImportDefaultWisdomFileDouble()

static bool itk::FFTWGlobalConfiguration::ImportDefaultWisdomFileDouble ( )
static

Import or export some wisdom for the type double to/from the default file

◆ ImportDefaultWisdomFileFloat()

static bool itk::FFTWGlobalConfiguration::ImportDefaultWisdomFileFloat ( )
static

Import or export some wisdom for the type float to/from the default file

◆ ImportWisdomFileDouble()

static bool itk::FFTWGlobalConfiguration::ImportWisdomFileDouble ( const std::string &  fname)
static

Import or export some wisdom for the type double to/from a file

◆ ImportWisdomFileFloat()

static bool itk::FFTWGlobalConfiguration::ImportWisdomFileFloat ( const std::string &  fname)
static

Import or export some wisdom for the type float to/from a file

◆ itkGetGlobalDeclarationMacro()

itk::FFTWGlobalConfiguration::itkGetGlobalDeclarationMacro ( FFTWGlobalConfigurationGlobals  ,
PimplGlobals   
)
private

Set/Get whether 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

◆ New()

static Pointer itk::FFTWGlobalConfiguration::New ( )
staticprivate

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.

◆ SetNewWisdomAvailable()

static void itk::FFTWGlobalConfiguration::SetNewWisdomAvailable ( const bool &  v)
static

Set/Get whether 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

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().

◆ SetPlanRigor() [1/2]

static void itk::FFTWGlobalConfiguration::SetPlanRigor ( const int &  v)
static

Set the behavior of wisdom plan creation.

If the environmental variable "ITK_FFTW_PLAN_RIGOR", is set, then the environmental setting overrides default settings.

Parameters
vOne of the FFTW planner rigor flags FFTW_ESTIMATE, FFTW_MEASURE, FFTW_PATIENT, FFTW_EXHAUSTIVE

◆ SetPlanRigor() [2/2]

static void itk::FFTWGlobalConfiguration::SetPlanRigor ( const std::string &  name)
static

Set/Get whether 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

◆ SetReadWisdomCache()

static void itk::FFTWGlobalConfiguration::SetReadWisdomCache ( const bool &  v)
static

Set/Get the behavior of wisdom file caching.

If the environmental variable "ITK_FFTW_WRITE_WISDOM_CACHE", is set, then the environmental setting overrides default settings. If true, will create a wisdom file in the location

◆ SetWisdomCacheBase()

static void itk::FFTWGlobalConfiguration::SetWisdomCacheBase ( const std::string &  v)
static

Define the directory where the wisdom cache will be placed. The environmental variable ITK_FFTW_WISDOM_CACHE_BASE will override the default behavior.

◆ SetWisdomFilenameGenerator()

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 representative strategies are available to meet common use cases.

See also
HardwareWisdomFilenameGenerator
SimpleWisdomFilenameGenerator
HostnameWisdomFilenameGenerator

◆ SetWriteWisdomCache()

static void itk::FFTWGlobalConfiguration::SetWriteWisdomCache ( const bool &  v)
static

Set/Get the behavior of wisdom file caching.

If the environmental variable "ITK_FFTW_WRITE_WISDOM_CACHE", is set, then the environmental setting overrides default settings. If true, will create a wisdom file in the location

Member Data Documentation

◆ m_Lock

std::mutex itk::FFTWGlobalConfiguration::m_Lock
private

Set/Get whether 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 380 of file itkFFTWGlobalConfiguration.h.

◆ m_NewWisdomAvailable

bool itk::FFTWGlobalConfiguration::m_NewWisdomAvailable { false }
private

Set/Get whether 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 381 of file itkFFTWGlobalConfiguration.h.

◆ m_PimplGlobals

FFTWGlobalConfigurationGlobals* itk::FFTWGlobalConfiguration::m_PimplGlobals
staticprivate

Set/Get whether 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 376 of file itkFFTWGlobalConfiguration.h.

◆ m_PlanRigor

int itk::FFTWGlobalConfiguration::m_PlanRigor { 0 }
private

Set/Get whether 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 382 of file itkFFTWGlobalConfiguration.h.

◆ m_ReadWisdomCache

bool itk::FFTWGlobalConfiguration::m_ReadWisdomCache { true }
private

Set/Get whether 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 384 of file itkFFTWGlobalConfiguration.h.

◆ m_WisdomCacheBase

std::string itk::FFTWGlobalConfiguration::m_WisdomCacheBase
private

Set/Get whether 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 385 of file itkFFTWGlobalConfiguration.h.

◆ m_WisdomFilenameGenerator

WisdomFilenameGeneratorBase* itk::FFTWGlobalConfiguration::m_WisdomFilenameGenerator
private

Set/Get whether 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 388 of file itkFFTWGlobalConfiguration.h.

◆ m_WriteWisdomCache

bool itk::FFTWGlobalConfiguration::m_WriteWisdomCache { false }
private

Set/Get whether 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 383 of file itkFFTWGlobalConfiguration.h.


The documentation for this class was generated from the following file: