Skip to content

Instantly share code, notes, and snippets.

View pkestene's full-sized avatar

Pierre Kestener pkestene

View GitHub Profile
/* 2D */
KOKKOS_INLINE_FUNCTION
void index2coord(int index, int &i, int &j, int Nx, int Ny)
{
UNUSED(Nx);
UNUSED(Ny);
#ifdef KOKKOS_ENABLE_CUDA
j = index / Nx;
@pkestene
pkestene / p4est.cmake
Created April 22, 2023 09:19
p4est cmake detection
# let say we require to use at least p4est version 2.8.5
set(P4EST_MINIMAL_VERSION 2.8.5)
# first try to detect P4ESTConfig.cmake somewhere in the CMAKE_PREFIX_PATH
# if found, we're ready to go using target P4EST::P4EST
find_package(P4EST ${P4EST_MINIMAL_VERSION} CONFIG QUIET)
if(P4EST_FOUND)
message(STATUS "P4EST was found with find_package, with version ${P4EST_VERSION}")
endif()