forked from ComputationalRadiationPhysics/picongpu
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Squashed 'thirdParty/cupla/' changes from f60a0ac72c..ed00837ef6
ed00837ef6 Merge pull request ComputationalRadiationPhysics#163 from psychocoderHPC/fix-atomicFunctions a028b2e3e3 fix atomic function return type b059405c8b Merge pull request ComputationalRadiationPhysics#161 from psychocoderHPC/topic-nativeCuplaUsage 580352ebef usage of cupla without cuda renaming macros 35a564c1c8 Merge pull request ComputationalRadiationPhysics#159 from psychocoderHPC/fix-docuKernelCall b54c71fd15 fix `KernelWithElementLevel` documentation REVERT: f60a0ac72c Merge pull request ComputationalRadiationPhysics#155 from ComputationalRadiationPhysics/dev git-subtree-dir: thirdParty/cupla git-subtree-split: ed00837ef6eecfce7a23577c954cce51e1c6821c
- Loading branch information
1 parent
67867d2
commit 8689202
Showing
15 changed files
with
888 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# | ||
# Copyright 2016-2020 Rene Widera, Benjamin Worpitz, Vincent Ridder | ||
# | ||
# This file is part of cupla. | ||
# | ||
# cupla is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU Lesser General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# cupla is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU Lesser General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU Lesser General Public License | ||
# along with cupla. | ||
# If not, see <http://www.gnu.org/licenses/>. | ||
# | ||
|
||
################################################################################ | ||
# Required CMake version. | ||
################################################################################ | ||
|
||
cmake_minimum_required(VERSION 3.11.4) | ||
|
||
set_property(GLOBAL PROPERTY USE_FOLDERS ON) | ||
|
||
################################################################################ | ||
# Project. | ||
################################################################################ | ||
|
||
project(cuplaVectorAdd) | ||
|
||
################################################################################ | ||
# CMake policies | ||
# | ||
# Search in <PackageName>_ROOT: | ||
# https://cmake.org/cmake/help/v3.12/policy/CMP0074.html# | ||
################################################################################ | ||
|
||
if(POLICY CMP0074) | ||
cmake_policy(SET CMP0074 NEW) | ||
endif() | ||
|
||
################################################################################ | ||
# Find cupla | ||
################################################################################ | ||
|
||
set(cupla_ROOT "$ENV{CUPLA_ROOT}" CACHE STRING "The location of the cupla library") | ||
|
||
list(APPEND CMAKE_MODULE_PATH "${cupla_ROOT}") | ||
find_package(cupla REQUIRED) | ||
|
||
|
||
################################################################################ | ||
# Add library. | ||
################################################################################ | ||
|
||
set(_SOURCE_DIR "src/") | ||
|
||
# Add all the source files in all recursive subdirectories and group them accordingly. | ||
append_recursive_files_add_to_src_group("${_SOURCE_DIR}" "" "cpp" _FILES_SOURCE_CXX) | ||
|
||
# Always add all files to the target executable build call to add them to the build project. | ||
cupla_add_executable(${PROJECT_NAME} ${_FILES_SOURCE_CXX}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# vector add example with native cupla interface | ||
|
||
This example is equal to `vectorAdd` but is not relying on the compatibility header included with (`cuda_to_cupla.hpp`) | ||
to allow the usage of CUDA function names and types. | ||
|
||
CUDA prefixed functions/types are prefix with cupla instead. | ||
CUDA functions/types those are not prefixed life in the namespace `cupla`. | ||
Functions call need always the current used accelerator instance. | ||
Non standard global variables like `threadIdx`, `blockDim` should be used as functions from the namespace `cupla`. |
Oops, something went wrong.