1#ifndef __COMMON_EXPORT_HPP__
2#define __COMMON_EXPORT_HPP__
4#include <Kokkos_Core_fwd.hpp>
5#include <biocma_cst_config.hpp>
8using ComputeSpace = Kokkos::DefaultExecutionSpace;
9using HostSpace = Kokkos::DefaultHostExecutionSpace;
11#ifdef ENABLE_KOKKOS_PROFILING
12# include <Kokkos_Profiling_ScopedRegion.hpp>
13# define PROFILE_SECTION(__label_section__) \
14 Kokkos::Profiling::ScopedRegion region(__label_section__);
16# define PROFILE_SECTION(__label_section__) ;
19#define EIGEN_INDEX(__VALUE__) static_cast<int>(__VALUE__)
22check_version(std::array<int, 3> v)
24 return (v[0] == _BIOMC_VERSION_MAJOR) && (v[1] == _BIOMC_VERSION_MINOR)
25 && (v[2] == _BIOMC_VERSION_DEV);
30# include <source_location>
40 explicit Canary(std::string_view lbl, std::source_location location)
45 std::cout << location.function_name() <<
": " << lbl << std::endl;
50 std::cout <<
"END " <<
_lbl << std::endl;
56# define MkCanary(x) Canary(x, std::source_location());
Canary & operator=(const Canary &)=delete
~Canary()
Definition common.hpp:48
Canary(std::string_view lbl, std::source_location location)
Definition common.hpp:40
Canary(const Canary &)=delete
Canary & operator=(Canary &&)=delete
std::string _lbl
Definition common.hpp:54