cppassist  1.0.0.f4fab4f962ff
C++ sanctuary for small but powerful and frequently required, stand alone features.
Namespaces | Classes | Functions | Variables
cppassist Namespace Reference

Namespaces

 detail
 
 fs
 
 string
 

Classes

class  AbstractLogHandler
 Abstract log message handler. More...
 
class  aligned_allocator
 
class  ArgumentParser
 Command line arguments parser. More...
 
class  CommandLineAction
 Command line action. More...
 
class  CommandLineCommand
 Command line command. More...
 
class  CommandLineOption
 Command line option. More...
 
class  CommandLineParameter
 Command line parameter. More...
 
class  CommandLineProgram
 Command line program. More...
 
class  CommandLineSwitch
 Command line switch. More...
 
class  ConsoleLogHandler
 Log message handler that writes log messages to stdout. More...
 
class  DescriptiveRawFile
 Raw data with header file loader. More...
 
class  FileLogHandler
 Log message handler that writes log messages a file. More...
 
class  Flags
 
struct  identity
 Helper class to deduce function types with lambdas. More...
 
class  LogMessage
 Representation of a log message. More...
 
class  LogMessageBuilder
 Stream interface to build LogMessage's from different kinds of primitive types. More...
 
class  RawFile
 Raw data file loader. More...
 
class  Tokenizer
 Text parser tool that converts a text buffer into a stream of tokens. More...
 
class  TypeList
 A compile-time list of types. More...
 
class  TypeList< T, Types... >
 A compile-time list of types. More...
 
class  TypeList<>
 A compile-time list of types. More...
 
class  value
 
class  value< float, 1 >
 
class  value< float, 16 >
 
class  value< float, 4 >
 
class  value< float, 8 >
 
class  vector
 

Enumerations

enum  Encoding : unsigned int { Encoding::ANSI, Encoding::ASCII = Encoding::ANSI, Encoding::UTF8, Encoding::UTF16 }
 String encoding. More...
 

Functions

template<typename EnumType >
Flags< EnumType > makeFlags (EnumType value)
 
CPPASSIST_API AbstractLogHandlerloggingHandler ()
 Get global logging handler. More...
 
CPPASSIST_API void setLoggingHandler (AbstractLogHandler *handler)
 Set global logging handler. More...
 
CPPASSIST_API int verbosityLevel ()
 Get current log level. More...
 
CPPASSIST_API void setVerbosityLevel (int verbosity)
 Set current log level. More...
 
CPPASSIST_API LogMessageBuilder log (int level, const std::string &context="")
 Get log stream. More...
 
CPPASSIST_API LogMessageBuilder critical (const std::string &context="")
 Get log stream for critical errors. More...
 
CPPASSIST_API LogMessageBuilder error (const std::string &context="")
 Get log stream for error messages. More...
 
CPPASSIST_API LogMessageBuilder warning (const std::string &context="")
 Get log stream for warning messages. More...
 
CPPASSIST_API LogMessageBuilder info (const std::string &context="")
 Get log stream for info messages. More...
 
CPPASSIST_API LogMessageBuilder debug (const std::string &context="")
 Get log stream for debug messages. More...
 
CPPASSIST_API LogMessageBuilder debug (unsigned int debugLevel, const std::string &context="")
 Get log stream for debug messages at a given debug level. More...
 
template<class T , class... Args>
detail::UniqueIf< T >::UniqueSingle make_unique (Args &&... args)
 
template<class T >
detail::UniqueIf< T >::UniqueArrayUnknownBound make_unique (std::size_t n)
 
template<class T , class... Args>
detail::UniqueIf< T >::UniqueArrayKnownBound make_unique (Args &&...)=delete
 
template<typename Class , typename Type >
std::ptrdiff_t offset (Type Class::*member)
 Determines the offset of a member within a class. More...
 
template<typename T , size_t SIMD_SIZE>
void add (const vector< T, SIMD_SIZE > &first, const vector< T, SIMD_SIZE > &second, vector< T, SIMD_SIZE > &result)
 
template<typename T , size_t SIMD_SIZE>
void sub (const vector< T, SIMD_SIZE > &first, const vector< T, SIMD_SIZE > &second, vector< T, SIMD_SIZE > &result)
 
template<typename T , size_t SIMD_SIZE>
void mul (const vector< T, SIMD_SIZE > &first, const vector< T, SIMD_SIZE > &second, vector< T, SIMD_SIZE > &result)
 
template<typename T , size_t SIMD_SIZE>
void div (const vector< T, SIMD_SIZE > &first, const vector< T, SIMD_SIZE > &second, vector< T, SIMD_SIZE > &result)
 
template<typename T , size_t SIMD_SIZE>
void add (const vector< T, SIMD_SIZE > &first, const typename vector< T, SIMD_SIZE >::primitive_type &scalar, vector< T, SIMD_SIZE > &result)
 
template<typename T , size_t SIMD_SIZE>
void sub (const vector< T, SIMD_SIZE > &first, const typename vector< T, SIMD_SIZE >::primitive_type &scalar, vector< T, SIMD_SIZE > &result)
 
template<typename T , size_t SIMD_SIZE>
void mul (const vector< T, SIMD_SIZE > &first, const typename vector< T, SIMD_SIZE >::primitive_type &scalar, vector< T, SIMD_SIZE > &result)
 
template<typename T , size_t SIMD_SIZE>
void div (const vector< T, SIMD_SIZE > &first, const typename vector< T, SIMD_SIZE >::primitive_type &scalar, vector< T, SIMD_SIZE > &result)
 
template<typename T , size_t SIMD_SIZE>
void add (const typename vector< T, SIMD_SIZE >::primitive_type &scalar, const vector< T, SIMD_SIZE > &first, vector< T, SIMD_SIZE > &result)
 
template<typename T , size_t SIMD_SIZE>
void sub (const typename vector< T, SIMD_SIZE >::primitive_type &scalar, const vector< T, SIMD_SIZE > &first, vector< T, SIMD_SIZE > &result)
 
template<typename T , size_t SIMD_SIZE>
void mul (const typename vector< T, SIMD_SIZE >::primitive_type &scalar, const vector< T, SIMD_SIZE > &first, vector< T, SIMD_SIZE > &result)
 
template<typename T , size_t SIMD_SIZE>
void div (const typename vector< T, SIMD_SIZE >::primitive_type &scalar, const vector< T, SIMD_SIZE > &first, vector< T, SIMD_SIZE > &result)
 
template<typename T , size_t SIMD_SIZE>
void sqrt (const vector< T, SIMD_SIZE > &first, vector< T, SIMD_SIZE > &result)
 
void * aligned_malloc (size_t size, size_t alignment)
 
void aligned_free (void *ptr)
 
auto operator+ (const value< float, 1 > &first, const value< float, 1 > &second) -> value< float, 1 >
 
auto operator- (const value< float, 1 > &first, const value< float, 1 > &second) -> value< float, 1 >
 
auto operator* (const value< float, 1 > &first, const value< float, 1 > &second) -> value< float, 1 >
 
auto operator/ (const value< float, 1 > &first, const value< float, 1 > &second) -> value< float, 1 >
 
auto operator+ (const value< float, 1 > &first, const value< float, 1 >::primitive_type &scalar) -> value< float, 1 >
 
auto operator- (const value< float, 1 > &first, const value< float, 1 >::primitive_type &scalar) -> value< float, 1 >
 
auto operator* (const value< float, 1 > &first, const value< float, 1 >::primitive_type &scalar) -> value< float, 1 >
 
auto operator/ (const value< float, 1 > &first, const value< float, 1 >::primitive_type &scalar) -> value< float, 1 >
 
auto operator+ (const value< float, 1 >::primitive_type &scalar, const value< float, 1 > &other) -> value< float, 1 >
 
auto operator- (const value< float, 1 >::primitive_type &scalar, const value< float, 1 > &other) -> value< float, 1 >
 
auto operator* (const value< float, 1 >::primitive_type &scalar, const value< float, 1 > &other) -> value< float, 1 >
 
auto operator/ (const value< float, 1 >::primitive_type &scalar, const value< float, 1 > &other) -> value< float, 1 >
 
auto sqrt (const value< float, 1 > &first) -> value< float, 1 >
 
auto operator+ (const value< float, 16 > &first, const value< float, 16 > &second) -> value< float, 16 >
 
auto operator- (const value< float, 16 > &first, const value< float, 16 > &second) -> value< float, 16 >
 
auto operator* (const value< float, 16 > &first, const value< float, 16 > &second) -> value< float, 16 >
 
auto operator/ (const value< float, 16 > &first, const value< float, 16 > &second) -> value< float, 16 >
 
auto operator+ (const value< float, 16 > &first, const value< float, 16 >::primitive_type &scalar) -> value< float, 16 >
 
auto operator- (const value< float, 16 > &first, const value< float, 16 >::primitive_type &scalar) -> value< float, 16 >
 
auto operator* (const value< float, 16 > &first, const value< float, 16 >::primitive_type &scalar) -> value< float, 16 >
 
auto operator/ (const value< float, 16 > &first, const value< float, 16 >::primitive_type &scalar) -> value< float, 16 >
 
auto operator+ (const value< float, 16 >::primitive_type &scalar, const value< float, 16 > &other) -> value< float, 16 >
 
auto operator- (const value< float, 16 >::primitive_type &scalar, const value< float, 16 > &other) -> value< float, 16 >
 
auto operator* (const value< float, 16 >::primitive_type &scalar, const value< float, 16 > &other) -> value< float, 16 >
 
auto operator/ (const value< float, 16 >::primitive_type &scalar, const value< float, 16 > &other) -> value< float, 16 >
 
auto sqrt (const value< float, 16 > &first) -> value< float, 16 >
 
auto operator+ (const value< float, 4 > &first, const value< float, 4 > &second) -> value< float, 4 >
 
auto operator- (const value< float, 4 > &first, const value< float, 4 > &second) -> value< float, 4 >
 
auto operator* (const value< float, 4 > &first, const value< float, 4 > &second) -> value< float, 4 >
 
auto operator/ (const value< float, 4 > &first, const value< float, 4 > &second) -> value< float, 4 >
 
auto operator+ (const value< float, 4 > &first, const value< float, 4 >::primitive_type &scalar) -> value< float, 4 >
 
auto operator- (const value< float, 4 > &first, const value< float, 4 >::primitive_type &scalar) -> value< float, 4 >
 
auto operator* (const value< float, 4 > &first, const value< float, 4 >::primitive_type &scalar) -> value< float, 4 >
 
auto operator/ (const value< float, 4 > &first, const value< float, 4 >::primitive_type &scalar) -> value< float, 4 >
 
auto operator+ (const value< float, 4 >::primitive_type &scalar, const value< float, 4 > &other) -> value< float, 4 >
 
auto operator- (const value< float, 4 >::primitive_type &scalar, const value< float, 4 > &other) -> value< float, 4 >
 
auto operator* (const value< float, 4 >::primitive_type &scalar, const value< float, 4 > &other) -> value< float, 4 >
 
auto operator/ (const value< float, 4 >::primitive_type &scalar, const value< float, 4 > &other) -> value< float, 4 >
 
auto sqrt (const value< float, 4 > &first) -> value< float, 4 >
 
auto operator+ (const value< float, 8 > &first, const value< float, 8 > &second) -> value< float, 8 >
 
auto operator- (const value< float, 8 > &first, const value< float, 8 > &second) -> value< float, 8 >
 
auto operator* (const value< float, 8 > &first, const value< float, 8 > &second) -> value< float, 8 >
 
auto operator/ (const value< float, 8 > &first, const value< float, 8 > &second) -> value< float, 8 >
 
auto operator+ (const value< float, 8 > &first, const value< float, 8 >::primitive_type &scalar) -> value< float, 8 >
 
auto operator- (const value< float, 8 > &first, const value< float, 8 >::primitive_type &scalar) -> value< float, 8 >
 
auto operator* (const value< float, 8 > &first, const value< float, 8 >::primitive_type &scalar) -> value< float, 8 >
 
auto operator/ (const value< float, 8 > &first, const value< float, 8 >::primitive_type &scalar) -> value< float, 8 >
 
auto operator+ (const value< float, 8 >::primitive_type &scalar, const value< float, 8 > &other) -> value< float, 8 >
 
auto operator- (const value< float, 8 >::primitive_type &scalar, const value< float, 8 > &other) -> value< float, 8 >
 
auto operator* (const value< float, 8 >::primitive_type &scalar, const value< float, 8 > &other) -> value< float, 8 >
 
auto operator/ (const value< float, 8 >::primitive_type &scalar, const value< float, 8 > &other) -> value< float, 8 >
 
auto sqrt (const value< float, 8 > &first) -> value< float, 8 >
 
template<typename Callback , typename Vector , typename... Vectors>
void traverse (Callback callback, Vector &&vector, Vectors &&... vectors)
 
template<typename Callback , typename Vector , typename... Vectors>
void traverse_mt (Callback callback, Vector &&vector, Vectors &&... vectors)
 
CPPASSIST_API size_t getNumberOfThreads ()
 Get optimal number of threads for parallelization. More...
 
template<typename T >
void forEach (T start, T end, typename identity< std::function< void(T)>>::type callback, bool parallelize=true)
 Call a function on each iteration of a loop. More...
 
template<typename T >
void parallelFor (T start, T end, typename identity< std::function< void(T)>>::type callback)
 Call a function on each iteration of a loop (parallelized in threads) More...
 
template<typename T >
void parallelFor (const std::vector< T > &elements, typename identity< std::function< void(const T &element)>>::type callback)
 Call a function on each item of a list (parallelized in threads) More...
 
template<typename T >
void parallelFor (std::vector< T > &elements, typename identity< std::function< void(T &element)>>::type callback)
 Call a function on each item of a list (parallelized in threads) More...
 
template<typename T >
void sequentialFor (T start, T end, typename identity< std::function< void(T)>>::type callback)
 Call a function on each iteration of a loop (sequential) More...
 
template<typename T >
void sequentialFor (const std::vector< T > &elements, typename identity< std::function< void(const T &element)>>::type callback)
 Call a function on each item of a list (sequential) More...
 
template<typename T >
void sequentialFor (std::vector< T > &elements, typename identity< std::function< void(T &element)>>::type callback)
 Call a function on each item of a list (sequential) More...
 

Variables

const auto numberOfThreads = getNumberOfThreads()
 

Enumeration Type Documentation

◆ Encoding

enum cppassist::Encoding : unsigned int
strong

String encoding.

This enum is mainly used to support the conversion of strings or collections of characters to UTF-32.

Enumerator
ANSI 
ASCII 
UTF8 
UTF16 

Function Documentation

◆ makeFlags()

template<typename EnumType >
Flags< EnumType > cppassist::makeFlags ( EnumType  value)

◆ loggingHandler()

CPPASSIST_API AbstractLogHandler* cppassist::loggingHandler ( )

Get global logging handler.

Returns
Logging handler (can be null)

◆ setLoggingHandler()

CPPASSIST_API void cppassist::setLoggingHandler ( AbstractLogHandler handler)

Set global logging handler.

Parameters
[in]handlerLogging handler (can be null)

◆ verbosityLevel()

CPPASSIST_API int cppassist::verbosityLevel ( )

Get current log level.

Returns
Log level
Remarks
All log messages above the current verbosity level are omitted.

◆ setVerbosityLevel()

CPPASSIST_API void cppassist::setVerbosityLevel ( int  verbosity)

Set current log level.

Parameters
[in]verbosityLog level
See also
verbosityLevel

◆ log()

CPPASSIST_API LogMessageBuilder cppassist::log ( int  level,
const std::string &  context = "" 
)

Get log stream.

Use the stream interface to create log messages. Example:

log(LogMessage::Info) << "Message: " << 3.14;
Parameters
[in]levelLog level
[in]contextUser defined context string
Returns
Log stream interface

◆ critical()

CPPASSIST_API LogMessageBuilder cppassist::critical ( const std::string &  context = "")

Get log stream for critical errors.

Parameters
[in]contextUser defined context string
Returns
Log stream interface
See also
log

◆ error()

CPPASSIST_API LogMessageBuilder cppassist::error ( const std::string &  context = "")

Get log stream for error messages.

Parameters
[in]contextUser defined context string
Returns
Log stream interface
See also
log

◆ warning()

CPPASSIST_API LogMessageBuilder cppassist::warning ( const std::string &  context = "")

Get log stream for warning messages.

Parameters
[in]contextUser defined context string
Returns
Log stream interface
See also
log

◆ info()

CPPASSIST_API LogMessageBuilder cppassist::info ( const std::string &  context = "")

Get log stream for info messages.

Parameters
[in]contextUser defined context string
Returns
Log stream interface
See also
log

◆ debug() [1/2]

CPPASSIST_API LogMessageBuilder cppassist::debug ( const std::string &  context = "")

Get log stream for debug messages.

Parameters
[in]contextUser defined context string
Returns
Log stream interface
See also
log

◆ debug() [2/2]

CPPASSIST_API LogMessageBuilder cppassist::debug ( unsigned int  debugLevel,
const std::string &  context = "" 
)

Get log stream for debug messages at a given debug level.

Parameters
[in]debugLevelDebug level (e.g., 0 for debug, 1 for debug+1, etc.)
[in]contextUser defined context string
Returns
Log stream interface
See also
log

◆ make_unique() [1/3]

template<class T , class... Args>
detail::UniqueIf< T >::UniqueSingle cppassist::make_unique ( Args &&...  args)

◆ make_unique() [2/3]

template<class T >
detail::UniqueIf< T >::UniqueArrayUnknownBound cppassist::make_unique ( std::size_t  n)

◆ make_unique() [3/3]

template<class T , class... Args>
detail::UniqueIf<T>::UniqueArrayKnownBound cppassist::make_unique ( Args &&  ...)
delete

◆ offset()

template<typename Class , typename Type >
std::ptrdiff_t cppassist::offset ( Type Class::*  member)

Determines the offset of a member within a class.

Parameters
[in]memberPointer to class member
Returns
Offset of member

◆ add() [1/3]

template<typename T , size_t SIMD_SIZE>
void cppassist::add ( const vector< T, SIMD_SIZE > &  first,
const vector< T, SIMD_SIZE > &  second,
vector< T, SIMD_SIZE > &  result 
)

◆ sub() [1/3]

template<typename T , size_t SIMD_SIZE>
void cppassist::sub ( const vector< T, SIMD_SIZE > &  first,
const vector< T, SIMD_SIZE > &  second,
vector< T, SIMD_SIZE > &  result 
)

◆ mul() [1/3]

template<typename T , size_t SIMD_SIZE>
void cppassist::mul ( const vector< T, SIMD_SIZE > &  first,
const vector< T, SIMD_SIZE > &  second,
vector< T, SIMD_SIZE > &  result 
)

◆ div() [1/3]

template<typename T , size_t SIMD_SIZE>
void cppassist::div ( const vector< T, SIMD_SIZE > &  first,
const vector< T, SIMD_SIZE > &  second,
vector< T, SIMD_SIZE > &  result 
)

◆ add() [2/3]

template<typename T , size_t SIMD_SIZE>
void cppassist::add ( const vector< T, SIMD_SIZE > &  first,
const typename vector< T, SIMD_SIZE >::primitive_type &  scalar,
vector< T, SIMD_SIZE > &  result 
)

◆ sub() [2/3]

template<typename T , size_t SIMD_SIZE>
void cppassist::sub ( const vector< T, SIMD_SIZE > &  first,
const typename vector< T, SIMD_SIZE >::primitive_type &  scalar,
vector< T, SIMD_SIZE > &  result 
)

◆ mul() [2/3]

template<typename T , size_t SIMD_SIZE>
void cppassist::mul ( const vector< T, SIMD_SIZE > &  first,
const typename vector< T, SIMD_SIZE >::primitive_type &  scalar,
vector< T, SIMD_SIZE > &  result 
)

◆ div() [2/3]

template<typename T , size_t SIMD_SIZE>
void cppassist::div ( const vector< T, SIMD_SIZE > &  first,
const typename vector< T, SIMD_SIZE >::primitive_type &  scalar,
vector< T, SIMD_SIZE > &  result 
)

◆ add() [3/3]

template<typename T , size_t SIMD_SIZE>
void cppassist::add ( const typename vector< T, SIMD_SIZE >::primitive_type &  scalar,
const vector< T, SIMD_SIZE > &  first,
vector< T, SIMD_SIZE > &  result 
)

◆ sub() [3/3]

template<typename T , size_t SIMD_SIZE>
void cppassist::sub ( const typename vector< T, SIMD_SIZE >::primitive_type &  scalar,
const vector< T, SIMD_SIZE > &  first,
vector< T, SIMD_SIZE > &  result 
)

◆ mul() [3/3]

template<typename T , size_t SIMD_SIZE>
void cppassist::mul ( const typename vector< T, SIMD_SIZE >::primitive_type &  scalar,
const vector< T, SIMD_SIZE > &  first,
vector< T, SIMD_SIZE > &  result 
)

◆ div() [3/3]

template<typename T , size_t SIMD_SIZE>
void cppassist::div ( const typename vector< T, SIMD_SIZE >::primitive_type &  scalar,
const vector< T, SIMD_SIZE > &  first,
vector< T, SIMD_SIZE > &  result 
)

◆ sqrt() [1/5]

template<typename T , size_t SIMD_SIZE>
void cppassist::sqrt ( const vector< T, SIMD_SIZE > &  first,
vector< T, SIMD_SIZE > &  result 
)

◆ aligned_malloc()

void* cppassist::aligned_malloc ( size_t  size,
size_t  alignment 
)
inline

◆ aligned_free()

void cppassist::aligned_free ( void *  ptr)
inline

◆ operator+() [1/12]

auto cppassist::operator+ ( const value< float, 1 > &  first,
const value< float, 1 > &  second 
) -> value<float, 1>
inline

◆ operator-() [1/12]

auto cppassist::operator- ( const value< float, 1 > &  first,
const value< float, 1 > &  second 
) -> value<float, 1>
inline

◆ operator*() [1/12]

auto cppassist::operator* ( const value< float, 1 > &  first,
const value< float, 1 > &  second 
) -> value<float, 1>
inline

◆ operator/() [1/12]

auto cppassist::operator/ ( const value< float, 1 > &  first,
const value< float, 1 > &  second 
) -> value<float, 1>
inline

◆ operator+() [2/12]

auto cppassist::operator+ ( const value< float, 1 > &  first,
const value< float, 1 >::primitive_type &  scalar 
) -> value<float, 1>
inline

◆ operator-() [2/12]

auto cppassist::operator- ( const value< float, 1 > &  first,
const value< float, 1 >::primitive_type &  scalar 
) -> value<float, 1>
inline

◆ operator*() [2/12]

auto cppassist::operator* ( const value< float, 1 > &  first,
const value< float, 1 >::primitive_type &  scalar 
) -> value<float, 1>
inline

◆ operator/() [2/12]

auto cppassist::operator/ ( const value< float, 1 > &  first,
const value< float, 1 >::primitive_type &  scalar 
) -> value<float, 1>
inline

◆ operator+() [3/12]

auto cppassist::operator+ ( const value< float, 1 >::primitive_type &  scalar,
const value< float, 1 > &  other 
) -> value<float, 1>
inline

◆ operator-() [3/12]

auto cppassist::operator- ( const value< float, 1 >::primitive_type &  scalar,
const value< float, 1 > &  other 
) -> value<float, 1>
inline

◆ operator*() [3/12]

auto cppassist::operator* ( const value< float, 1 >::primitive_type &  scalar,
const value< float, 1 > &  other 
) -> value<float, 1>
inline

◆ operator/() [3/12]

auto cppassist::operator/ ( const value< float, 1 >::primitive_type &  scalar,
const value< float, 1 > &  other 
) -> value<float, 1>
inline

◆ sqrt() [2/5]

auto cppassist::sqrt ( const value< float, 1 > &  first) -> value<float, 1>
inline

References sqrt().

◆ operator+() [4/12]

auto cppassist::operator+ ( const value< float, 16 > &  first,
const value< float, 16 > &  second 
) -> value<float, 16>
inline

◆ operator-() [4/12]

auto cppassist::operator- ( const value< float, 16 > &  first,
const value< float, 16 > &  second 
) -> value<float, 16>
inline

◆ operator*() [4/12]

auto cppassist::operator* ( const value< float, 16 > &  first,
const value< float, 16 > &  second 
) -> value<float, 16>
inline

◆ operator/() [4/12]

auto cppassist::operator/ ( const value< float, 16 > &  first,
const value< float, 16 > &  second 
) -> value<float, 16>
inline

◆ operator+() [5/12]

auto cppassist::operator+ ( const value< float, 16 > &  first,
const value< float, 16 >::primitive_type &  scalar 
) -> value<float, 16>
inline

◆ operator-() [5/12]

auto cppassist::operator- ( const value< float, 16 > &  first,
const value< float, 16 >::primitive_type &  scalar 
) -> value<float, 16>
inline

◆ operator*() [5/12]

auto cppassist::operator* ( const value< float, 16 > &  first,
const value< float, 16 >::primitive_type &  scalar 
) -> value<float, 16>
inline

◆ operator/() [5/12]

auto cppassist::operator/ ( const value< float, 16 > &  first,
const value< float, 16 >::primitive_type &  scalar 
) -> value<float, 16>
inline

◆ operator+() [6/12]

auto cppassist::operator+ ( const value< float, 16 >::primitive_type &  scalar,
const value< float, 16 > &  other 
) -> value<float, 16>
inline

◆ operator-() [6/12]

auto cppassist::operator- ( const value< float, 16 >::primitive_type &  scalar,
const value< float, 16 > &  other 
) -> value<float, 16>
inline

◆ operator*() [6/12]

auto cppassist::operator* ( const value< float, 16 >::primitive_type &  scalar,
const value< float, 16 > &  other 
) -> value<float, 16>
inline

◆ operator/() [6/12]

auto cppassist::operator/ ( const value< float, 16 >::primitive_type &  scalar,
const value< float, 16 > &  other 
) -> value<float, 16>
inline

◆ sqrt() [3/5]

auto cppassist::sqrt ( const value< float, 16 > &  first) -> value<float, 16>
inline

◆ operator+() [7/12]

auto cppassist::operator+ ( const value< float, 4 > &  first,
const value< float, 4 > &  second 
) -> value<float, 4>
inline

◆ operator-() [7/12]

auto cppassist::operator- ( const value< float, 4 > &  first,
const value< float, 4 > &  second 
) -> value<float, 4>
inline

◆ operator*() [7/12]

auto cppassist::operator* ( const value< float, 4 > &  first,
const value< float, 4 > &  second 
) -> value<float, 4>
inline

◆ operator/() [7/12]

auto cppassist::operator/ ( const value< float, 4 > &  first,
const value< float, 4 > &  second 
) -> value<float, 4>
inline

◆ operator+() [8/12]

auto cppassist::operator+ ( const value< float, 4 > &  first,
const value< float, 4 >::primitive_type &  scalar 
) -> value<float, 4>
inline

◆ operator-() [8/12]

auto cppassist::operator- ( const value< float, 4 > &  first,
const value< float, 4 >::primitive_type &  scalar 
) -> value<float, 4>
inline

◆ operator*() [8/12]

auto cppassist::operator* ( const value< float, 4 > &  first,
const value< float, 4 >::primitive_type &  scalar 
) -> value<float, 4>
inline

◆ operator/() [8/12]

auto cppassist::operator/ ( const value< float, 4 > &  first,
const value< float, 4 >::primitive_type &  scalar 
) -> value<float, 4>
inline

◆ operator+() [9/12]

auto cppassist::operator+ ( const value< float, 4 >::primitive_type &  scalar,
const value< float, 4 > &  other 
) -> value<float, 4>
inline

◆ operator-() [9/12]

auto cppassist::operator- ( const value< float, 4 >::primitive_type &  scalar,
const value< float, 4 > &  other 
) -> value<float, 4>
inline

◆ operator*() [9/12]

auto cppassist::operator* ( const value< float, 4 >::primitive_type &  scalar,
const value< float, 4 > &  other 
) -> value<float, 4>
inline

◆ operator/() [9/12]

auto cppassist::operator/ ( const value< float, 4 >::primitive_type &  scalar,
const value< float, 4 > &  other 
) -> value<float, 4>
inline

◆ sqrt() [4/5]

auto cppassist::sqrt ( const value< float, 4 > &  first) -> value<float, 4>
inline

◆ operator+() [10/12]

auto cppassist::operator+ ( const value< float, 8 > &  first,
const value< float, 8 > &  second 
) -> value<float, 8>
inline

◆ operator-() [10/12]

auto cppassist::operator- ( const value< float, 8 > &  first,
const value< float, 8 > &  second 
) -> value<float, 8>
inline

◆ operator*() [10/12]

auto cppassist::operator* ( const value< float, 8 > &  first,
const value< float, 8 > &  second 
) -> value<float, 8>
inline

◆ operator/() [10/12]

auto cppassist::operator/ ( const value< float, 8 > &  first,
const value< float, 8 > &  second 
) -> value<float, 8>
inline

◆ operator+() [11/12]

auto cppassist::operator+ ( const value< float, 8 > &  first,
const value< float, 8 >::primitive_type &  scalar 
) -> value<float, 8>
inline

◆ operator-() [11/12]

auto cppassist::operator- ( const value< float, 8 > &  first,
const value< float, 8 >::primitive_type &  scalar 
) -> value<float, 8>
inline

◆ operator*() [11/12]

auto cppassist::operator* ( const value< float, 8 > &  first,
const value< float, 8 >::primitive_type &  scalar 
) -> value<float, 8>
inline

◆ operator/() [11/12]

auto cppassist::operator/ ( const value< float, 8 > &  first,
const value< float, 8 >::primitive_type &  scalar 
) -> value<float, 8>
inline

◆ operator+() [12/12]

auto cppassist::operator+ ( const value< float, 8 >::primitive_type &  scalar,
const value< float, 8 > &  other 
) -> value<float, 8>
inline

◆ operator-() [12/12]

auto cppassist::operator- ( const value< float, 8 >::primitive_type &  scalar,
const value< float, 8 > &  other 
) -> value<float, 8>
inline

◆ operator*() [12/12]

auto cppassist::operator* ( const value< float, 8 >::primitive_type &  scalar,
const value< float, 8 > &  other 
) -> value<float, 8>
inline

◆ operator/() [12/12]

auto cppassist::operator/ ( const value< float, 8 >::primitive_type &  scalar,
const value< float, 8 > &  other 
) -> value<float, 8>
inline

◆ sqrt() [5/5]

auto cppassist::sqrt ( const value< float, 8 > &  first) -> value<float, 8>
inline

◆ traverse()

template<typename Callback , typename Vector , typename... Vectors>
void cppassist::traverse ( Callback  callback,
Vector &&  vector,
Vectors &&...  vectors 
)
inline

◆ traverse_mt()

template<typename Callback , typename Vector , typename... Vectors>
void cppassist::traverse_mt ( Callback  callback,
Vector &&  vector,
Vectors &&...  vectors 
)
inline

◆ getNumberOfThreads()

CPPASSIST_API size_t cppassist::getNumberOfThreads ( )

Get optimal number of threads for parallelization.

Returns
Number of threads

◆ forEach()

template<typename T >
void cppassist::forEach ( start,
end,
typename identity< std::function< void(T)>>::type  callback,
bool  parallelize = true 
)

Call a function on each iteration of a loop.

Parameters
[in]startStart value
[in]endEnd value (must be >= start!)
[in]callbackFunction that is called on each iteration
[in]parallelizetrue to parallelize the execution (if possible), else false
Remarks
Both start and end must be enumerable typed that support the + operator.

References parallelFor(), and sequentialFor().

Referenced by traverse_mt().

◆ parallelFor() [1/3]

template<typename T >
void cppassist::parallelFor ( start,
end,
typename identity< std::function< void(T)>>::type  callback 
)

Call a function on each iteration of a loop (parallelized in threads)

Parameters
[in]startStart value
[in]endEnd value (must be >= start!)
[in]callbackFunction that is called on each iteration
Remarks
Both start and end must be enumerable typed that support the + operator.

References numberOfThreads.

Referenced by forEach(), and parallelFor().

◆ parallelFor() [2/3]

template<typename T >
void cppassist::parallelFor ( const std::vector< T > &  elements,
typename identity< std::function< void(const T &element)>>::type  callback 
)

Call a function on each item of a list (parallelized in threads)

Parameters
[in]elementsList of elements
[in]callbackFunction that is called on each iteration

References parallelFor().

◆ parallelFor() [3/3]

template<typename T >
void cppassist::parallelFor ( std::vector< T > &  elements,
typename identity< std::function< void(T &element)>>::type  callback 
)

Call a function on each item of a list (parallelized in threads)

Parameters
[in]elementsList of elements
[in]callbackFunction that is called on each iteration

References parallelFor().

◆ sequentialFor() [1/3]

template<typename T >
void cppassist::sequentialFor ( start,
end,
typename identity< std::function< void(T)>>::type  callback 
)

Call a function on each iteration of a loop (sequential)

Parameters
[in]startStart value
[in]endEnd value (must be >= start!)
[in]callbackFunction that is called on each iteration
Remarks
Both start and end must be enumerable typed that support the + operator.

Referenced by forEach(), and sequentialFor().

◆ sequentialFor() [2/3]

template<typename T >
void cppassist::sequentialFor ( const std::vector< T > &  elements,
typename identity< std::function< void(const T &element)>>::type  callback 
)

Call a function on each item of a list (sequential)

Parameters
[in]elementsList of elements
[in]callbackFunction that is called on each iteration

References sequentialFor().

◆ sequentialFor() [3/3]

template<typename T >
void cppassist::sequentialFor ( std::vector< T > &  elements,
typename identity< std::function< void(T &element)>>::type  callback 
)

Call a function on each item of a list (sequential)

Parameters
[in]elementsList of elements
[in]callbackFunction that is called on each iteration

References sequentialFor().

Variable Documentation

◆ numberOfThreads

const auto cppassist::numberOfThreads = getNumberOfThreads()

Referenced by parallelFor().