feat(serif): utility headers (e.g. config, version, etc...)
This commit is contained in:
10
src/include/serif/config.hpp.in
Normal file
10
src/include/serif/config.hpp.in
Normal file
@@ -0,0 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
#define SERIF_VERSION @SERIF_VERSION@
|
||||
#define SERIF_VERSION_MAJOR @SERIF_VERSION_MAJOR@
|
||||
#define SERIF_BUILD_COMPILER @SERIF_BUILD_COMPILER@
|
||||
#define SERIF_BUILD_SYSTEM @SERIF_BUILD_SYSTEM@
|
||||
#define SERIF_BUILD_ARCHITECTURE @SERIF_BUILD_ARCHITECTURE@
|
||||
#define SERIF_BUILD_TYPE @SERIF_BUILD_TYPE@
|
||||
#define SERIF_MFEM_BUILD_VERSION @SERIF_MFEM_BUILD_VERSION@
|
||||
15
src/include/serif/meson.build
Normal file
15
src/include/serif/meson.build
Normal file
@@ -0,0 +1,15 @@
|
||||
serif_configuration = configuration_data()
|
||||
serif_configuration.set_quoted('SERIF_VERSION', meson.project_version())
|
||||
serif_configuration.set('SERIF_VERSION_MAJOR', meson.project_version().split('.')[0])
|
||||
serif_configuration.set_quoted('SERIF_BUILD_COMPILER', cpp.get_id() + ' ' + cpp.version())
|
||||
serif_configuration.set_quoted('SERIF_BUILD_SYSTEM', host_machine.system())
|
||||
serif_configuration.set_quoted('SERIF_BUILD_ARCHITECTURE', host_machine.cpu_family())
|
||||
serif_configuration.set_quoted('SERIF_BUILD_TYPE', get_option('buildtype'))
|
||||
serif_configuration.set_quoted('SERIF_MFEM_BUILD_VERSION', mfem_dep.version())
|
||||
|
||||
configure_file(
|
||||
input: 'config.hpp.in',
|
||||
output: 'config.hpp',
|
||||
configuration: serif_configuration,
|
||||
install_dir: get_option('includedir') / 'serif',
|
||||
)
|
||||
7
src/include/serif/runtime.hpp
Normal file
7
src/include/serif/runtime.hpp
Normal file
@@ -0,0 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "serif/backend/mfem/runtime.hpp"
|
||||
|
||||
namespace serif {
|
||||
using backend::mfem::initialize;
|
||||
}
|
||||
11
src/include/serif/types.hpp
Normal file
11
src/include/serif/types.hpp
Normal file
@@ -0,0 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#include "serif/backend/mfem/types.hpp"
|
||||
|
||||
namespace serif {
|
||||
// MFEM is the supported backend. Select native types here; aliases introduce no storage or conversions.
|
||||
using Vector = backend::mfem::Vector;
|
||||
using DenseMatrix = backend::mfem::DenseMatrix;
|
||||
using SparseMatrix = backend::mfem::SparseMatrix;
|
||||
using LinearOperator = backend::mfem::LinearOperator;
|
||||
}
|
||||
Reference in New Issue
Block a user