Skip to content

Commit

Permalink
Implement atomic_ref, math functions, info descriptors
Browse files Browse the repository at this point in the history
  • Loading branch information
fknorr committed Dec 13, 2023
1 parent 92279f3 commit d5a73c3
Show file tree
Hide file tree
Showing 13 changed files with 734 additions and 240 deletions.
26 changes: 23 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
cmake_minimum_required(VERSION 3.13)

set(SimSYCL_VERSION 0.1)
project(SimSYCL VERSION "${SimSYCL_VERSION}" LANGUAGES CXX)
set(SIMSYCL_VERSION 0.1)
set(SIMSYCL_VERSION_MAJOR 0)
set(SIMSYCL_VERSION_MINOR 1)
set(SIMSYCL_VERSION_PATCH 0)

project(SimSYCL VERSION "${SIMSYCL_VERSION}" LANGUAGES CXX)

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

Expand All @@ -13,6 +17,7 @@ endif()

find_package(Boost 1.70 COMPONENTS context REQUIRED)


# Function to set properties, compile options, and link options for all simsycl targets
function(set_simsycl_target_options target)
set_target_properties(${target} PROPERTIES CXX_STANDARD 20)
Expand All @@ -26,6 +31,12 @@ function(set_simsycl_target_options target)
)
endfunction()

configure_file(
"${PROJECT_SOURCE_DIR}/include/simsycl/config.hh.in"
"${CMAKE_CURRENT_BINARY_DIR}/include/simsycl/config.hh"
@ONLY
)

add_library(simsycl
include/sycl/sycl.hpp
include/CL/sycl.hpp
Expand All @@ -39,6 +50,7 @@ add_library(simsycl
include/simsycl/detail/utils.hh
include/simsycl/sycl/accessor.hh
include/simsycl/sycl/allocator.hh
include/simsycl/sycl/atomic_ref.hh
include/simsycl/sycl/backend.hh
include/simsycl/sycl/buffer.hh
include/simsycl/sycl/concepts.hh
Expand All @@ -53,8 +65,10 @@ add_library(simsycl
include/simsycl/sycl/group.hh
include/simsycl/sycl/handler.hh
include/simsycl/sycl/id.hh
include/simsycl/sycl/info.hh
include/simsycl/sycl/image.hh
include/simsycl/sycl/item.hh
include/simsycl/sycl/math.hh
include/simsycl/sycl/multi_ptr.hh
include/simsycl/sycl/nd_item.hh
include/simsycl/sycl/nd_range.hh
Expand All @@ -66,11 +80,13 @@ add_library(simsycl
include/simsycl/sycl/reduction.hh
include/simsycl/sycl/sub_group.hh
include/simsycl/sycl/type_traits.hh
"${CMAKE_CURRENT_BINARY_DIR}/include/simsycl/config.hh"
src/simsycl/dummy.cc
)
target_link_libraries(simsycl Boost::context)
target_include_directories(simsycl PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>
$<INSTALL_INTERFACE:include>
)
set_simsycl_target_options(simsycl)
Expand All @@ -89,6 +105,10 @@ install(
DIRECTORY ${PROJECT_SOURCE_DIR}/include/
DESTINATION include
)
install(
DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/
DESTINATION include
)
install(
TARGETS simsycl
EXPORT install_exports
Expand All @@ -97,7 +117,7 @@ install(
)
write_basic_package_version_file(
"${CMAKE_CURRENT_BINARY_DIR}/simsycl-config-version.cmake"
VERSION "${SimSYCL_VERSION}"
VERSION "${SIMSYCL_VERSION}"
COMPATIBILITY SameMajorVersion
)
install(
Expand Down
5 changes: 5 additions & 0 deletions cmake/simsycl-config.cmake.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
cmake_minimum_required(VERSION 3.13)
include(CMakeFindDependencyMacro)

set(SIMSYCL_VERSION "@SIMSYCL_VERSION@")
set(SIMSYCL_VERSION_MAJOR "@SIMSYCL_VERSION_MAJOR@")
set(SIMSYCL_VERSION_MINOR "@SIMSYCL_VERSION_MINOR@")
set(SIMSYCL_VERSION_PATCH "@SIMSYCL_VERSION_PATCH@")

set(SIMSYCL_INSTALL_LOCATION "@SIMSYCL_INSTALL_LOCATION@")

set(SIMSYCL_CMAKE_DIR "${SIMSYCL_INSTALL_LOCATION}/lib/cmake/SimSYCL")
Expand Down
6 changes: 6 additions & 0 deletions include/simsycl/config.hh.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#pragma once

#define SIMSYCL_VERSION "@SIMSYCL_VERSION@"
#define SIMSYCL_VERSION_MAJOR @SIMSYCL_VERSION_MAJOR@
#define SIMSYCL_VERSION_MINOR @SIMSYCL_VERSION_MINOR@
#define SIMSYCL_VERSION_PATCH @SIMSYCL_VERSION_PATCH@
4 changes: 4 additions & 0 deletions include/simsycl/sycl.hh
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#pragma once

#include <simsycl/config.hh>

#include "sycl/accessor.hh"
#include "sycl/atomic_ref.hh"
#include "sycl/allocator.hh"
#include "sycl/backend.hh"
#include "sycl/buffer.hh"
Expand All @@ -17,6 +20,7 @@
#include "sycl/id.hh"
#include "sycl/image.hh"
#include "sycl/item.hh"
#include "sycl/math.hh"
#include "sycl/multi_ptr.hh"
#include "sycl/nd_item.hh"
#include "sycl/nd_range.hh"
Expand Down
Loading

0 comments on commit d5a73c3

Please sign in to comment.