Skip to content

Commit

Permalink
Fixing amateur hour
Browse files Browse the repository at this point in the history
  • Loading branch information
Jack Poulson committed Nov 14, 2015
1 parent 14f7189 commit 94a3292
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
16 changes: 8 additions & 8 deletions include/El/core/Element/decl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ template<typename F> using Base = typename BaseHelper<F>::type;
// For querying whether or not an element's type is complex
// --------------------------------------------------------
template<typename Real> struct IsComplex
{ static const bool value=0; };
{ static const bool value=false; };
template<typename Real> struct IsComplex<Complex<Real>>
{ static const bool value=1; };
{ static const bool value=true; };

// Pretty-printing
// ---------------
Expand Down Expand Up @@ -317,12 +317,12 @@ template<> Complex<Quad> Atanh( const Complex<Quad>& alpha );

// Round to the nearest integer
// ----------------------------
template<typename T,DisableIf<IsComplex<T>>...>
template<typename T,EnableIf<IsScalar<T>>...>
T Round( const T& alpha );

// Partial specializations
// ^^^^^^^^^^^^^^^^^^^^^^^
template<typename T,DisableIf<IsComplex<T>>...>
template<typename T>
Complex<T> Round( const Complex<T>& alpha );

// Full specializations
Expand All @@ -334,7 +334,7 @@ template<> Quad Round( const Quad& alpha );

// Ceiling
// -------
template<typename T,DisableIf<IsComplex<T>>...>
template<typename T,EnableIf<IsScalar<T>>...>
T Ceil( const T& alpha );

// Partial specializations
Expand All @@ -351,13 +351,13 @@ template<> Quad Ceil( const Quad& alpha );

// Floor
// -----
template<typename T,DisableIf<IsComplex<T>>...>
template<typename T,EnableIf<IsScalar<T>>...>
T Floor( const T& alpha );

// Partial specializations
// ^^^^^^^^^^^^^^^^^^^^^^^
template<typename T> Complex<T>
Floor( const Complex<T>& alpha );
template<typename T>
Complex<T> Floor( const Complex<T>& alpha );

// Full specializations
// ^^^^^^^^^^^^^^^^^^^^
Expand Down
12 changes: 6 additions & 6 deletions include/El/core/Element/impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -558,12 +558,12 @@ inline Complex<Quad> Atanh( const Complex<Quad>& alphaPre )

// Round to the nearest integer
// ----------------------------
template<typename T,DisableIf<IsComplex<T>>...>
template<typename T,EnableIf<IsScalar<T>>...>
inline T Round( const T& alpha ) { return std::round(alpha); }

// Partial specializations
// ^^^^^^^^^^^^^^^^^^^^^^^
template<typename T,DisableIf<IsComplex<T>>...>
template<typename T>
inline Complex<T> Round( const Complex<T>& alpha )
{ return Complex<T>(Round(alpha.real()),Round(alpha.imag())); }

Expand All @@ -576,12 +576,12 @@ template<> inline Quad Round( const Quad& alpha ) { return rintq(alpha); }

// Ceiling
// -------
template<typename T,DisableIf<IsComplex<T>>...>
template<typename T,EnableIf<IsScalar<T>>...>
inline T Ceil( const T& alpha ) { return std::ceil(alpha); }

// Partial specializations
// ^^^^^^^^^^^^^^^^^^^^^^^
template<typename T,DisableIf<IsComplex<T>>...>
template<typename T>
inline Complex<T> Ceil( const Complex<T>& alpha )
{ return Complex<T>(Ceil(alpha.real()),Ceil(alpha.imag())); }

Expand All @@ -594,12 +594,12 @@ template<> inline Quad Ceil( const Quad& alpha ) { return ceilq(alpha); }

// Floor
// -----
template<typename T,DisableIf<IsComplex<T>>...>
template<typename T,EnableIf<IsScalar<T>>...>
inline T Floor( const T& alpha ) { return std::floor(alpha); }

// Partial specializations
// ^^^^^^^^^^^^^^^^^^^^^^^
template<typename T,DisableIf<IsComplex<T>>...>
template<typename T>
inline Complex<T> Floor( const Complex<T>& alpha )
{ return Complex<T>(Floor(alpha.real()),Floor(alpha.imag())); }

Expand Down

0 comments on commit 94a3292

Please sign in to comment.