From 5c4b6180d5b91c17648f8b33eb864683c90d334d Mon Sep 17 00:00:00 2001 From: Avril Date: Wed, 25 Nov 2020 16:47:48 +0000 Subject: [PATCH] update makefile --- lean/Makefile | 3 ++- lean/include/rng/frng.hpp | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lean/Makefile b/lean/Makefile index 18b51bb..1c81948 100644 --- a/lean/Makefile +++ b/lean/Makefile @@ -9,7 +9,8 @@ PROJECT=shuffle3 COMMON_FLAGS = -Wall -pedantic $(addprefix -I,$(INCLUDE)) -fno-strict-aliasing OPT_FLAGS?= -march=native -fgraphite -fopenmp -floop-parallelize-all -ftree-parallelize-loops=4 \ - -floop-interchange -ftree-loop-distribution -floop-strip-mine -floop-block + -floop-interchange -ftree-loop-distribution -floop-strip-mine -floop-block \ + -fno-stack-check CXX_OPT_FLAGS?= $(OPT_FLAGS) -felide-constructors diff --git a/lean/include/rng/frng.hpp b/lean/include/rng/frng.hpp index 335a2ee..c98cc86 100644 --- a/lean/include/rng/frng.hpp +++ b/lean/include/rng/frng.hpp @@ -27,10 +27,10 @@ namespace rng return fract(sin(dot(state, vec2)) * 43758.5453); } - inline frng(double s1, double s2) : state({s1, s2}){} - inline frng(const std::array& ar) : state(ar){} - inline frng(std::array&& ar) : state(ar){} - inline frng(const double (&ar)[2]) : state({ar[0], ar[1]}) {} + inline constexpr frng(double s1, double s2) : state({s1, s2}){} + inline constexpr frng(const std::array& ar) : state(ar){} + inline constexpr frng(std::array&& ar) : state(ar){} + inline constexpr frng(const double (&ar)[2]) : state({ar[0], ar[1]}) {} inline constexpr double next_double() override { return sample(); } inline constexpr float next_float() override { return (float)sample(); }