DDC 0.1.0
Loading...
Searching...
No Matches
knot_discrete_dimension_type.hpp
1// Copyright (C) The DDC development team, see COPYRIGHT.md file
2//
3// SPDX-License-Identifier: MIT
4
5#pragma once
6
7#include <type_traits>
8
9#include "bsplines_non_uniform.hpp"
10#include "bsplines_uniform.hpp"
11
12namespace ddc {
13
14/// If the type `DDim` is a B-spline, defines `type` to the discrete dimension of the associated knots.
15template <class DDim>
17{
18 static_assert(is_uniform_bsplines_v<DDim> || is_non_uniform_bsplines_v<DDim>);
19
20 /// The type representing the discrete dimension of the knots.
21 using type = std::conditional_t<
22 is_uniform_bsplines_v<DDim>,
25};
26
27/// Helper type to easily access `KnotDiscreteDimension<DDim>::type`
28template <class DDim>
29using knot_discrete_dimension_t = typename KnotDiscreteDimension<DDim>::type;
30
31} // namespace ddc
The top-level namespace of DDC.
If the type DDim is a B-spline, defines type to the discrete dimension of the associated knots.