Skip to content

Commit ad94562

Browse files
authored
Merge pull request #3 from oneapi-src/master
Update 08.20.20
2 parents 11fdd3b + fc69f8e commit ad94562

File tree

244 files changed

+22135
-18
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

244 files changed

+22135
-18
lines changed

DirectProgramming/C++/CombinationalLogic/MandelbrotOMP/sample.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "Calculates the mandelbrot set and outputs a bmp image representation using OpenMP*",
44
"categories": ["Toolkit/Intel® oneAPI HPC Toolkit"],
55
"os": ["linux", "darwin"],
6-
"builder": ["cmake"],
6+
"builder": ["make"],
77
"languages": [{"cpp":{}}],
88
"toolchain": ["icc"],
99
"guid": "DD113F58-4D91-41BB-B46E-6CF2C0D9F6F9",

DirectProgramming/C++/CompilerInfrastructure/Intrinsics/sample.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "Demonstrates the intrinsic functions of the Intel® C++ Compiler",
44
"categories": ["Toolkit/Intel® oneAPI HPC Toolkit"],
55
"os": ["linux", "darwin"],
6-
"builder": ["cmake"],
6+
"builder": ["make"],
77
"languages": [{"cpp":{}}],
88
"toolchain": ["icc"],
99
"guid": "ACD0E89E-67CC-4CB4-87AB-B12B84962EAF",

DirectProgramming/C++/GraphTraversal/MergesortOMP/sample.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "Classic sorting algorithm using OpenMP*",
44
"categories": ["Toolkit/Intel® oneAPI HPC Toolkit"],
55
"os": ["linux", "darwin"],
6-
"builder": ["cmake"],
6+
"builder": ["make"],
77
"languages": [{"cpp":{}}],
88
"toolchain": ["icc"],
99
"guid": "5AFED65F-F725-411D-B21C-B59008D1166D",

DirectProgramming/DPC++/CombinationalLogic/mandelbrot/License.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright Intel Corporation
1+
Copyright 2019 Intel Corporation
22

33
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:
44

DirectProgramming/DPC++/CombinationalLogic/mandelbrot/mandelbrot.vcxproj

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@
114114
<Link>
115115
<SubSystem>Console</SubSystem>
116116
<GenerateDebugInformation>true</GenerateDebugInformation>
117-
<AdditionalDependencies>$(ONEAPI_ROOT)\compiler\latest\windows\bin\libsycl-complex.o</AdditionalDependencies>
118117
</Link>
119118
</ItemDefinitionGroup>
120119
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -152,10 +151,9 @@
152151
<EnableCOMDATFolding>true</EnableCOMDATFolding>
153152
<OptimizeReferences>true</OptimizeReferences>
154153
<GenerateDebugInformation>true</GenerateDebugInformation>
155-
<AdditionalDependencies>$(ONEAPI_ROOT)\compiler\latest\windows\bin\libsycl-complex.o</AdditionalDependencies>
156154
</Link>
157155
</ItemDefinitionGroup>
158156
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
159157
<ImportGroup Label="ExtensionTargets">
160158
</ImportGroup>
161-
</Project>
159+
</Project>

DirectProgramming/DPC++/CombinationalLogic/mandelbrot/src/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -std=c++17")
22
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}")
33

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

88
add_executable(mandelbrot_usm main.cpp)
99
target_compile_definitions(mandelbrot_usm PRIVATE MANDELBROT_USM)
10-
target_link_libraries(mandelbrot_usm OpenCL sycl $ENV{ONEAPI_ROOT}/compiler/latest/linux/lib/libsycl-complex.o)
11-
add_custom_target(run_usm ${CMAKE_COMMAND} -E env SYCL_BE=PI_OPENCL ./mandelbrot_usm)
10+
target_link_libraries(mandelbrot_usm OpenCL sycl)
11+
add_custom_target(run_usm ./mandelbrot_usm)

DirectProgramming/DPC++/CombinationalLogic/mandelbrot/src/mandel.hpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ struct MandelParameters {
3333
int max_iterations_;
3434

3535
typedef std::complex<float> ComplexF;
36+
static std::complex<float> complex_square( std::complex<float> c)
37+
{
38+
return std::complex<float>( c.real()*c.real() - c.imag()*c.imag(), c.real()*c.imag()*2 );
39+
}
3640

3741
MandelParameters(int row_count, int col_count, int max_iterations)
3842
: row_count_(row_count),
@@ -41,7 +45,7 @@ struct MandelParameters {
4145

4246
int row_count() const { return row_count_; }
4347
int col_count() const { return col_count_; }
44-
int max_iterations() const { return max_iterations_; }
48+
int max_iterations() const { return max_iterations_; }
4549

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

66-
z = z * z + c;
70+
// z = z * z + c;
71+
z = complex_square(z) + c;
6772
count++;
6873
}
6974

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# required cmake version
2+
cmake_minimum_required(VERSION 3.5)
3+
4+
project (PrefixSum)
5+
6+
if(WIN32)
7+
set(CMAKE_CXX_COMPILER "dpcpp")
8+
else()
9+
set(CMAKE_CXX_COMPILER "dpcpp")
10+
endif()
11+
12+
# Set default build type to RelWithDebInfo if not specified
13+
if (NOT CMAKE_BUILD_TYPE)
14+
message (STATUS "Default CMAKE_BUILD_TYPE not set using Release with Debug Info")
15+
set (CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE
16+
STRING "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel"
17+
FORCE)
18+
endif()
19+
20+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -fsycl -std=c++17")
21+
22+
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lOpenCL -lsycl")
23+
24+
add_executable (PrefixSum src/PrefixSum.cpp)
25+
26+
add_custom_target (run
27+
COMMAND PrefixSum 21 47
28+
WORKING_DIRECTORY ${CMAKE_PROJECT_DIR}
29+
)
30+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Copyright Intel Corporation
2+
3+
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:
4+
5+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6+
7+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 16
4+
VisualStudioVersion = 16.0.29926.136
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PrefixSum", "PrefixSum.vcxproj", "{BC12ABE6-7951-47D6-93DC-126F8A5FCFD2}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|x64 = Debug|x64
11+
Release|x64 = Release|x64
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{BC12ABE6-7951-47D6-93DC-126F8A5FCFD2}.Debug|x64.ActiveCfg = Debug|x64
15+
{BC12ABE6-7951-47D6-93DC-126F8A5FCFD2}.Debug|x64.Build.0 = Debug|x64
16+
{BC12ABE6-7951-47D6-93DC-126F8A5FCFD2}.Release|x64.ActiveCfg = Release|x64
17+
{BC12ABE6-7951-47D6-93DC-126F8A5FCFD2}.Release|x64.Build.0 = Release|x64
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
GlobalSection(ExtensibilityGlobals) = postSolution
23+
SolutionGuid = {9B9594EB-112B-4FAE-AD1F-04BD8FF34B9F}
24+
EndGlobalSection
25+
EndGlobal
Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup Label="ProjectConfigurations">
4+
<ProjectConfiguration Include="Debug|x64">
5+
<Configuration>Debug</Configuration>
6+
<Platform>x64</Platform>
7+
</ProjectConfiguration>
8+
<ProjectConfiguration Include="Release|x64">
9+
<Configuration>Release</Configuration>
10+
<Platform>x64</Platform>
11+
</ProjectConfiguration>
12+
</ItemGroup>
13+
<ItemGroup>
14+
<ClCompile Include="src\PrefixSum.cpp" />
15+
</ItemGroup>
16+
<PropertyGroup Label="Globals">
17+
<VCProjectVersion>15.0</VCProjectVersion>
18+
<ProjectGuid>{bc12abe6-7951-47d6-93dc-126f8a5fcfd2}</ProjectGuid>
19+
<Keyword>Win32Proj</Keyword>
20+
<RootNamespace>PrefixSum</RootNamespace>
21+
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
22+
</PropertyGroup>
23+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
24+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
25+
<ConfigurationType>Application</ConfigurationType>
26+
<UseDebugLibraries>true</UseDebugLibraries>
27+
<PlatformToolset>Intel(R) oneAPI DPC++ Compiler</PlatformToolset>
28+
<CharacterSet>Unicode</CharacterSet>
29+
</PropertyGroup>
30+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
31+
<ConfigurationType>Application</ConfigurationType>
32+
<UseDebugLibraries>false</UseDebugLibraries>
33+
<PlatformToolset>Intel(R) oneAPI DPC++ Compiler</PlatformToolset>
34+
<WholeProgramOptimization>true</WholeProgramOptimization>
35+
<CharacterSet>Unicode</CharacterSet>
36+
</PropertyGroup>
37+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
38+
<ConfigurationType>Application</ConfigurationType>
39+
<UseDebugLibraries>true</UseDebugLibraries>
40+
<PlatformToolset>Intel(R) oneAPI DPC++ Compiler</PlatformToolset>
41+
<CharacterSet>Unicode</CharacterSet>
42+
</PropertyGroup>
43+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
44+
<ConfigurationType>Application</ConfigurationType>
45+
<UseDebugLibraries>false</UseDebugLibraries>
46+
<PlatformToolset>Intel(R) oneAPI DPC++ Compiler</PlatformToolset>
47+
<WholeProgramOptimization>true</WholeProgramOptimization>
48+
<CharacterSet>Unicode</CharacterSet>
49+
</PropertyGroup>
50+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
51+
<ImportGroup Label="ExtensionSettings">
52+
</ImportGroup>
53+
<ImportGroup Label="Shared">
54+
</ImportGroup>
55+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
56+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
57+
</ImportGroup>
58+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
59+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
60+
</ImportGroup>
61+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
62+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
63+
</ImportGroup>
64+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
65+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
66+
</ImportGroup>
67+
<PropertyGroup Label="UserMacros" />
68+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
69+
<LinkIncremental>true</LinkIncremental>
70+
</PropertyGroup>
71+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
72+
<LinkIncremental>true</LinkIncremental>
73+
</PropertyGroup>
74+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
75+
<LinkIncremental>false</LinkIncremental>
76+
</PropertyGroup>
77+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
78+
<LinkIncremental>false</LinkIncremental>
79+
</PropertyGroup>
80+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
81+
<ClCompile>
82+
<PrecompiledHeader>
83+
</PrecompiledHeader>
84+
<PrecompiledHeaderFile>
85+
</PrecompiledHeaderFile>
86+
</ClCompile>
87+
<Link>
88+
<SubSystem>Console</SubSystem>
89+
<GenerateDebugInformation>true</GenerateDebugInformation>
90+
</Link>
91+
</ItemDefinitionGroup>
92+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
93+
<ClCompile>
94+
<PrecompiledHeader>
95+
</PrecompiledHeader>
96+
<PrecompiledHeaderFile>
97+
</PrecompiledHeaderFile>
98+
<AdditionalIncludeDirectories>%ONEAPI_ROOT%\dev-utilities\latest\include</AdditionalIncludeDirectories>
99+
</ClCompile>
100+
<Link>
101+
<SubSystem>Console</SubSystem>
102+
<GenerateDebugInformation>true</GenerateDebugInformation>
103+
</Link>
104+
</ItemDefinitionGroup>
105+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
106+
<ClCompile>
107+
<PrecompiledHeader>
108+
</PrecompiledHeader>
109+
<PrecompiledHeaderFile>
110+
</PrecompiledHeaderFile>
111+
</ClCompile>
112+
<Link>
113+
<SubSystem>Console</SubSystem>
114+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
115+
<OptimizeReferences>true</OptimizeReferences>
116+
<GenerateDebugInformation>true</GenerateDebugInformation>
117+
</Link>
118+
</ItemDefinitionGroup>
119+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
120+
<ClCompile>
121+
<PrecompiledHeader>
122+
</PrecompiledHeader>
123+
<PrecompiledHeaderFile>
124+
</PrecompiledHeaderFile>
125+
<AdditionalIncludeDirectories>%ONEAPI_ROOT%\dev-utilities\latest\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
126+
</ClCompile>
127+
<Link>
128+
<SubSystem>Console</SubSystem>
129+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
130+
<OptimizeReferences>true</OptimizeReferences>
131+
<GenerateDebugInformation>true</GenerateDebugInformation>
132+
</Link>
133+
</ItemDefinitionGroup>
134+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
135+
<ImportGroup Label="ExtensionTargets">
136+
</ImportGroup>
137+
</Project>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup>
4+
<Filter Include="Source Files">
5+
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
6+
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
7+
</Filter>
8+
<Filter Include="Header Files">
9+
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
10+
<Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions>
11+
</Filter>
12+
<Filter Include="Resource Files">
13+
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
14+
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
15+
</Filter>
16+
</ItemGroup>
17+
<ItemGroup>
18+
<ClCompile Include="src\PrefixSum.cpp">
19+
<Filter>Source Files</Filter>
20+
</ClCompile>
21+
</ItemGroup>
22+
</Project>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
4+
<LocalDebuggerCommandArguments>21 47</LocalDebuggerCommandArguments>
5+
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
6+
</PropertyGroup>
7+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
8+
<LocalDebuggerCommandArguments>21 47</LocalDebuggerCommandArguments>
9+
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
10+
</PropertyGroup>
11+
</Project>

0 commit comments

Comments
 (0)