SHAFFT 1.1.0-alpha
A Scalable High-dimensional Accelerated FFT Library
Loading...
Searching...
No Matches
shafft::ConfigND Class Reference

RAII wrapper for N-D configuration objects. More...

#include <shafft.hpp>

Public Member Functions

 ConfigND (const std::vector< size_t > &globalShape, FFTType precision, const std::vector< int > &commDims={}, int hintNda=0, DecompositionStrategy strategy=DecompositionStrategy::MAXIMIZE_NDA, TransformLayout outputPolicy=TransformLayout::REDISTRIBUTED, size_t memLimit=0, MPI_Comm comm=MPI_COMM_WORLD) noexcept
 Construct, initialize, and resolve an N-D config.
 
 ConfigND (const ConfigND &)=delete
 Non-copyable.
 
ConfigNDoperator= (const ConfigND &)=delete
 
 ConfigND (ConfigND &&other) noexcept
 Move constructor.
 
ConfigNDoperator= (ConfigND &&other) noexcept
 Move assignment.
 
 ~ConfigND () noexcept
 Destructor. Releases internal resources.
 
int status () const noexcept
 Check if init succeeded.
 
const shafft_nd_config_tcStruct () const noexcept
 Read-only access to the underlying C struct.
 
shafft_nd_config_tcStruct () noexcept
 Mutable access (for advanced usage or direct field writes).
 
const shafft_nd_config_toperator-> () const noexcept
 Arrow-syntax access to underlying C struct (const).
 
shafft_nd_config_toperator-> () noexcept
 Arrow-syntax access to underlying C struct (mutable).
 
int resolve () noexcept
 Re-resolve configuration using stored worldComm.
 
bool isResolved () const noexcept
 Check if the config has been successfully resolved.
 

Detailed Description

Manages the lifecycle of an shafft_nd_config_t C struct with RAII semantics. Constructor performs init+resolve in one call. Provides operator->() for direct arrow-syntax access to the underlying C struct fields.

Examples
example_portable_config.cpp.

Constructor & Destructor Documentation

◆ ConfigND() [1/3]

shafft::ConfigND::ConfigND ( const std::vector< size_t > &  globalShape,
FFTType  precision,
const std::vector< int > &  commDims = {},
int  hintNda = 0,
DecompositionStrategy  strategy = DecompositionStrategy::MAXIMIZE_NDA,
TransformLayout  outputPolicy = TransformLayout::REDISTRIBUTED,
size_t  memLimit = 0,
MPI_Comm  comm = MPI_COMM_WORLD 
)
noexcept
Parameters
globalShapeGlobal extents per axis; ndim inferred from size().
precisionFFT type (C2C or Z2Z).
commDimsProcess grid hint (empty = auto).
hintNdaDistributed axes hint (0 = auto).
strategyDecomposition strategy.
outputPolicyForward output-layout policy.
memLimitPer-rank memory limit (0 = no limit).
commMPI communicator.
Exceptions
None.Check status() after construction.

◆ ConfigND() [2/3]

shafft::ConfigND::ConfigND ( const ConfigND )
delete

◆ ConfigND() [3/3]

shafft::ConfigND::ConfigND ( ConfigND &&  other)
noexcept

◆ ~ConfigND()

shafft::ConfigND::~ConfigND ( )
noexcept

Member Function Documentation

◆ operator=() [1/2]

ConfigND & shafft::ConfigND::operator= ( const ConfigND )
delete

◆ operator=() [2/2]

ConfigND & shafft::ConfigND::operator= ( ConfigND &&  other)
noexcept

◆ status()

int shafft::ConfigND::status ( ) const
inlinenoexcept

◆ cStruct() [1/2]

const shafft_nd_config_t & shafft::ConfigND::cStruct ( ) const
inlinenoexcept

◆ cStruct() [2/2]

shafft_nd_config_t & shafft::ConfigND::cStruct ( )
inlinenoexcept

◆ operator->() [1/2]

const shafft_nd_config_t * shafft::ConfigND::operator-> ( ) const
inlinenoexcept

◆ operator->() [2/2]

shafft_nd_config_t * shafft::ConfigND::operator-> ( )
inlinenoexcept

◆ resolve()

int shafft::ConfigND::resolve ( )
noexcept

◆ isResolved()

bool shafft::ConfigND::isResolved ( ) const
inlinenoexcept

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