Skip to content

Commit

Permalink
clang-format: apply new format to (almost) everything.
Browse files Browse the repository at this point in the history
  • Loading branch information
jzmaddock committed Jul 15, 2019
1 parent 188187c commit 8777532
Show file tree
Hide file tree
Showing 376 changed files with 29,843 additions and 24,983 deletions.
3 changes: 3 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,6 @@ BraceWrapping:
BeforeElse: true
SplitEmptyFunction: false
SplitEmptyRecord: false
PointerAlignment: Left
SortIncludes: false

4 changes: 1 addition & 3 deletions config/has_eigen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@

#include <Eigen/Dense>


int main()
{
#if EIGEN_VERSION_AT_LEAST(3,3,0)
#if EIGEN_VERSION_AT_LEAST(3, 3, 0)
#else
#error "Obsolete Eigen"
#endif
return 0;
}

5 changes: 2 additions & 3 deletions config/has_float128.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@ extern "C" {
int main()
{
__float128 f = -2.0Q;
f = fabsq(f);
f = expq(f);
f = fabsq(f);
f = expq(f);

return 0;
}

15 changes: 7 additions & 8 deletions config/has_gmp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,24 @@
#ifdef __GNUC__
#pragma message "__GNU_MP_VERSION=" BOOST_STRINGIZE(__GNU_MP_VERSION)
#pragma message "__GNU_MP_VERSION_MINOR=" BOOST_STRINGIZE(__GNU_MP_VERSION_MINOR)
#endif
#endif

#if (__GNU_MP_VERSION < 4) || ((__GNU_MP_VERSION == 4) && (__GNU_MP_VERSION_MINOR < 2))
#error "Incompatible GMP version"
#endif

int main()
{
void *(*alloc_func_ptr) (size_t);
void *(*realloc_func_ptr) (void *, size_t, size_t);
void (*free_func_ptr) (void *, size_t);
void* (*alloc_func_ptr)(size_t);
void* (*realloc_func_ptr)(void*, size_t, size_t);
void (*free_func_ptr)(void*, size_t);

mp_get_memory_functions(&alloc_func_ptr, &realloc_func_ptr, &free_func_ptr);

mpz_t integ;
mpz_init (integ);
if(integ[0]._mp_d)
mpz_clear (integ);
mpz_init(integ);
if (integ[0]._mp_d)
mpz_clear(integ);

return 0;
}

4 changes: 1 addition & 3 deletions config/has_intel_quad.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ extern "C" _Quad __fabs(_Quad);
int main()
{
_Quad f = -2.0Q;
f = __fabsq(f);
f = __fabsq(f);

return 0;
}


9 changes: 4 additions & 5 deletions config/has_mpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#ifdef __GNUC__
#pragma message "__GNU_MP_VERSION=" BOOST_STRINGIZE(__GNU_MP_VERSION)
#pragma message "__GNU_MP_VERSION_MINOR=" BOOST_STRINGIZE(__GNU_MP_VERSION_MINOR)
#endif
#endif

#if (__GNU_MP_VERSION < 4) || ((__GNU_MP_VERSION == 4) && (__GNU_MP_VERSION_MINOR < 2))
#error "Incompatible GMP version"
Expand All @@ -43,9 +43,9 @@
*/
int main()
{
void *(*alloc_func_ptr) (size_t);
void *(*realloc_func_ptr) (void *, size_t, size_t);
void (*free_func_ptr) (void *, size_t);
void* (*alloc_func_ptr)(size_t);
void* (*realloc_func_ptr)(void*, size_t, size_t);
void (*free_func_ptr)(void*, size_t);

mp_get_memory_functions(&alloc_func_ptr, &realloc_func_ptr, &free_func_ptr);

Expand All @@ -57,4 +57,3 @@ int main()

return 0;
}

12 changes: 5 additions & 7 deletions config/has_mpfi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#ifdef __GNUC__
#pragma message "__GNU_MP_VERSION=" BOOST_STRINGIZE(__GNU_MP_VERSION)
#pragma message "__GNU_MP_VERSION_MINOR=" BOOST_STRINGIZE(__GNU_MP_VERSION_MINOR)
#endif
#endif

#if (__GNU_MP_VERSION < 4) || ((__GNU_MP_VERSION == 4) && (__GNU_MP_VERSION_MINOR < 2))
#error "Incompatible GMP version"
Expand All @@ -43,20 +43,18 @@
*/
int main()
{
void *(*alloc_func_ptr) (size_t);
void *(*realloc_func_ptr) (void *, size_t, size_t);
void (*free_func_ptr) (void *, size_t);
void* (*alloc_func_ptr)(size_t);
void* (*realloc_func_ptr)(void*, size_t, size_t);
void (*free_func_ptr)(void*, size_t);

mp_get_memory_functions(&alloc_func_ptr, &realloc_func_ptr, &free_func_ptr);

mpfr_buildopt_tls_p();

mpfi_t t;
mpfi_init2(t, 128);
if(t[0].left._mpfr_d)
if (t[0].left._mpfr_d)
mpfi_clear(t);


return 0;
}

12 changes: 5 additions & 7 deletions config/has_mpfr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,28 +22,26 @@
#ifdef __GNUC__
#pragma message "__GNU_MP_VERSION=" BOOST_STRINGIZE(__GNU_MP_VERSION)
#pragma message "__GNU_MP_VERSION_MINOR=" BOOST_STRINGIZE(__GNU_MP_VERSION_MINOR)
#endif
#endif

#if (__GNU_MP_VERSION < 4) || ((__GNU_MP_VERSION == 4) && (__GNU_MP_VERSION_MINOR < 2))
#error "Incompatible GMP version"
#endif


int main()
{
void *(*alloc_func_ptr) (size_t);
void *(*realloc_func_ptr) (void *, size_t, size_t);
void (*free_func_ptr) (void *, size_t);
void* (*alloc_func_ptr)(size_t);
void* (*realloc_func_ptr)(void*, size_t, size_t);
void (*free_func_ptr)(void*, size_t);

mp_get_memory_functions(&alloc_func_ptr, &realloc_func_ptr, &free_func_ptr);

mpfr_buildopt_tls_p();

mpfr_t t;
mpfr_init2(t, 128);
if(t[0]._mpfr_d)
if (t[0]._mpfr_d)
mpfr_clear(t);

return 0;
}

4 changes: 1 addition & 3 deletions config/has_tommath.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@

#include <tommath.h>


int main()
{
mp_int v;
mp_init(&v);
if(v.dp)
if (v.dp)
mp_clear(&v);
return 0;
}

17 changes: 8 additions & 9 deletions include/boost/multiprecision/complex128.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,18 @@
#include <boost/multiprecision/float128.hpp>
#include <boost/multiprecision/complex_adaptor.hpp>


namespace boost {
namespace multiprecision {
namespace multiprecision {

typedef number<complex_adaptor<float128_backend>, et_off> complex128;
typedef number<complex_adaptor<float128_backend>, et_off> complex128;

template <>
struct component_type<number<complex_adaptor<float128_backend> > >
{
typedef float128 type;
};
template <>
struct component_type<number<complex_adaptor<float128_backend> > >
{
typedef float128 type;
};

}
}
} // namespace boost::multiprecision

#endif
Loading

0 comments on commit 8777532

Please sign in to comment.