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:
parent
5dbb56ace5
commit
cbec8c8f03
2 changed files with 7 additions and 7 deletions
|
@ -84,7 +84,7 @@ file( GLOB PLUGINS
|
||||||
add_executable(${PRGNAME} ${SOURCES} ${PLUGINS})
|
add_executable(${PRGNAME} ${SOURCES} ${PLUGINS})
|
||||||
target_setup_class(${PRGNAME})
|
target_setup_class(${PRGNAME})
|
||||||
|
|
||||||
set_target_properties(${PRGNAME} PROPERTIES CXX_STANDARD 14)
|
set_target_properties(${PRGNAME} PROPERTIES CXX_STANDARD 17)
|
||||||
|
|
||||||
# mpi flags
|
# mpi flags
|
||||||
if(MPI_CXX_FOUND)
|
if(MPI_CXX_FOUND)
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
namespace op{
|
namespace op{
|
||||||
auto assign_to = [](auto &g){return [&](auto i, auto v){ g[i] = v; };};
|
inline 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; };};
|
inline 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; };};
|
inline 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; };};
|
inline 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 subtract_twice_from = [](auto &g){return [&](auto i, auto v){ g[i] -= 2*v; };};
|
||||||
}
|
}
|
Loading…
Reference in a new issue