chsvlib
chsv helper source code
chsvbase.h File Reference

The base configuration file for the chsvcode entities containing definitions. More...

Macros

#define RESOLVE_NAMESPACE(namespace_name)   namespace_name::
 Resolves the specified namespace. The macro is defined so that the client code can be compiled by both C and C++ compilers.
 
#define GLOBAL_NAMESPACE
 A macro used with RESOLVE_NAMESPACE to specify the global namespace.
 
#define CHUSOV_BEGIN   namespace Chusov {
 Defines the beginning of the Chusov namespace.
 
#define CHUSOV_END   }
 Defines the end of the Chusov namespace.
 
#define CHECKMASKFLAG(mask, flag)   (((mask) & (flag)) == (flag))
 Macro for checking state of the bits specified by flags in the bit mask mask. More...
 
#define CHSV_DECLARE_HANDLE(name)   typedef struct chsvtag_##name {int unused;} *name;
 Macro for defining descriptors within the chsvcode library, it's an analogue of the windows' DECLARE_HANDLE macro defined to avoid necessity to include Windows headers.
 
#define IS_BITSHIFT_ARITHMETIC   ((-1 >> 1) == -1)
 True if calling the builtin right-shift operator on a signed integer invokes an arithmetic shift to the right.
 
#define MAKE_WIDE(str)   IMPL_MAKE_WIDE(str)
 
#define __WFILE__   MAKE_WIDE(__FILE__)
 Resolves to a wide string version of the string given by the standard FILE(http://www.cplusplus.com/doc/tutorial/preprocessor/) macro.
 
#define __wfunc__   MAKE_WIDE(__func__)
 Valid only in a function. Defines a name of an enclosing function as a wide string literal. This is a wide version of the standard func macro which is also implemented by the library for those compilers that do not support the one.
 
#define STRINGIFY(X)   IMPL_STRINGIFY(X)
 Resolves to a single-byte C string with the parameter in double quotation marks. More...
 
#define STRINGIFYW(X)   MAKE_WIDE(IMPL_STRINGIFY(X))
 Resolves to a wide C string with the parameter in double quotation marks. More...
 
#define UNREFERENCED_PARAMETER(param)   (param)
 
#define array_size(x)   (sizeof(x) / sizeof(x[0]))
 Returns a number of elements in an array. More...
 
#define STRONGLY_TYPED_ENUM_BEGIN(type)   enum class type {
 A directive resolved to a beginning of a strongly typed enumeration declaration. The latter is emulated on pre-C++11 compilers using namespaces and C++03 enumerations.
 
#define STRONGLY_TYPED_ENUM_END   };
 A directive resolved to an ending of a strongly typed enumeration declaration. The latter is emulated on pre-C++11 compilers using namespaces and C++03 enumerations.
 
#define STRONGLY_TYPED_ENUM_TYPE(type)   type
 A directive resolving a strongly typed enumeration name with accordance to STRONGLY_TYPED_ENUM_BEGIN and STRONGLY_TYPED_ENUM_END.
 
#define EXPLICIT_CAST_OPERATOR   explicit operator
 A directive resolved to an explicit cast operator on C++11 compilers or to an ordinary cast operator on older ones.
 
#define EXTERN_C   extern "C"
 Resolves to an external C linkage specifier.
 
#define NORETURN   [[noreturn]]
 Resolves to the C++11 attribute specifying that any function with it will not return on some reason (e.g. due to program termination, exception throw etc.), so the rest of the code within the function will not be executed. If the statement attribute makes is false, the behavior is undefined. More...
 
#define CHSV_TRY   try {
 Start of C-compatible C++ exception guard block.
 
#define CHSV_CATCH_ALL   }catch(...) {
 End of C-compatible C++ exception guard block and start for a handler block.
 
#define CHSV_RERAISE_CATCH   throw; }
 End of C-compatible C++ exception handler block with rethrowing of all of the handled exceptions.
 
#define CHSV_CATCH_END   }
 End of C-compatible C++ exception handler block.
 
#define BYTE_ORDER_LE
 Resolves to 1, if the target machine implements the Little-Endian byte order, or to 0 otherwise.
 
#define BYTE_ORDER_BE
 Resolves to 1, if the target machine implements the Big-Endian byte order, or to 0 otherwise.
 
#define BYTE_ORDER
 Resolves to BYTE_ORDER_LE, if the target machine implements the Little-Endian byte order, or to BYTE_ORDER_BE otherwise.
 
#define IntelX86
 Resolves to 1, if the target architecture is 32 bit Intel x86, or to 0 otherwise.
 
#define IntelX86_64
 Resolves to 1, if the target architecture is Intel x86-64, or to 0 otherwise.
 
#define COMPILER_SUPPORTS_MMX
 Resolves to 1, if the compiler known to generate and recognize, and the target architecture is perhaps capable to execute, instructions of the Intel MMX instruction set. Otherwise the macro resolves to 0. More...
 
#define COMPILER_SUPPORTS_SSE
 Resolves to 1, if the compiler known to generate and recognize, and the target architecture is perhaps capable to execute, instructions of the Intel SSE instruction set. Otherwise the macro resolves to 0. More...
 
#define COMPILER_SUPPORTS_MMX
 Resolves to 1, if the compiler known to generate and recognize, and the target architecture is perhaps capable to execute, instructions of the Intel MMX instruction set. Otherwise the macro resolves to 0. More...
 
#define COMPILER_SUPPORTS_SSE
 Resolves to 1, if the compiler known to generate and recognize, and the target architecture is perhaps capable to execute, instructions of the Intel SSE instruction set. Otherwise the macro resolves to 0. More...
 
#define COMPILER_SUPPORTS_SSE2
 Resolves to 1, if the compiler known to generate and recognize, and the target architecture is perhaps capable to execute, instructions of the Intel SSE2 instruction set. Otherwise the macro resolves to 0. More...
 
#define COMPILER_SUPPORTS_SSE3
 Resolves to 1, if the compiler known to generate and recognize, and the target architecture is perhaps capable to execute, instructions of the Intel SSE3 instruction set. Otherwise the macro resolves to 0. More...
 
#define COMPILER_SUPPORTS_SSSE3
 Resolves to 1, if the compiler known to generate and recognize, and the target architecture is perhaps capable to execute, instructions of the Intel SSSE3 instruction set. Otherwise the macro resolves to 0. More...
 
#define COMPILER_SUPPORTS_SSE4_1
 Resolves to 1, if the compiler known to generate and recognize, and the target architecture is perhaps capable to execute, instructions of the Intel SSE4_1 instruction set. Otherwise the macro resolves to 0. More...
 
#define COMPILER_SUPPORTS_SSE4_2
 Resolves to 1, if the compiler known to generate and recognize, and the target architecture is perhaps capable to execute, instructions of the Intel SSE4_2 instruction set. Otherwise the macro resolves to 0. More...
 
#define COMPILER_SUPPORTS_AVX
 Resolves to 1, if the compiler known to generate and recognize, and the target architecture is perhaps capable to execute, instructions of the Intel AVX instruction set. Otherwise the macro resolves to 0. More...
 
#define COMPILER_SUPPORTS_AVX2
 Resolves to 1, if the compiler known to generate and recognize, and the target architecture is perhaps capable to execute, instructions of the Intel AVX2 instruction set. Otherwise the macro resolves to 0. More...
 
#define COMPILER_SUPPORTS_AVX512F
 Resolves to 1, if the compiler known to generate and recognize, and the target architecture is perhaps capable to execute, instructions of the Intel AVX512F instruction set. Otherwise the macro resolves to 0. More...
 
#define COMPILER_SUPPORTS_AVX512BW
 Resolves to 1, if the compiler known to generate and recognize, and the target architecture is perhaps capable to execute, instructions of the Intel AVX512BW instruction set. Otherwise the macro resolves to 0. More...
 
#define COMPILER_SUPPORTS_AVX512CD
 Resolves to 1, if the compiler known to generate and recognize, and the target architecture is perhaps capable to execute, instructions of the Intel AVX512CD instruction set. Otherwise the macro resolves to 0. More...
 
#define COMPILER_SUPPORTS_AVX512VL
 Resolves to 1, if the compiler known to generate and recognize, and the target architecture is perhaps capable to execute, instructions of the Intel AVX512VL instruction set. Otherwise the macro resolves to 0. More...
 
#define COMPILER_SUPPORTS_AVX512ER
 Resolves to 1, if the compiler known to generate and recognize, and the target architecture is perhaps capable to execute, instructions of the Intel AVX512ER instruction set. Otherwise the macro resolves to 0. More...
 
#define COMPILER_SUPPORTS_AVX512PF
 Resolves to 1, if the compiler known to generate and recognize, and the target architecture is perhaps capable to execute, instructions of the Intel AVX512PF instruction set. Otherwise the macro resolves to 0. More...
 

Detailed Description

The base configuration file for the chsvcode entities containing definitions.

Warning
Do not include this file directly.