diff --git a/include/Random123/features/compilerfeatures.h b/include/Random123/features/compilerfeatures.h index 92b4586..b1935fb 100644 --- a/include/Random123/features/compilerfeatures.h +++ b/include/Random123/features/compilerfeatures.h @@ -40,13 +40,42 @@ and idioms that are either not standardized (e.g., asm statments), or for which different vendors have their own standards (e.g., SSE intrinsics) or for which vendors simply refuse to conform to well-established standards (e.g., ). -Random123/features/compilerfeatures.h -conditionally includes a compiler-or-OS-specific Random123/featires/XXXfeatures.h file which -defines appropriate values for the preprocessor symbols which can be used with -a specific compiler or OS. Those symbols will then -be used by other header files and source files in the Random123 -library (and may be used by applications) to control what actually -gets presented to the compiler. +Random123/features/compilerfeatures.h conditionally includes a +compiler-or-OS-specific Random123/featires/XXXfeatures.h file +which defines a collection of appropriate values for the +preprocessor symbols which can be used with a specific compiler +or OS. Those symbols will then be used by other header files +and source files in the Random123 library (and may be used by +applications) to control what actually gets presented to the compiler. + +By default, compilerfeatures.h tries to use predefined compiler +and architecture symbols (__GNUC__, __CUDACC__, __ICC, __etc) to +decide which XXXfeatures.h to include. This can go wrong (e.g. +compilers other than gcc do defined __GNUC__, pgcc (now nvc) +started defining __CUDACC_) so a variable R123_USE_AUTOFEATURES +(which if undefined, defaults to 1) can be set to 0 to turn off +compiler autodetection and instead, use an R123_XXX symbol to +specify the features file to use. e.g. define R123_PGCCFEATURES +to explicitly request the use of pgccfeatures.h. The following +compiler features collections are presently available as +corresponding features files. You can also include the closest +features file and then override some of its definitions, or just +not define any of these and define the collection of definitions +that works on your compiler invocation via -D or the equivalent. +@verbatim + R123_METALFEATURES + R123_OPENCLFEATURES + R123_ICCFEATURES + R123_XLCFEATURES + R123_PGCCFEATURES + R123_NVCCFEATURES + R123_SUNPROFEATURES + R123_OPEN64FEATURES + R123_CLANGFEATURES + R123_FUJITSUFEATURES + R123_GCCFEATURES + R123_MSVCFEATURES +@endverbatim Most of the symbols are boolean valued. In general, they will \b always be defined with value either 1 or 0, so do @@ -55,13 +84,15 @@ Most of the symbols are boolean valued. In general, they will Library users can override any value by defining the pp-symbol with a compiler option, e.g., - cc -DR123_USE_MULHILO64_C99 + cc -DR123_USE_MULHILO64_C99=1 will use a strictly c99 version of the full-width 64x64->128-bit multiplication function, even if it would be disabled by default. All boolean-valued pre-processor symbols in Random123/features/compilerfeatures.h start with the prefix R123_USE_ @verbatim + AUTOFEATURES + AES_NI AES_OPENSSL SSE4_2 @@ -138,6 +169,20 @@ choose to rely on these: There are also non-boolean valued symbols: +@verbatim +R123_METALFEATURES +R123_OPENCLFEATURES +R123_ICCFEATURES +R123_XLCFEATURES +R123_PGCCFEATURES +R123_NVCCFEATURES +R123_SUNPROFEATURES +R123_OPEN64FEATURES +R123_CLANGFEATURES +R123_FUJITSUFEATURES +R123_GCCFEATURES +R123_MSVCFEATURES +