summaryrefslogtreecommitdiff
path: root/c++/descriptor.h
diff options
context:
space:
mode:
Diffstat (limited to 'c++/descriptor.h')
-rw-r--r--c++/descriptor.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/c++/descriptor.h b/c++/descriptor.h
index 564a705..fad9bf2 100644
--- a/c++/descriptor.h
+++ b/c++/descriptor.h
@@ -40,7 +40,11 @@ class df_info{};
template<typename T>
class df_info<T,sch::Descriptor<2, 5>> {
- static constexpr std::array<std::array<int32_t, 2>, 5> directions = {{
+public:
+ static constexpr uint64_t D = 2u;
+ static constexpr uint64_t Q = 5u;
+
+ static constexpr std::array<std::array<int32_t, D>, Q> directions = {{
{ 0, 0},
{-1, 0},
{ 0,-1},
@@ -48,7 +52,7 @@ class df_info<T,sch::Descriptor<2, 5>> {
{ 1, 0}
}};
- static constexpr std::array<typename saw::native_data_type<T>::type,5> weights = {
+ static constexpr std::array<typename saw::native_data_type<T>::type,Q> weights = {
1./3.,
1./6.,
1./6.,
@@ -56,6 +60,14 @@ class df_info<T,sch::Descriptor<2, 5>> {
1./6.
};
+ static constexpr std::array<uint64_t,Q> opposite_index = {
+ 0,
+ 3,
+ 4,
+ 1,
+ 2
+ };
+
static constexpr typename saw::native_data_type<T>::type cs2 = 1./3.;
};
}