Mentions légales du service

Skip to content
Snippets Groups Projects
Verified Commit 3936d29e authored by GICQUEL Antoine's avatar GICQUEL Antoine :zzz:
Browse files

Add 'smooth_tag' for smooth kernels + trait to detect at compile-time if

a kernel is smooth.
parent 79b5ae11
No related branches found
No related tags found
No related merge requests found
Pipeline #1128646 skipped
......@@ -34,6 +34,8 @@ namespace scalfmm::matrix_kernels
static constexpr std::size_t km{1}; // The number of inputs of the kernel.
static constexpr std::size_t kn{1}; // The number of outputs of the kernel.
static constexpr bool is_smooth{true}; // Specify that the kernel is smooth.
// Mandatory type
template<typename ValueType>
using matrix_type = std::array<ValueType, kn * km>; // Matrix type that is used in the kernel.
......
......@@ -6,7 +6,7 @@
// --------------------------------
// See LICENCE file at project root
// File : scalfmm/meta/traits.hpp
// --------------------------------
// -------------------------------
#ifndef SCALFMM_META_TRAITS_HPP
#define SCALFMM_META_TRAITS_HPP
......@@ -920,6 +920,34 @@ namespace scalfmm::meta
template<typename T>
inline static constexpr bool is_particle_v = is_particle<T>::value;
/**
* @brief
*
* @tparam T
*/
template<typename MatrixKernelType, typename = void>
struct is_smooth : std::false_type
{
};
/**
* @brief
*
* @tparam T
*/
template<typename MatrixKernelType>
struct is_smooth<MatrixKernelType, std::void_t<decltype(MatrixKernelType::is_smooth)>> : std::true_type
{
};
/**
* @brief
*
* @tparam T
*/
template<typename MatrixKernelType>
inline static constexpr bool is_smooth_v = is_smooth<MatrixKernelType>::value;
/**
* @brief
*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment