1- < ?xml version="1.0" encoding="utf-8"?>
1+ < ?xml version="1.0" encoding="utf-8" ?>
22<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
33< html xmlns ="http://www.w3.org/1999/xhtml " xml:lang ="en " lang ="en ">
44< head >
55< meta http-equiv ="Content-Type " content ="text/html; charset=utf-8 " />
6- < meta name ="generator " content ="Docutils 0.20.1 : https://docutils.sourceforge.io/ " />
6+ < meta name ="generator " content ="Docutils 0.19 : https://docutils.sourceforge.io/ " />
77< title > Intel® ISPC User's Guide</ title >
88< link rel ="stylesheet " href ="css/style.css " type ="text/css " />
99</ head >
@@ -106,6 +106,7 @@ <h1 class="title">Intel® ISPC User's Guide</h1>
106106< 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 >
107107< 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 >
108108< 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 >
109+ < li > < a class ="reference internal " href ="#updating-ispc-programs-for-changes-in-ispc-1-23-0 "> Updating ISPC Programs For Changes In ISPC 1.23.0</ a > </ li >
109110</ ul >
110111</ li >
111112< li > < a class ="reference internal " href ="#getting-started-with-ispc "> Getting Started with ISPC</ a > < ul >
@@ -552,6 +553,28 @@ <h2>Updating ISPC Programs For Changes In ISPC 1.22.0</h2>
552553< p > Now, command-line switch < cite > --dwarf-version=<n></ cite > forces DWARF format debug info generation
553554on Windows. It allows to debug ISPC code linked with MinGW generated code.</ p >
554555</ div >
556+ < div class ="section " id ="updating-ispc-programs-for-changes-in-ispc-1-23-0 ">
557+ < h2 > Updating ISPC Programs For Changes In ISPC 1.23.0</ h2 >
558+ < p > This release contains the following changes that may affect compatibility with
559+ older versions:</ p >
560+ < ul class ="simple ">
561+ < li > < cite > true</ cite > < cite > bool</ cite > values in storage were changed from < cite > -1</ cite > to < cite > 1</ cite > to match C/C++ ABI.
562+ Previously, ISPC treated < cite > bool</ cite > values similarly to C/C++ in terms of size, but
563+ incorrectly interpreted their actual values. This meant that < cite > true</ cite > in ISPC
564+ might not have translated correctly to true in C/C++. This issue was introduced
565+ in version 1.13.0. Starting now, ISPC correctly stores and interprets < cite > true</ cite >
566+ values in a way that aligns with C/C++ expectations.</ li >
567+ </ ul >
568+ < p > A couple of improvements have been made to variables initialization:</ p >
569+ < ul class ="simple ">
570+ < li > Variables with const qualifiers can be initialized using the values of
571+ previously initialized const variables including arithmetic operations above
572+ them. It now works also with varying types.</ li >
573+ < li > Enumeration type values can be used as constants.</ li >
574+ </ ul >
575+ < p > The result of selection operator can now be used as lvalue if it has suitable
576+ type.</ p >
577+ </ div >
555578</ div >
556579< div class ="section " id ="getting-started-with-ispc ">
557580< h1 > Getting Started with ISPC</ h1 >
@@ -2464,6 +2487,15 @@ <h2>Declarations and Initializers</h2>
24642487 ...
24652488#endif
24662489</ pre >
2490+ < p > However, there is a special case when the only one value is in braces. All
2491+ vector elements are initialized with this value:</ p >
2492+ < pre class ="literal-block ">
2493+ varying int x = { 3, };
2494+ </ pre >
2495+ < p > It is effectively equivalent to:</ p >
2496+ < pre class ="literal-block ">
2497+ varying int x = 3;
2498+ </ pre >
24672499< p > Arrays can be initialized with individual element values in braces:</ p >
24682500< pre class ="literal-block ">
24692501int bar[2][4] = { { 1, 2, 3, 4 }, { 5, 6, 7, 8 } };
@@ -2488,6 +2520,16 @@ <h2>Declarations and Initializers</h2>
24882520Foo fa[2] = { { 1, { 2, 3, 4 } }, { 10, { 20, 30, 40 } } };
24892521// now, fa[1].bar[2] == 40, and so forth
24902522</ pre >
2523+ < p > Variables with const qualifiers can be initialized using the values of
2524+ previously initialized const variables including arithmetic operations above
2525+ them:</ p >
2526+ < pre class ="literal-block ">
2527+ const uniform int x = 1;
2528+ const uniform int y = 1 + 2;
2529+ ...
2530+ const varying int x = { 1, 2, 3, 2 + 2 };
2531+ const varying int y = x * 2;
2532+ </ pre >
24912533</ div >
24922534< div class ="section " id ="expressions ">
24932535< h2 > Expressions</ h2 >
0 commit comments