From 94a329242c1c4c9cdaf42192f223a2ad91d5cc3a Mon Sep 17 00:00:00 2001 From: Jack Poulson Date: Sat, 14 Nov 2015 14:18:32 -0800 Subject: [PATCH] Fixing amateur hour --- include/El/core/Element/decl.hpp | 16 ++++++++-------- include/El/core/Element/impl.hpp | 12 ++++++------ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/include/El/core/Element/decl.hpp b/include/El/core/Element/decl.hpp index b0375cfa29..f2c58aae56 100644 --- a/include/El/core/Element/decl.hpp +++ b/include/El/core/Element/decl.hpp @@ -95,9 +95,9 @@ template using Base = typename BaseHelper::type; // For querying whether or not an element's type is complex // -------------------------------------------------------- template struct IsComplex -{ static const bool value=0; }; +{ static const bool value=false; }; template struct IsComplex> -{ static const bool value=1; }; +{ static const bool value=true; }; // Pretty-printing // --------------- @@ -317,12 +317,12 @@ template<> Complex Atanh( const Complex& alpha ); // Round to the nearest integer // ---------------------------- -template>...> +template>...> T Round( const T& alpha ); // Partial specializations // ^^^^^^^^^^^^^^^^^^^^^^^ -template>...> +template Complex Round( const Complex& alpha ); // Full specializations @@ -334,7 +334,7 @@ template<> Quad Round( const Quad& alpha ); // Ceiling // ------- -template>...> +template>...> T Ceil( const T& alpha ); // Partial specializations @@ -351,13 +351,13 @@ template<> Quad Ceil( const Quad& alpha ); // Floor // ----- -template>...> +template>...> T Floor( const T& alpha ); // Partial specializations // ^^^^^^^^^^^^^^^^^^^^^^^ -template Complex -Floor( const Complex& alpha ); +template +Complex Floor( const Complex& alpha ); // Full specializations // ^^^^^^^^^^^^^^^^^^^^ diff --git a/include/El/core/Element/impl.hpp b/include/El/core/Element/impl.hpp index c2034f37fe..519789efc9 100644 --- a/include/El/core/Element/impl.hpp +++ b/include/El/core/Element/impl.hpp @@ -558,12 +558,12 @@ inline Complex Atanh( const Complex& alphaPre ) // Round to the nearest integer // ---------------------------- -template>...> +template>...> inline T Round( const T& alpha ) { return std::round(alpha); } // Partial specializations // ^^^^^^^^^^^^^^^^^^^^^^^ -template>...> +template inline Complex Round( const Complex& alpha ) { return Complex(Round(alpha.real()),Round(alpha.imag())); } @@ -576,12 +576,12 @@ template<> inline Quad Round( const Quad& alpha ) { return rintq(alpha); } // Ceiling // ------- -template>...> +template>...> inline T Ceil( const T& alpha ) { return std::ceil(alpha); } // Partial specializations // ^^^^^^^^^^^^^^^^^^^^^^^ -template>...> +template inline Complex Ceil( const Complex& alpha ) { return Complex(Ceil(alpha.real()),Ceil(alpha.imag())); } @@ -594,12 +594,12 @@ template<> inline Quad Ceil( const Quad& alpha ) { return ceilq(alpha); } // Floor // ----- -template>...> +template>...> inline T Floor( const T& alpha ) { return std::floor(alpha); } // Partial specializations // ^^^^^^^^^^^^^^^^^^^^^^^ -template>...> +template inline Complex Floor( const Complex& alpha ) { return Complex(Floor(alpha.real()),Floor(alpha.imag())); }