From f3dde8285baf87a89d2a9b79ac719573c47538ff Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Sat, 2 Sep 2023 18:04:18 +0200 Subject: c++: Generating example layouts --- c++/descriptor.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'c++/descriptor.h') diff --git a/c++/descriptor.h b/c++/descriptor.h index 4d29831..33fef9b 100644 --- a/c++/descriptor.h +++ b/c++/descriptor.h @@ -1,6 +1,6 @@ #pragma once -#include +#include namespace kel { namespace lbm { @@ -32,24 +32,24 @@ template class df_info{}; template -class df_info> { - static constexpr std::array, 5> directions = { +class df_info> { + static constexpr std::array, 5> directions = {{ { 0, 0}, {-1, 0}, { 0,-1}, { 0, 1}, { 1, 0} + }}; + + static constexpr std::array::type,5> weights = { + 1./3., + 1./6., + 1./6., + 1./6., + 1./6. }; - static constexpr std::array,5> weights = { - {1,3}, - {1,6}, - {1,6}, - {1,6}, - {1,6} - }; - - static constexpr std::ratio cs2 = {1,3}; + static constexpr typename saw::native_data_type::type cs2 = 1./3.; }; } } -- cgit v1.2.3