|
1 | | -<?xml version="1.0" encoding="utf-8" ?> |
| 1 | +<?xml version="1.0" encoding="utf-8"?> |
2 | 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
3 | 3 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
4 | 4 | <head> |
5 | 5 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
6 | | -<meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" /> |
| 6 | +<meta name="generator" content="Docutils 0.20.1: https://docutils.sourceforge.io/" /> |
7 | 7 | <title>Intel® ISPC User's Guide</title> |
8 | 8 | <link rel="stylesheet" href="css/style.css" type="text/css" /> |
9 | 9 | </head> |
@@ -105,6 +105,7 @@ <h1 class="title">Intel® ISPC User's Guide</h1> |
105 | 105 | <li><a class="reference internal" href="#updating-ispc-programs-for-changes-in-ispc-1-19-0">Updating ISPC Programs For Changes In ISPC 1.19.0</a></li> |
106 | 106 | <li><a class="reference internal" href="#updating-ispc-programs-for-changes-in-ispc-1-20-0">Updating ISPC Programs For Changes In ISPC 1.20.0</a></li> |
107 | 107 | <li><a class="reference internal" href="#updating-ispc-programs-for-changes-in-ispc-1-21-0">Updating ISPC Programs For Changes In ISPC 1.21.0</a></li> |
| 108 | +<li><a class="reference internal" href="#updating-ispc-programs-for-changes-in-ispc-1-22-0">Updating ISPC Programs For Changes In ISPC 1.22.0</a></li> |
108 | 109 | </ul> |
109 | 110 | </li> |
110 | 111 | <li><a class="reference internal" href="#getting-started-with-ispc">Getting Started with ISPC</a><ul> |
@@ -543,6 +544,14 @@ <h2>Updating ISPC Programs For Changes In ISPC 1.21.0</h2> |
543 | 544 | <p>Template function specializations with explicit template arguments were introduced to the |
544 | 545 | language, please refer to <a class="reference internal" href="#function-templates">Function Templates</a> section for more details.</p> |
545 | 546 | </div> |
| 547 | +<div class="section" id="updating-ispc-programs-for-changes-in-ispc-1-22-0"> |
| 548 | +<h2>Updating ISPC Programs For Changes In ISPC 1.22.0</h2> |
| 549 | +<p>Template operators with explicit specializations and instantiations were introduced to |
| 550 | +the language. The usage of different function specifiers with templates were fixed and |
| 551 | +aligned, please refer to <a class="reference internal" href="#function-templates">Function Templates</a> section for more details.</p> |
| 552 | +<p>Now, command-line switch <cite>--dwarf-version=<n></cite> forces DWARF format debug info generation |
| 553 | +on Windows. It allows to debug ISPC code linked with MinGW generated code.</p> |
| 554 | +</div> |
546 | 555 | </div> |
547 | 556 | <div class="section" id="getting-started-with-ispc"> |
548 | 557 | <h1>Getting Started with ISPC</h1> |
@@ -1008,8 +1017,10 @@ <h2>Debugging</h2> |
1008 | 1017 | <p>The <tt class="docutils literal"><span class="pre">-g</span></tt> command-line flag can be supplied to the compiler, which causes |
1009 | 1018 | it to generate debugging symbols. The debug info is emitted in DWARF format |
1010 | 1019 | on Linux* and macOS*. The version of the DWARF can be controlled by |
1011 | | -command-line switch <tt class="docutils literal"><span class="pre">--dwarf-version={2,3,4}</span></tt>. On Windows* CodeView format |
1012 | | -is used (not PDB), it's natively supported by Microsoft Visual Studio*. |
| 1020 | +command-line switch <tt class="docutils literal"><span class="pre">--dwarf-version={2,3,4,5}</span></tt>. On Windows* CodeView format |
| 1021 | +is used by default (it's natively supported by Microsoft Visual Studio*) but |
| 1022 | +this switch can force the generation of DWARF format that can be used, e.g., |
| 1023 | +together with MinGW generated code. |
1013 | 1024 | Running <tt class="docutils literal">ispc</tt> programs in the debugger, setting breakpoints, printing out |
1014 | 1025 | variables is just the same as debugging C/C++ programs. Similarly, you can |
1015 | 1026 | directly step up and down the call stack between <tt class="docutils literal">ispc</tt> code and C/C++ |
@@ -3464,6 +3475,23 @@ <h2>Function Templates</h2> |
3464 | 3475 | return a1 * a2; |
3465 | 3476 | } |
3466 | 3477 | </pre> |
| 3478 | +<p>You can use limited number of function specifiers with function templates:</p> |
| 3479 | +<ul class="simple"> |
| 3480 | +<li>The keywords <tt class="docutils literal">export</tt>, <tt class="docutils literal">task</tt>, <tt class="docutils literal">typedef</tt>, <tt class="docutils literal">extern "C"</tt> and <tt class="docutils literal">extern "SYCL"</tt> |
| 3481 | +are not allowed.</li> |
| 3482 | +<li>Calling conventions such as <tt class="docutils literal">__vectorcall</tt> and <tt class="docutils literal">__regcall</tt> must be used in conjunction |
| 3483 | +with <tt class="docutils literal">extern "C"</tt> or <tt class="docutils literal">extern "SYCL"</tt>, so they are not allowed as well.</li> |
| 3484 | +<li>Performance hints like <tt class="docutils literal">inline</tt> and <tt class="docutils literal">noinline</tt> are allowed. Primary template, template |
| 3485 | +specializations and explicit instantiations may have different <tt class="docutils literal">inline</tt> hints.</li> |
| 3486 | +<li>Storage types <tt class="docutils literal">extern</tt> and <tt class="docutils literal">static</tt> are allowed. Template specializations and explicit |
| 3487 | +instantiations must share the same storage type as the primary template. |
| 3488 | +If not specified, the storage type will be inherited from the primary template.</li> |
| 3489 | +<li><tt class="docutils literal">unmasked</tt> specifier is allowed. Template specializations and explicit instantiations |
| 3490 | +must maintain consistency with the primary template regarding the <tt class="docutils literal">unmasked</tt> specifier. |
| 3491 | +You cannot specify <tt class="docutils literal">unmasked</tt> for a template specialization if it was not previously |
| 3492 | +specified for the primary template. If unspecified, it will be inherited from the |
| 3493 | +primary template.</li> |
| 3494 | +</ul> |
3467 | 3495 | </div> |
3468 | 3496 | </div> |
3469 | 3497 | <div class="section" id="the-ispc-standard-library"> |
|
0 commit comments