7. AOCL-RNG#
AOCL-RNG supports automatic processor dispatching to optimal code path
based on instruction set architecture (ISA). The environment variable
AOCL_ENABLE_INSTRUCTIONS
enables users to dispatch to preferred
ISA-specific code path. This option allows users to manually choose an
ISA-based code path, which may not necessarily be the optimal one in
certain cases.
Table shows all possible values for AOCL_ENABLE_INSTRUCTIONS
:
Sl No |
AOCL_ENABLE_INSTRUCTIONS Values |
Selected ISA-based Code Path |
---|---|---|
1 |
AVX512 |
AVX512-specific code path or Lesser possible code path |
2 |
AVX2 |
AVX2-specific code path or Lesser possible code path |
3 |
SSE2 |
SSE2-specific code path or Lesser possible code path |
4 |
Generic |
Generic/reference code path |
5 |
any other value |
Ignored so default optimal code path |
Note
All values given above are case-insensitive.
Users may set environment variable using following command.
On Linux
$ export AOCL_ENABLE_INSTRUCTIONS=Value
On Windows:
> set AOCL_ENABLE_INSTRUCTIONS=Value
$ ./get_random
Note:
cc can be gcc or clang.
For clang(aocc) aocl environment setting (first command) should be done after aocc.