Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ Mandelbrot is an infinitely complex fractal patterning that is derived from a si

| Optimized for | Description
|:--- |:---
| OS | MacOS Catalina or newer; Linux* Ubuntu* 18.04
| OS | MacOS Catalina or newer;
| Hardware | Skylake with GEN9 or newer
| Software | Intel® C++ Compiler 19.1 or newer
| Software | Intel® oneAPI C++ Compiler Classic
| What you will learn | How to optimize a scalar implementation using OpenMP pragmas
| Time to complete | 15 minutes

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,12 @@
"name": "Mandelbrot OpenMP*",
"description": "Calculates the mandelbrot set and outputs a bmp image representation using OpenMP*",
"categories": ["Toolkit/Intel® oneAPI HPC Toolkit"],
"os": ["linux", "darwin"],
"builder": ["cmake"],
"os": ["darwin"],
"builder": ["make"],
"languages": [{"cpp":{}}],
"toolchain": ["icc"],
"guid": "DD113F58-4D91-41BB-B46E-6CF2C0D9F6F9",
"ciTests": {
"linux": [
{ "id": "standard", "steps": [ "make", "make run", "make clean" ] },
{ "id": "perf_num", "env": [ "export perf_num=1" ], "steps": [ "make", "make run", "make clean" ] }
],
"darwin": [
{ "id": "standard", "steps": [ "make", "make run", "make clean" ] },
{ "id": "perf_num", "env": [ "export perf_num=1" ], "steps": [ "make", "make run", "make clean" ] }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ The intrinsic samples are designed to show how to utilize the intrinsics support

| Optimized for | Description
|:--- |:---
| OS | Linux* Ubuntu* 18.04; MacOS* Catalina* or newer
| OS | MacOS* Catalina* or newer
| Hardware | Skylake with GEN9 or newer
| Software | Intel® C++ Compiler 2021.1 or newer;
| What you will learn | How to utlize intrinsics supported by the Intel® C++ Compiler
| Software | Intel® oneAPI C++ Compiler Classic
| What you will learn | How to utlize intrinsics supported by the Intel® oneAPI C++ Compiler Classic
| Time to complete | 15 minutes


Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
{
"name": "Intrinsics C++",
"description": "Demonstrates the intrinsic functions of the Intel® C++ Compiler",
"description": "Demonstrates the intrinsic functions of the Intel® oneAPI C++ Compiler Classic",
"categories": ["Toolkit/Intel® oneAPI HPC Toolkit"],
"os": ["linux", "darwin"],
"builder": ["cmake"],
"os": ["darwin"],
"builder": ["make"],
"languages": [{"cpp":{}}],
"toolchain": ["icc"],
"guid": "ACD0E89E-67CC-4CB4-87AB-B12B84962EAF",
"ciTests": {
"linux": [
{ "id": "standard", "steps": [ "make", "make run", "make clean" ] },
{ "id": "debug", "steps": [ "make debug", "make debug_run", "make clean" ] }
],
"darwin": [
{ "id": "standard", "steps": [ "make", "make run", "make clean" ] },
{ "id": "debug", "steps": [ "make debug", "make debug_run", "make clean" ] }
Expand Down
6 changes: 3 additions & 3 deletions DirectProgramming/C++/GraphTraversal/MergesortOMP/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ For more details about merge sort algorithm and top-down implementation, please

| Optimized for | Description
|:--- |:---
| OS | Linux* Ubuntu* 18.04; MacOS Catalina or newer
| OS | MacOS Catalina or newer
| Hardware | Skylake with GEN9 or newer
| Software | Intel® C++ Compiler 19.1 or newer;
| What you will learn | How to accelerate a scalar program using OpenMP tasks
| Software | Intel® oneAPI C++ Compiler Classic
| What you will learn | How to accelerate a scalar program using OpenMP* tasks
| Time to complete | 15 minutes

Performance number tabulation
Expand Down
8 changes: 2 additions & 6 deletions DirectProgramming/C++/GraphTraversal/MergesortOMP/sample.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,12 @@
"name": "MergeSort C++/OpenMP*",
"description": "Classic sorting algorithm using OpenMP*",
"categories": ["Toolkit/Intel® oneAPI HPC Toolkit"],
"os": ["linux", "darwin"],
"builder": ["cmake"],
"os": ["darwin"],
"builder": ["make"],
"languages": [{"cpp":{}}],
"toolchain": ["icc"],
"guid": "5AFED65F-F725-411D-B21C-B59008D1166D",
"ciTests": {
"linux": [
{ "id": "standard", "steps": [ "make", "make run", "make clean" ] },
{ "id": "perf_num", "env": [ "export perf_num=1" ], "steps": [ "make", "make run", "make clean" ] }
],
"darwin": [
{ "id": "standard", "steps": [ "make", "make run", "make clean" ] },
{ "id": "perf_num", "env": [ "export perf_num=1" ], "steps": [ "make", "make run", "make clean" ] }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright Intel Corporation
Copyright 2019 Intel Corporation

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ For comprehensive instructions regarding DPC++ Programming, go to https://softwa
|:--- |:---
| OS | Linux* Ubuntu* 18.04; Windows 10
| Hardware | Skylake with GEN9 or newer
| Software | Intel® oneAPI DPC++ Compiler beta;
| What you will learn | How to offload the computation to GPU using Intel DPC++ compiler
| Software | Intel® oneAPI DPC++/C++ Compiler
| What you will learn | How to offload the computation to GPU using the Intel® oneAPI DPC++/C++ Compiler
| Time to complete | 15 minutes

## Purpose
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>$(ONEAPI_ROOT)\compiler\latest\windows\bin\libsycl-complex.o</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
Expand Down Expand Up @@ -152,10 +151,9 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>$(ONEAPI_ROOT)\compiler\latest\windows\bin\libsycl-complex.o</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -std=c++17")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}")

add_executable(mandelbrot main.cpp)
target_link_libraries(mandelbrot OpenCL sycl $ENV{ONEAPI_ROOT}/compiler/latest/linux/lib/libsycl-complex.o)
add_custom_target(run ${CMAKE_COMMAND} -E env SYCL_BE=PI_OPENCL ./mandelbrot)
target_link_libraries(mandelbrot OpenCL sycl)
add_custom_target(run ./mandelbrot)

add_executable(mandelbrot_usm main.cpp)
target_compile_definitions(mandelbrot_usm PRIVATE MANDELBROT_USM)
target_link_libraries(mandelbrot_usm OpenCL sycl $ENV{ONEAPI_ROOT}/compiler/latest/linux/lib/libsycl-complex.o)
add_custom_target(run_usm ${CMAKE_COMMAND} -E env SYCL_BE=PI_OPENCL ./mandelbrot_usm)
target_link_libraries(mandelbrot_usm OpenCL sycl)
add_custom_target(run_usm ./mandelbrot_usm)
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ struct MandelParameters {
int max_iterations_;

typedef std::complex<float> ComplexF;
static std::complex<float> complex_square( std::complex<float> c)
{
return std::complex<float>( c.real()*c.real() - c.imag()*c.imag(), c.real()*c.imag()*2 );
}

MandelParameters(int row_count, int col_count, int max_iterations)
: row_count_(row_count),
Expand All @@ -41,7 +45,7 @@ struct MandelParameters {

int row_count() const { return row_count_; }
int col_count() const { return col_count_; }
int max_iterations() const { return max_iterations_; }
int max_iterations() const { return max_iterations_; }

// Scale from 0..row_count to -1.5..0.5
float ScaleRow(int i) const { return -1.5f + (i * (2.0f / row_count_)); }
Expand All @@ -63,7 +67,8 @@ struct MandelParameters {
break;
}

z = z * z + c;
// z = z * z + c;
z = complex_square(z) + c;
count++;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ For comprehensive instructions regarding DPC++ Programming, go to https://softwa
|:--- |:---
| OS | Linux Ubuntu 18.04, Windows 10
| Hardware | Skylake with GEN9 or newer
| Software | Intel&reg; oneAPI DPC++ Compiler (beta)
| What you will learn | The Sepia Filter sample demonstrates the following using the oneAPI DPC++ compiler <ul><li>Writing a custom device selector class</li><li>Offloading compute intensive parts of the application using both lamba and functor kernels</li><li>Measuring kernel execution time by enabling profiling</li></ul>
| Software | Intel&reg; oneAPI DPC++/C++ Compiler
| What you will learn | The Sepia Filter sample demonstrates the following using the Intel&reg; oneAPI DPC++/C++ Compiler <ul><li>Writing a custom device selector class</li><li>Offloading compute intensive parts of the application using both lamba and functor kernels</li><li>Measuring kernel execution time by enabling profiling</li></ul>
| Time to complete | 20 minutes

## Purpose
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"guid": "B9C425DB-A3AD-4FCB-9CA0-1909E5189FB7",
"name": "Sepia Filter",
"categories": ["Toolkit/Intel® oneAPI Base Toolkit/oneAPI DPC++ Compiler/CPU and GPU"],
"categories": ["Toolkit/Intel® oneAPI Base Toolkit/Intel® oneAPI DPC++/C++ Compiler/CPU and GPU"],
"toolchain": ["dpcpp"],
"description": "A program that converts an image to sepia tone",
"languages": [{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ custom types of classes in a DPC++ program
|:--- |:---
| OS | Linux Ubuntu 18.04, Windows 10
| Hardware | Skylake with GEN9 or newer
| Software | Intel&reg; oneAPI DPC++ Compiler (beta)
| Software | Intel&reg; oneAPI DPC++/C++ Compiler
| What you will learn | Using custom type classes and offloads complex number computations to GPU using Intel DPC++
| Time to complete | 15 minutes

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"guid": "D725E06E-0ECE-44F8-910D-AD1A8C89ED89",
"name": "Complex number Multiplication",
"categories": [ "Toolkit/Intel® oneAPI Base Toolkit/oneAPI DPC++ Compiler/CPU and GPU" ],
"categories": [ "Toolkit/Intel® oneAPI Base Toolkit/Intel® oneAPI DPC++/C++ Compiler/CPU and GPU" ],
"description": "program that computes the multiplication of a Complex number",
"toolchain": [ "dpcpp" ],
"languages": [ { "cpp": { "properties": { "projectOptions": [ { "projectType": "makefile" } ] } } } ],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ For comprehensive instructions regarding DPC++ Programming, go to https://softwa
|:--- |:---
| OS | Linux* Ubuntu* 18.04, Windows 10*
| Hardware | Skylake with GEN9 or newer
| Software | Intel&reg; oneAPI DPC++ Compiler beta, Intel&reg; C/C++ Compiler beta
| Software | Intel&reg; oneAPI DPC++/C++ Compiler, Intel&reg; oneAPI C++ Compiler Classic
| What you will learn | Offloads computations on 2D arrays to GPU using Intel DPC++ and OpenMP
| Time to complete | 15 minutes

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ For comprehensive instructions regarding DPC++ Programming, go to https://softwa
|:--- |:---
| OS | Linux* Ubuntu* 18.04, Windows 10
| Hardware | Skylake with GEN9 or newer, Intel(R) Programmable Acceleration Card with Intel(R) Arria(R) 10 GX FPGA
| Software | Intel&reg; oneAPI DPC++ Compiler (beta)
| Software | Intel&reg; oneAPI DPC++/C++ Compiler



Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"guid" : "49C65CB6-F9FA-4E3C-B8BE-4A141E4E0F07",
"name": "Simple Add",
"categories": ["Toolkit/Get Started", "Toolkit/Intel® oneAPI Base Toolkit/oneAPI DPC++ Compiler/CPU, GPU and FPGA"],
"categories": ["Toolkit/Get Started", "Toolkit/Intel® oneAPI Base Toolkit/Intel® oneAPI DPC++/C++ Compiler/CPU, GPU and FPGA"],
"description": "Simple program that adds two large vectors in parallel. Provides a ‘Hello World!’ like sample to ensure your environment is setup correctly using Data Parallel C++.",
"toolchain": ["dpcpp"],
"languages": [{"cpp": {"properties": {"projectOptions": [{"projectType": "makefile"}]}}}],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ For comprehensive instructions regarding DPC++ Programming, go to https://softwa
|:--- |:---
| OS | Linux* Ubuntu* 18.04, Windows 10
| Hardware | Skylake with GEN9 or newer, Intel(R) Programmable Acceleration Card with Intel(R) Arria(R) 10 GX FPGA
| Software | Intel&reg; oneAPI DPC++ Compiler (beta)
| Software | Intel&reg; oneAPI DPC++/C++ Compiler

## Purpose
The `vector-add` is a simple program that adds two large vectors of integers and verifies the results. This program is implemented using C++ and Data Parallel C++ (DPC++) for Intel(R) CPU and accelerators.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"guid":"b1b58be7-e22e-4ca2-ba59-6887b2f1be6c",
"name": "Vector Add",
"categories": ["Toolkit/Get Started", "Toolkit/Intel® oneAPI Base Toolkit/oneAPI DPC++ Compiler/CPU, GPU and FPGA"],
"categories": ["Toolkit/Get Started", "Toolkit/Intel® oneAPI Base Toolkit/Intel® oneAPI DPC++/C++ Compiler/CPU, GPU and FPGA"],
"description": "Simple program that adds two large vectors in parallel. Provides a ‘Hello World!’ like sample to ensure your environment is setup correctly using simple Data Parallel C++.",
"toolchain": ["dpcpp"],
"languages": [{"cpp": {"properties": {"projectOptions": [{"projectType": "makefile"}]}}}],
Expand Down
13 changes: 8 additions & 5 deletions DirectProgramming/DPC++/GraphTraversal/bitonic-sort/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ and search based on relevant terms noted in the comments.
|:--- |:---
| OS | Linux Ubuntu 18.04
| Hardware | Skylake with GEN9 or newer
| Software | Intel&reg; oneAPI DPC++ Compiler (beta); Intel C++ Compiler (beta)
| What you will learn | Implement bitonic sort using Intel DPC++ compiler
| Software | Intel&reg; oneAPI DPC++/C++ Compiler
| What you will learn | Implement bitonic sort using Intel&reg; oneAPI DPC++/C++ Compiler
| Time to complete | 15 minutes


Expand Down Expand Up @@ -51,7 +51,7 @@ if a compatible GPU is not detected.
## Key Implementation Details

The basic DPC++ implementation explained in the code includes device selector, buffer, accessor, kernel, and command g
roups. Unified Shared Memory (USM) is used for data management.
roups. Unified Shared Memory (USM) and Buffer Object are used for data management.

## License
This code sample is licensed under MIT license
Expand Down Expand Up @@ -117,7 +117,10 @@ the ascending order is verified, the application will display a “Success!” m
$ ./bitonic-sort 21 47
Array size: 2097152, seed: 47
Device: Intel(R) Gen9 HD Graphics NEO
Kernel time: 0.416827 sec
CPU serial time: 0.60523 sec
Warm up ...
Kernel time using USM: 0.248422 sec
Kernel time using buffer allocation: 0.253364 sec
CPU serial time: 0.628803 sec

Success!
```
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"guid": "4D5B57B8-6F34-4A11-89F5-3F07E766DB39",
"name": "bitonic-sort",
"categories": [ "Toolkit/Intel® oneAPI Base Toolkit/oneAPI DPC++ Compiler/CPU and GPU" ],
"categories": [ "Toolkit/Intel® oneAPI Base Toolkit/Intel® oneAPI DPC++/C++ Compiler/CPU and GPU" ],
"description": "Bitonic Sort using Intel® oneAPI DPC++ Language",
"toolchain": [ "dpcpp" ],
"targetDevice": [ "CPU", "GPU" ],
Expand Down
Loading