You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| Hardware | Intel 64 Penryn or newer with SSE4.1 extensions or an ARM64 with NEON extensions
9
+
| Hardware | Intel 64 Penryn or newer with SSE4.1 extensions; or an ARM64 with NEON extensions
10
10
| Compiler Toolchain | Windows* OS: MSVS 2019 installed with Windows* SDK and CMake*; Other platforms: C++11 compiler and CMake*
11
11
| Libraries | Install Render Kit including Intel Implicit SPMD Program Compiler
12
12
13
13
| Optimized Requirements | Description
14
14
| :--- | :---
15
-
| Hardware | Intel 64 Skylake or newer with AVX512 extentions or ARM64 with NEON extensions
15
+
| Hardware | Intel 64 Skylake or newer with AVX512 extensions; or ARM64 with NEON extensions
16
16
17
17
| Objective | Description
18
18
|:--- |:---
@@ -22,27 +22,40 @@ Intel Implicit SPMD Program Compiler (ISPC) optimizes single program multiple da
22
22
23
23
## Purpose
24
24
25
-
This getting started sample program, `simple`, performs an element wise operation on an input float array. The output is written to stdout.
26
-
The sample builds two programs with Intel IPSC. The programs exhibit the same output behavior.
27
-
The first program is targeted to x86_64 systems with SSE2 extensions (introduced in the early 2000s).
28
-
The second program is multitargeted for systems with SSE2, SSE4, AVX (AVX1), AVX2, and AVX512SKX extensions. The program will runtime detect the highest target extension capability. The program will then run the codepath associated with that capability on the target system.
29
-
This initial sample demonstrates Intel ISPC usage with an introductory program running on CPU only. Other Intel Embree and Intel Open VKL sample programs demonstrate usage of ISPC in conjuction with those libraries.
30
-
See more about programming with ISPC with the [documentation](https://ispc.github.io/documentation.html).
25
+
This getting started sample highlights three key basic parts to using Intel ISPC.
26
+
1) the Intel ISPC kernel, `simple`.
27
+
2) kernel linking into a final program
28
+
3) vector hardware extension targeting capability
29
+
30
+
31
+
The `simple` kernel, defined in `simple.ispc`, performs an element wise operation on an input float array. The output is written to stdout.
31
32
32
33
33
34
## Key Implementation Details
34
35
35
-
- Our c++ program has the typical main entry point defined in simple.cpp. The final program is linked to the compiled ISPC kernel function defined in simple.ispc.
36
-
- The function prototype for the kernel is introduced by way of this preprocessor code:
36
+
### The Kernel and Linking (1 and 2)
37
+
38
+
- Our sample programs have the main entry point defined in `simple.cpp`. We compile this source to an object with a C++ compiler.
39
+
-`simple.ispc` contains the implementation of the kernel function. This source is compiled to an object by the Intel ISPC compiler driver `ispc`.
40
+
- The final program is links the C++ object to the Intel ISPC object.
41
+
- Within the C++ source, the function prototype for the kernel is introduced by way of this preprocessor code:
37
42
```
38
43
#include "simple_ispc.h"
39
44
```
40
-
- simple.ispc contains the implementation of the kernel function.
41
-
- The simple_ispc.h header file is generated by the `ispc` compiler driver when it compiles simple.ispc.
42
-
- The first program builds the kernel targeted to SSE2 (Streaming SIMD Extensions 2) ISA extensions introduced on CPUs in the early 2000's.
43
-
- Compiling the second program will create an object per ISA extension target, as well as a primary kernel linking object. All objects are linked to generate the final binary. The program will runtime detect the appropriate codepath for the target platform.
44
45
45
-
###Targeting
46
+
- Key: The simple_ispc.h header file is generated by the `ispc` compiler driver when it compiles simple.ispc.
47
+
48
+
### Single and Multitargeting (3)
49
+
50
+
In this sample, we demonstrate both single and automatic multiple device targeting. Two output programs are built respectively they emit the same output.
51
+
52
+
- The first build target program, `simple`, builds with the simple.ispc kernel targeted to SSE2 (Streaming SIMD Extensions 2) ISA extensions. These extensions were introduced on CPUs in the early 2000's.
53
+
- The second build target program, `simple_multi`, will create an object per ISA extension target, as well as a primary kernel linking object. All objects are then linked to generate the final binary. The program will runtime detect the appropriate codepath for the target platform.
54
+
55
+
This initial sample demonstrates Intel ISPC usage with an introductory program running on CPU only. Other Intel Embree and Intel Open VKL sample programs demonstrate usage of ISPC in conjuction with those libraries.
56
+
See more about programming with Intel ISPC with the [documentation](https://ispc.github.io/documentation.html).
57
+
58
+
### Targeting Documentation
46
59
47
60
- To target ISA extension capability introduced in newer x86_64 processors, see the [targeting table](https://ispc.github.io/ispc.html#selecting-the-compilation-target) in the release notes.
48
61
- For targeting ARM64 with NEON extensions. See the [target selection](https://ispc.github.io/ispc.html#selecting-the-compilation-target) in the release notes. Edit the CMakeLists.txt file accordingly for the build step.
"description": "This introductory rendering toolkit sample demonstrates how to compile basic programs with Intel ISPC and the system compiler. Use this sample to further explore developing accelerated applications with Intel Embree and Intel Open VKL.",
5
+
"description": "This introductory rendering toolkit sample demonstrates how to compile basic programs with Intel ISPC and the system C++ compiler. Use this sample to further explore developing accelerated applications with Intel Embree and Intel Open VKL.",
0 commit comments