Skip to content

Commit

Permalink
Adds -fopenmp flag to omp kernels + adds c++20 omp kernel
Browse files Browse the repository at this point in the history
  • Loading branch information
mcbarton committed May 16, 2024
1 parent f20af56 commit d6a132b
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ function(configure_kernel kernel)
set(XEUS_CPP_RESOURCE_DIR ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/clang/${CPPINTEROP_LLVM_VERSION_MAJOR})
set(XEUS_CPP_INCLUDE_DIR ${CMAKE_INSTALL_PREFIX}/include)

if(${kernel} MATCHES "omp/$")
set(XEUS_CPP_OMP "-fopenmp")
endif()

if (WIN32)
string(REPLACE "\\" "/" kernel "${kernel}")
string(REPLACE "\\" "/" XEUS_CPP_PATH "${XEUS_CPP_PATH}")
Expand Down Expand Up @@ -162,7 +166,9 @@ message("Configure kernels: ...")
configure_kernel("/share/jupyter/kernels/xcpp11/")
configure_kernel("/share/jupyter/kernels/xcpp14/")
configure_kernel("/share/jupyter/kernels/xcpp17/")
configure_kernel("/share/jupyter/kernels/xcpp17-omp/")
configure_kernel("/share/jupyter/kernels/xcpp20/")
configure_kernel("/share/jupyter/kernels/xcpp20-omp/")

# Source files
# ============
Expand Down
18 changes: 18 additions & 0 deletions share/jupyter/kernels/xcpp20-omp/kernel.json.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"display_name": "C++20 (xcpp+OpenMP)",
"env": {
"PATH":"@XEUS_CPP_PATH@",
"LD_LIBRARY_PATH":"@XEUS_CPP_LD_LIBRARY_PATH@"
},
"argv": [
"@XEUS_CPP_KERNELSPEC_PATH@xcpp",
"-f",
"{connection_file}",
"-resource-dir", "@XEUS_CPP_RESOURCE_DIR@",
"-I", "@XEUS_CPP_INCLUDE_DIR@",
"-std=c++20"@XEUS_CPP_OMP@
],
"language": "cpp",
"metadata": {"debugger": false
}
}
Binary file added share/jupyter/kernels/xcpp20-omp/logo-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added share/jupyter/kernels/xcpp20-omp/logo-64x64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions share/jupyter/kernels/xcpp20-omp/logo-svg.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d6a132b

Please sign in to comment.