[#configuration]
= Configuration

:idprefix: configuration_

The library does not require building or any special configuration to be used.
However, there are a few options that can be enabled by defining macros prior to including library headers.

== Instruction Set

[%autowidth]
|===
|Macro |Description

|`BOOST_UUID_NO_SIMD`
|If defined, disables any optimizations for https://en.wikipedia.org/wiki/SIMD[SIMD]-enabled processors.
 Generic versions of algorithms will be used instead.
 This may result in suboptimal performance.
 By default, optimized algorithms are used, when the library is able to detect the availability of SIMD extensions at compile time.


|`BOOST_UUID_USE_SSE2`
|If defined, enables optimizations for https://en.wikipedia.org/wiki/SSE2[SSE2] extensions available in x86 processors.

|`BOOST_UUID_USE_SSE3`
|If defined, enables optimizations for https://en.wikipedia.org/wiki/SSE3[SSE3] extensions available in x86 processors.

|`BOOST_UUID_USE_SSSE3`
|If defined, enables optimizations for https://en.wikipedia.org/wiki/SSSE3[SSSE3] extensions available in x86 processors.

|`BOOST_UUID_USE_SSE41`
|If defined, enables optimizations for https://en.wikipedia.org/wiki/SSE4#SSE4.1[SSE4.1] extensions available in x86 processors.

|`BOOST_UUID_USE_AVX`
|If defined, enables optimizations for https://en.wikipedia.org/wiki/Advanced_Vector_Extensions[AVX] extensions available in x86 processors.

|`BOOST_UUID_USE_AVX2`
|If defined, enables optimizations for https://en.wikipedia.org/wiki/Advanced_Vector_Extensions#Advanced_Vector_Extensions_2[AVX2] extensions available in x86 processors.

|`BOOST_UUID_USE_AVX512_V1`
|If defined, enables optimizations for https://en.wikipedia.org/wiki/AVX-512[AVX-512] F, VL, CD, BW and DQ extensions available in x86 processors (e.g. in Intel Skylake-X).

|`BOOST_UUID_USE_AVX10_1`
|If defined, enables optimizations for https://en.wikipedia.org/wiki/AVX-512[AVX-512] and https://en.wikipedia.org/wiki/Advanced_Vector_Extensions#AVX10[AVX10.1] extensions available in x86 processors.
 When defined by the user, this macro indicates support for the full set of instructions defined in AVX10.1.
 When auto-detected by the library, this macro may be defined even when not all AVX10.1 subsets are enabled, but rather when the detected subset is sufficient for the library.

|===

By default the library attempts to detect the availability of SIMD extensions in the target CPU at compile time and automatically defines the appropriate macros if succeeded.
The `BOOST_UUID_USE_SSE*` and `BOOST_UUID_USE_AVX*` macros can be defined by users, if auto-detection fails and it is known that the target CPU will have the extension.
Do not enable these extensions unless you're certain that they will always be available on any machine that will run your program.
The library performs no run time checks, so if an extension is missing, the program will likely crash.
Note that enabling more advanced extensions implies that more basic ones are also available.

== Alignment

[%autowidth]
|===
|Macro |Description

|`BOOST_UUID_DISABLE_ALIGNMENT`
|If defined, leaves `uuid` unaligned (alignment of 1, same as `std::uint8_t`). This was the behavior before release 1.86.

|===

By default, `uuid` has the same alignment as `std::uint64_t`. Define `BOOST_UUID_DISABLE_ALIGNMENT` to leave it unaligned.
