<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE flagsdescription SYSTEM "http://www.spec.org/dtd/cpuflags2.dtd">

<flagsdescription>

<!-- filename to begin with "Intel-ic17.0-linux64.xml" -->
<filename>Intel-compiler.xml</filename>

<title>SPEC Accel OpenMP Flag Description for the Intel(R) C/C++ Compiler
for IA32 and Intel 64 applications and Intel(R) Fortran Compiler for IA32 and Intel 64
applications</title>

<sw_environment>
<![CDATA[ 
<p><b>AMD BIOS Setting<b></p>
<p><b>Maximum Performance</b></p>
	<p>
		Maximizes performance and minimizes latency with little regard to power consumption.
	</p>
<p><b>SMT Mode</b></p>
	<p>
		Can be used to disable symmetric multithreading. 
		To re-enable SMT, a POWER CYCLE is needed after selecting the 'Auto' option. 
		WARNING - S3 is NOT SUPPORTED on systems where SMT is disabled.
	</p>

<p><b>NUMA node per socket</b></p>
        <p>
		Specifies the number of desired NUMA nodes per socket. Zero will attempt to interleave the two sockets together.
        </p>


<p><b>BIOS settings</b></p>
<p><b>Maximum Performance</b></p>
	<p>
		Mode will maximize the absolute performance of the system without regard for power.
		In this mode, power consumption is a don't care.
		Things like fan speed and heat output of the system may increase in addition to power consumption.
		Efficiency of the system may go down in this mode, but the absolute performance may increase depending on the workload that is running.
	</p>

<p><b>Custom</b></p>
	<p>
		Allows the user to individually modify any of the low-level settings that are preset and unchangeable in any of the other 4 preset modes.
	</p>

<p><b>Hyper-Threading</b></p>
	<p>
		Enabling Hyper-Threading let operating system addresses two virtual or logical cores for a physical presented core.
		Workloads can be shared between virtual or logical cores when possible.
		The main function of hyper-threading is to increase the number of independent instructions in the pipeline for using the processor resources more efficiently.
	</p>

<p><b>C-States</b></p>
	<p>
		Legacy: When "Legacy" is selected, the operating system initiates the C-state transitions.
		For E5/E7 CPUs, ACPI C1/C2/C3 map to Intel C1/C3/C6. For 6500/7500 CPUs, ACPI C1/C3 map to Intel C1/C3 (ACPI C2 is not available).
		Some OS SW may defeat the ACPI mapping (e.g. intel_idle driver).
	</p>
	<p>
		Autonomous: When "Autonomous" is selected, HALT and C1 request get converted to C6 requests in hardware.
	</p>
	<p>
		Disable: When "Disable" is selected, only C0 and C1 are used by the OS. C1 gets enabled automatically when an OS autohalts.
	</p>



<p><b>Platform settings</b></p> 
	<p>
		One or more of the following settings may have been applied to the testbed. 
		If so, the "Platform Notes" section of the report will say so; and you can read below to find out more about what these settings mean.
	</p> 
<p>


]]>
</sw_environment>

<header>
<![CDATA[
<p>Compilers: Intel C/C++/fortran Compiler</p> 
<p>Operating systems: Linux</p> 
]]>
</header>

<!--
******************************************************************************************************
* Compilers
******************************************************************************************************
-->
<flag regexp="(?:/\S+/)?icc\b" class="compiler" name="intel_cc">
   <![CDATA[
      <p> Invoke the Intel C compiler.</p>
   ]]>
</flag>

<flag regexp="(?:/\S+/)?icpc(?=\s|$)" class="compiler" name="intel_CC">
   <![CDATA[
      <p> Invoke the Intel C++ compiler.</p>
   ]]>
</flag>

<flag regexp="(?:/\S+/)?ifort\b" class="compiler" name="intel_f90">
   <![CDATA[
      <p> Invoke the Intel Fortran compiler.</p>
   ]]>
</flag>

<flag regexp="(?:/\S+/)?icx\b" class="compiler" name="intel_icx">
   <![CDATA[
      <p> Invoke the Intel C compiler.</p>
   ]]>
</flag>

<flag regexp="(?:/\S+/)?icpx(?=\s|$)" class="compiler" name="intel_icpx">
   <![CDATA[
      <p> Invoke the Intel C++ compiler.</p>
   ]]>
</flag>

<flag regexp="(?:/\S+/)?ifx\b" class="compiler" name="intel_ifx">
   <![CDATA[
      <p> Invoke the Intel Fortran compiler.</p>
   ]]>
</flag>

<!--
******************************************************************************************************
* Portability
******************************************************************************************************
-->
<flag regexp="-80" class="portability" name="port_80">
      FPORTABILITY flag
</flag>

<flag regexp="-nofor-main" class="portability" name="port_noformain"> No Fortran main method exists, use C equivalent instead. </flag>

<flag regexp="-DSPEC_USE_INNER_SIMD" class="portability" name="declare_use_inner_simd"> Enables the use of nested SIMD statements for OpenMP. </flag>

<!--
******************************************************************************************************
* Optimizations
******************************************************************************************************
-->

<flag regexp="-I.?\s*[^ ]*include[^ ]*" class="optimization" name="Istd"> Adds the directory for include files to the search path at compile time. </flag>

<flag regexp="-I.?\s" class="optimization" name="Istdi"> Adds the directory for include files to the search path at compile time. </flag>

<flag regexp="-L\s*[^ ]*[^ ]*" class="optimization" name="Lstd"> Adds the library directory search path at link time </flag>

<flag regexp="-qopenmp(?=\s|$)" class="optimization" name="f-qopenmp"> 
       Enable the compiler to generate multi-threaded code based on the OpenMP* directives (same as -fopenmp)
</flag>

<flag name="f-qopenmp-offload" class="optimization" regexp="-qopenmp-offload=(host|mic|gfx)(?=\s|$)">
   <![CDATA[
      <p> Enables OpenMP* offloading compilation for target pragmas. This
          option only applies to Intel(R) MIC Architecture and Intel(R)
          Graphics Technology. Enabled by default with -qopenmp.
          Use -qno-openmp-offload to disable.<br />
          Specify kind to specify the default device for target pragmas<br />
            host - allow target code to run on host system while still doing
                   the outlining for offload<br />
            mic  - specify Intel(R) MIC Architecture<br />
            gfx  - specify Intel(R) Graphics Technology</p>
   ]]>
</flag>

<flag name="f-O3" class="optimization" regexp="-O3(?=\s|$)">
   <![CDATA[
          optimize for maximum speed and enable more aggressive optimizations
          that may not improve performance on some programs
   ]]>
</flag>

<flag name="f-xCORE-AVX2" class="optimization" regexp="-xCORE-AVX2(?=\s|$)">
   <![CDATA[
      <p>Code is optimized for Intel(R) processors with support for AVX2 instructions.
      The resulting code may contain unconditional use of features that are not supported
      on other processors. This option also enables new optimizations in addition to
      Intel processor-specific optimizations including advanced data layout and code
      restructuring optimizations to improve memory accesses for Intel processors.</p>

      <p> May generate Intel(R) Advanced Vector Extensions 2 (Intel(R) AVX2), Intel(R) AVX,
      SSE4.2, SSE4.1, SSSE3, SSE3, SSE2, and SSE instructions for Intel(R) processors. </p>

      <p> Do not use this option if you are executing a program on a processor that
      is not an Intel processor. If you use this option on a non-compatible processor
      to compile the main program (in Fortran) or the function main() in C/C++, the
      program will display a fatal run-time error if they are executed on unsupported
      processors. </p>
   ]]>
</flag>

<flag name="f-xCORE-AVX512" class="optimization" regexp="-xCORE-AVX512(?=\s|$)">
   <![CDATA[
      <p>Code is optimized for Intel(R) processors with support for CORE-AVX512 instructions.
      The resulting code may contain unconditional use of features that are not supported 
      on other processors. This option also enables new optimizations in addition to 
      Intel processor-specific optimizations including advanced data layout and code 
      restructuring optimizations to improve memory accesses for Intel processors.</p>

      <p>Do not use this option if you are executing a program on a processor that 
      is not an Intel processor. If you use this option on a non-compatible processor 
      to compile the main program (in Fortran) or the function main() in C/C++, the 
      program will display a fatal run-time error if they are executed on unsupported 
      processors. </p>
   
]]>
</flag>

<flag name="f-xCOMMON-AVX512" class="optimization" regexp="-xCOMMON-AVX512(?=\s|$)">
   <![CDATA[
      <p>May generate Intel(R) Advanced Vector Extensions 512 (Intel(R) AVX-512)
      Foundation instructions, Intel(R) AVX-512 Conflict Detection instructions,
      as well as the instructions enabled with CORE-AVX2.
      Optimizes for Intel(R) processors that support Intel(R) AVX-512 instructions.</p>


]]>
</flag>

<flag name="f-marchcore-avx2" class="optimization" regexp="-march=core-avx2(?=\s|$)">
   <![CDATA[
      <p>May generate Intel® AVX2, AVX, Intel® SSE4.2, SSE4.1, SSSE3, SSE3, SSE2 and SSE instructions
	/arch:core-avx2 is supported on Windows* but -mcore-avx2 is not supported for Linux* 
	or macOS* (use -march=core-avx2 instead)</p>


]]>
</flag>


<flag name="f-fimf-precision" class="optimization" regexp="-fimf-precision=(high|medium|low):([a-z\,/]+)(?=\s|$)">
   <![CDATA[
      <p> -fimf-precision=value[:funclist]<br />
          defines the accuracy (precision) for math library functions<br />
            value    - defined as one of the following values<br />
                       high   - equivalent to max-error = 0.6<br />
                       medium - equivalent to max-error = 4 (DEFAULT)<br />
                       low    - equivalent to accuracy-bits = 11 (single
                                precision); accuracy-bits = 26 (double
                                precision)<br />
            funclist - optional comma separated list of one or more math
                       library functions to which the attribute should be
                       applied</p>
   ]]>
</flag>

<flag name="f-qopt-streaming-stores" class="optimization" regexp="-qopt-streaming-stores.always(?=\s|$)">
   <![CDATA[
      <p>Specifies whether streaming stores are generated:</p>
      <p>always - enables generation of streaming stores under the assumption that the application is memory bound</p>
      <p>auto   - compiler decides when streaming stores are used (DEFAULT)</p>
      <p>never  - disables generation of streaming stores</p>
   ]]>
</flag>

<flag name="f-qopt-prefetch" class="optimization" regexp="-qopt-prefetch=([0-5])(?=\s|$)">
    <![CDATA[
      <p>Enable levels of prefetch insertion, where 0 disables. n may be 0 through 5 inclusive. Default is 2.</p>
    ]]>
</flag>


<flag name="f-no-prec-sqrt" class="optimization" regexp="-no-prec-sqrt(?=\s|$)">
    <![CDATA[
	<p>-prec-sqrt improves precision of floating-point square root. It has a slight impact on speed. -no-prec-sqrt disables this option and enables optimizations that give slightly less precise results than full IEEE division.</p>
    ]]>
</flag>

<flag name="f-no-prec-div" class="optimization" regexp="-no-prec-div(?=\s|$)">
    <![CDATA[
        <p>-prec-div improves precision of floating-point divides. It has a slight impact on speed. -no-prec-div disables this option and enables optimizations that give slightly less precise results than full IEEE division.</p>
    ]]>
</flag>


<flag name="f-ansi-alias" class="optimization" regexp="-ansi-alias(?=\s|$)">
    <![CDATA[
        <p>Enable/disable(DEFAULT) use of ANSI aliasing rules in optimizations; user asserts that the program adheres to these rules.</p>
    ]]>
</flag>

<flag name="f-ipo" class="optimization" regexp="-ipo(?=\s|$)">
    <![CDATA[
        <p>-ipo[n]</p>
	<p>Multi-file ip optimizations that includes:</p>
	<p>- inline function expansion</p>
	<p>- interprocedural constant propogation</p>
	<p>- dead code elimination</p>
	<p>- propagation of function characteristics</p>
	<p>- passing arguments in registers</p>
	<p>- loop-invariant code motion</p>
	(<p>n - number of multi-file objects)</p>
    ]]>
</flag>

<flag name="f-fp-model" class="optimization" regexp="-fp-model\s(except|no\-except|fast\=(1|2)|precise|source|strict|double|extended)(?=\s|$)">
    <![CDATA[
        <p>enable floating point model variation</p>
	<p>[no-]except - enable/disable floating point semantics</p>
	<p>fast[=1|2] - enables more aggressive floating point optimizations</p>
	<p>precise - allows value-safe optimizations</p>
	<p>source - enables intermediates in source precision</p>
	<p>strict - enables -fp-model precise -fp-model except, disables</p>
	<p>contractions and enables pragma stdc fenv_access</p>
	<p>double - rounds intermediates in 53-bit (double) precision</p>
	<p>extended - rounds intermediates in 64-bit (extended) precision</p>
    ]]>
</flag>

<flag name="f-lfftw3" class="other" regexp="-lfftw3(?=\s|$)">
   <![CDATA[
      <p>Link using FFTW 3.3.6 library for Linux. Description from FFTW:<br /><br />
         FFTW lib compiled with -O3 -xCORE-AVX2<br /><br />
         FFTW is a C subroutine library for computing the discrete Fourier transform (DFT) in one or more dimensions, of arbitrary input size, and of both real and complex data (as well as of even/odd data, i.e. the discrete cosine/sine transforms or DCT/DST).</p>
   ]]>
</flag>

</flagsdescription>
