summaryrefslogtreecommitdiff
path: root/c++/descriptor.h
diff options
context:
space:
mode:
authorClaudius "keldu" Holeksa <mail@keldu.de>2025-03-31 16:01:20 +0200
committerClaudius "keldu" Holeksa <mail@keldu.de>2025-03-31 16:01:20 +0200
commit7b0dc7f7003c07cca984fd49b5c18af9dafd4675 (patch)
treeee75667a055f89724356d91dca28fbeec9144dfb /c++/descriptor.h
parenta958e098431af9a19b587fe5dcc32cd01d525d04 (diff)
wip
Diffstat (limited to 'c++/descriptor.h')
-rw-r--r--c++/descriptor.h54
1 files changed, 50 insertions, 4 deletions
diff --git a/c++/descriptor.h b/c++/descriptor.h
index 63d6a5c..8c0036a 100644
--- a/c++/descriptor.h
+++ b/c++/descriptor.h
@@ -47,9 +47,9 @@ public:
static constexpr std::array<std::array<int32_t, D>, Q> directions = {{
{ 0, 0},
{-1, 0},
+ { 1, 0},
{ 0,-1},
{ 0, 1},
- { 1, 0}
}};
static constexpr std::array<typename saw::native_data_type<T>::type,Q> weights = {
@@ -62,15 +62,61 @@ public:
static constexpr std::array<uint64_t,Q> opposite_index = {
0,
- 3,
- 4,
+ 2,
1,
- 2
+ 4,
+ 3
};
static constexpr typename saw::native_data_type<T>::type inv_cs2 = 3.0;
static constexpr typename saw::native_data_type<T>::type cs2 = 1./3.;
};
+
+template<typename T>
+class df_info<T,sch::Descriptor<2, 9>> {
+public:
+ static constexpr uint64_t D = 2u;
+ static constexpr uint64_t Q = 9u;
+
+ static constexpr std::array<std::array<int32_t, D>, Q> directions = {{
+ { 0, 0},
+ {-1, 0},
+ { 1, 0},
+ { 0,-1},
+ { 0, 1},
+ {-1,-1},
+ { 1, 1},
+ {-1, 1},
+ { 1,-1}
+ }};
+
+ static constexpr std::array<typename saw::native_data_type<T>::type,Q> weights = {
+ 4./9.,
+ 1./9.,
+ 1./9.,
+ 1./9.,
+ 1./9.,
+ 1./36.,
+ 1./36.,
+ 1./36.,
+ 1./36.
+ };
+
+ static constexpr std::array<uint64_t,Q> opposite_index = {
+ 0,
+ 2,
+ 1,
+ 4,
+ 3,
+ 6,
+ 5,
+ 8,
+ 7
+ };
+
+ static constexpr typename saw::native_data_type<T>::type inv_cs2 = 3.0;
+ static constexpr typename saw::native_data_type<T>::type cs2 = 1./3.;
+};
}
}