1
0
Fork 0
mirror of https://github.com/cosmo-sims/monofonIC.git synced 2024-09-19 17:03:45 +02:00

inlined global lambdas, requires upgrading to C++17

This commit is contained in:
Oliver Hahn 2019-10-12 15:06:49 +02:00
parent 5dbb56ace5
commit cbec8c8f03
2 changed files with 7 additions and 7 deletions

View file

@ -84,7 +84,7 @@ file( GLOB PLUGINS
add_executable(${PRGNAME} ${SOURCES} ${PLUGINS})
target_setup_class(${PRGNAME})
set_target_properties(${PRGNAME} PROPERTIES CXX_STANDARD 14)
set_target_properties(${PRGNAME} PROPERTIES CXX_STANDARD 17)
# mpi flags
if(MPI_CXX_FOUND)

View file

@ -1,9 +1,9 @@
#pragma once
namespace op{
auto assign_to = [](auto &g){return [&](auto i, auto v){ g[i] = v; };};
auto add_to = [](auto &g){return [&](auto i, auto v){ g[i] += v; };};
auto add_twice_to = [](auto &g){return [&](auto i, auto v){ g[i] += 2*v; };};
auto subtract_from = [](auto &g){return [&](auto i, auto v){ g[i] -= v; };};
auto subtract_twice_from = [](auto &g){return [&](auto i, auto v){ g[i] -= 2*v; };};
inline auto assign_to = [](auto &g){return [&](auto i, auto v){ g[i] = v; };};
inline auto add_to = [](auto &g){return [&](auto i, auto v){ g[i] += v; };};
inline auto add_twice_to = [](auto &g){return [&](auto i, auto v){ g[i] += 2*v; };};
inline auto subtract_from = [](auto &g){return [&](auto i, auto v){ g[i] -= v; };};
inline auto subtract_twice_from = [](auto &g){return [&](auto i, auto v){ g[i] -= 2*v; };};
}