Accelerated Computation Engine
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
Ace::Settings Class Reference

#include <ace_settings.h>

Public Member Functions

int openCLPlatform () const
 
int openCLDevice () const
 
OpenCL::DeviceopenCLDevicePointer () const
 
int threadSize () const
 
int bufferSize () const
 
QString chunkDir () const
 
QString chunkPrefix () const
 
QString chunkExtension () const
 
bool loggingEnabled () const
 
int loggingPort () const
 
void setOpenCLPlatform (int index)
 
void setOpenCLDevice (int index)
 
void setThreadSize (int size)
 
void setBufferSize (int size)
 
void setChunkDir (const QString &path)
 
void setChunkPrefix (const QString &prefix)
 
void setChunkExtension (const QString &extension)
 
void setLoggingEnabled (int state)
 
void setLoggingPort (int port)
 

Static Public Member Functions

static QString versionString ()
 
static QString organization ()
 
static QString application ()
 
static QString appVersionString ()
 
static int appMajorVersion ()
 
static int appMinorVersion ()
 
static int appRevision ()
 
static void initialize (QString organization, QString application, int majorVersion, int minorVersion, int revision)
 
static Settingsinstance ()
 

Static Public Attributes

static constexpr int _majorVersion {MAJOR_VERSION}
 
static constexpr int _minorVersion {MINOR_VERSION}
 
static constexpr int _revision {REVISION}
 

Detailed Description

This is a singleton class that holds all global settings for ACE and the program that uses it. Before calling on the instance of this class the static initialize method must be called first or this class will fail to getting the correct settings for the program using ACE. If any persistent setting is updated this class will save it using a qt settings object so it persists through to other instances of the program.

Member Function Documentation

◆ application()

QString Settings::application ( )
static

Returns the name of the application using ACE.

Returns
Name of the application using ACE.

◆ appMajorVersion()

int Settings::appMajorVersion ( )
static

Returns the major version of the application using ACE.

Returns
Major version of the application using ACE.

◆ appMinorVersion()

int Settings::appMinorVersion ( )
static

Returns the minor version of the application using ACE.

Returns
Minor version of the application using ACE.

◆ appRevision()

int Settings::appRevision ( )
static

The revision of the application using ACE.

Returns
Revision of the application using ACE.

◆ appVersionString()

QString Settings::appVersionString ( )
static

Returns the version of the application using ACE as a string.

Returns
Version of the application using ACE as a string.

◆ bufferSize()

int Settings::bufferSize ( ) const

Returns the MPI buffer size used to determine the number of blocks are buffered for input to each slave node.

Returns
MPI buffer size.

◆ chunkDir()

QString Settings::chunkDir ( ) const

Returns the working directory path for chunk runs.

Returns
Working directory path for chunk runs.

◆ chunkExtension()

QString Settings::chunkExtension ( ) const

Returns the chunk file extension.

Returns
Chunk file extension.

◆ chunkPrefix()

QString Settings::chunkPrefix ( ) const

Returns the chunk file name prefix.

Returns
Chunk file name prefix.

◆ initialize()

void Settings::initialize ( QString  organization,
QString  application,
int  majorVersion,
int  minorVersion,
int  revision 
)
static

Initializes and sets the organization name, name, and version numbers of the application using ACE. This must be called before the settings singleton instance is created. The application name cannot be "ace" or an exception is thrown.

Parameters
organizationOrganization name of the application using ACE.
applicationName of the application using ACE.
majorVersionMajor version of the application using ACE.
minorVersionMinor version of the application using ACE.
revisionRevision of the application using ACE.

◆ instance()

Settings & Settings::instance ( )
static

Returns a reference to the singleton instance of this class. If the singleton instance has not yet been created then it is before returning.

Returns
Reference to the singleton instance of this class.

◆ loggingEnabled()

bool Settings::loggingEnabled ( ) const

Returns the logging enabled state.

Returns
Logging enabled state.

◆ loggingPort()

int Settings::loggingPort ( ) const

Returns the logging port number.

Returns
Logging port number.

◆ openCLDevice()

int Settings::openCLDevice ( ) const

Returns the device index of the preferred OpenCL device.

Returns
Device index of the preferred OpenCL device.

◆ openCLDevicePointer()

OpenCL::Device * Settings::openCLDevicePointer ( ) const

Returns a pointer to the preferred OpenCL device or null if the preference is none.

Returns
Pointer to preferred OpenCL device or null if none is preferred.

◆ openCLPlatform()

int Settings::openCLPlatform ( ) const

Returns the platform index of the preferred OpenCL device.

Returns
Platform index of the preferred OpenCL device.

◆ organization()

QString Settings::organization ( )
static

Returns the organization of the application using ACE.

Returns
Organization of the application using ACE.

◆ setBufferSize()

void Settings::setBufferSize ( int  size)

Sets the MPI buffer size used to determine the number of blocks are buffered for input to each slave node.

Parameters
sizenew MPI buffer size.

◆ setChunkDir()

void Settings::setChunkDir ( const QString &  path)

Sets the working directory for chunk runs.

Parameters
pathWorking directory path for chunk runs.

◆ setChunkExtension()

void Settings::setChunkExtension ( const QString &  extension)

Sets the chunk file extension.

Parameters
extensionNew chunk file extension.

◆ setChunkPrefix()

void Settings::setChunkPrefix ( const QString &  prefix)

Sets the chunk file name prefix.

Parameters
prefixNew chunk file name prefix.

◆ setLoggingEnabled()

void Settings::setLoggingEnabled ( int  state)

Set the logging enabled state.

Parameters
stateNew logging enabled state.

◆ setLoggingPort()

void Settings::setLoggingPort ( int  port)

Set the logging port.

Parameters
portNew logging port number.

◆ setOpenCLDevice()

void Settings::setOpenCLDevice ( int  index)

Sets the index of the preferred OpenCL device.

Parameters
indexIndex of the preferred OpenCL device.

◆ setOpenCLPlatform()

void Settings::setOpenCLPlatform ( int  index)

Sets the platform index for the preferred OpenCL device.

Parameters
indexIndex of the platform of the preferred OpenCL device.

◆ setThreadSize()

void Settings::setThreadSize ( int  size)

Sets the thread size for accelerated runs. The size must be one or greater or an exception is thrown.

Parameters
sizeThread size for accelerated runs.

◆ threadSize()

int Settings::threadSize ( ) const

Returns the thread size for accelerated runs.

Returns
Thread size for accelerated runs.

◆ versionString()

QString Settings::versionString ( )
static

Returns the version of the ACE library as a string.

Returns
Version of ACE library as a string.

Member Data Documentation

◆ _majorVersion

constexpr int Ace::Settings::_majorVersion {MAJOR_VERSION}
static

The major version of the ACE library.

◆ _minorVersion

constexpr int Ace::Settings::_minorVersion {MINOR_VERSION}
static

The minor version of the ACE library.

◆ _revision

constexpr int Ace::Settings::_revision {REVISION}
static

The revision of the ACE library.


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