Skip to content

Commit

Permalink
Merge pull request #46 from eddelbuettel/feature/boost-1.64
Browse files Browse the repository at this point in the history
Feature/boost 1.64 (closes #32, #35, #42)
  • Loading branch information
eddelbuettel committed Aug 12, 2017
2 parents ea401b9 + 6856389 commit 8fd370a
Show file tree
Hide file tree
Showing 1,305 changed files with 169,568 additions and 12,295 deletions.
14 changes: 14 additions & 0 deletions ChangeLog
@@ -1,3 +1,17 @@
2017-08-12 Dirk Eddelbuettel <edd@debian.org>

* DESCRIPTION (Version, Date): Rolled to test release 1.64.0-0

* inst/include/boost/*: Upgraded to Boost 1.64; added new
libraries 'align' and 'sort'; include full 'multiprecision'

* inst/include/boost/numeric/odeint/stepper/generation/: As before
rename karp54_classic.hpp to karp54_cl.hpp, adjust generation.hpp
* inst/include/boost/variant/detail/forced_return.hpp: As before
ensure R_NO_REMAP is defined; call Rf_error() in lieu of abort()
* inst/include/boost/numeric/ublas/storage.hpp : Add missing include
for boost/serialization/array_wrapper.hpp

2017-04-23 Dirk Eddelbuettel <edd@debian.org>

* .travis.yml: Switch to run.sh from maintained for R and Travis
Expand Down
23 changes: 12 additions & 11 deletions DESCRIPTION
@@ -1,8 +1,8 @@
Package: BH
Type: Package
Title: Boost C++ Header Files
Version: 1.62.0-1
Date: 2016-11-18
Version: 1.64.0-0
Date: 2017-08-12
Author: Dirk Eddelbuettel, John W. Emerson and Michael J. Kane
Maintainer: Dirk Eddelbuettel <edd@debian.org>
Description: Boost provides free peer-reviewed portable C++ source
Expand All @@ -12,14 +12,15 @@ Description: Boost provides free peer-reviewed portable C++ source
for template use among CRAN package. By placing these libraries in
this package, we offer a more efficient distribution system for CRAN
as replication of this code in the sources of other packages is
avoided. As of release 1.62.0-1, the following Boost libraries are
included: 'algorithm' 'any' 'atomic' 'bimap' 'bind' 'circular_buffer'
'concept' 'config' 'container' 'date'_'time' 'detail' 'dynamic_bitset'
'exception' 'filesystem' 'flyweight' 'foreach' 'functional' 'fusion'
'geometry' 'graph' 'heap' 'icl' 'integer' 'interprocess' 'intrusive' 'io'
'iostreams' 'iterator' 'math' 'move' 'mpl' 'multiprcecision' 'numeric'
'pending' 'phoenix' 'preprocessor' 'propery_tree' 'random' 'range'
'scope_exit' 'smart_ptr' 'spirit' 'tuple' 'type_traits' 'typeof' 'unordered'
'utility' 'uuid'.
avoided. As of release 1.64.0-1, the following Boost libraries are
included: 'algorithm' 'align' 'any' 'atomic' 'bimap' 'bind'
'circular_buffer' 'concept' 'config' 'container' 'date'_'time'
'detail' 'dynamic_bitset' 'exception' 'filesystem' 'flyweight'
'foreach' 'functional' 'fusion' 'geometry' 'graph' 'heap' 'icl'
'integer' 'interprocess' 'intrusive' 'io' 'iostreams' 'iterator'
'math' 'move' 'mpl' 'multiprcecision' 'numeric' 'pending' 'phoenix'
'preprocessor' 'propery_tree' 'random' 'range' 'scope_exit'
'smart_ptr' 'sort' 'spirit' 'tuple' 'type_traits' 'typeof'
'unordered' 'utility' 'uuid'.
License: BSL-1.0
BugReports: https://github.com/eddelbuettel/bh/issues
6 changes: 6 additions & 0 deletions inst/NEWS.Rd
Expand Up @@ -9,6 +9,12 @@

\section{Changes in version 1.64.0-1 (2017-xx-yy)}{
\itemize{
\item Upgraded to \boost 1.64 installed directly from upstream
source with three minor tweaks
\item Added Boost \boostPkg{align}) (as requested in \ghit{32})
\item Added Boost \boostPkg{sort}) (as requested in \ghit{35})
\item Added Boost \boostPkg{mulitprecision} by fixing typo in script
(as requested in \ghit{42})
\item Updated Travis CI support via newer \code{run.sh}
}
}
Expand Down
22 changes: 22 additions & 0 deletions inst/include/boost/align.hpp
@@ -0,0 +1,22 @@
/*
Copyright 2014-2015 Glen Joseph Fernandes
(glenjofe@gmail.com)
Distributed under the Boost Software License, Version 1.0.
(http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_ALIGN_HPP
#define BOOST_ALIGN_HPP

#include <boost/align/align.hpp>
#include <boost/align/align_down.hpp>
#include <boost/align/align_up.hpp>
#include <boost/align/aligned_alloc.hpp>
#include <boost/align/aligned_allocator.hpp>
#include <boost/align/aligned_allocator_adaptor.hpp>
#include <boost/align/aligned_delete.hpp>
#include <boost/align/alignment_of.hpp>
#include <boost/align/assume_aligned.hpp>
#include <boost/align/is_aligned.hpp>

#endif
9 changes: 4 additions & 5 deletions inst/include/boost/align/align.hpp
@@ -1,10 +1,9 @@
/*
(c) 2014-2015 Glen Joseph Fernandes
<glenjofe -at- gmail.com>
Copyright 2014-2015 Glen Joseph Fernandes
(glenjofe@gmail.com)
Distributed under the Boost Software
License, Version 1.0.
http://boost.org/LICENSE_1_0.txt
Distributed under the Boost Software License, Version 1.0.
(http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_ALIGN_ALIGN_HPP
#define BOOST_ALIGN_ALIGN_HPP
Expand Down
25 changes: 25 additions & 0 deletions inst/include/boost/align/align_down.hpp
@@ -0,0 +1,25 @@
/*
Copyright 2015 Glen Joseph Fernandes
(glenjofe@gmail.com)
Distributed under the Boost Software License, Version 1.0.
(http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_ALIGN_ALIGN_DOWN_HPP
#define BOOST_ALIGN_ALIGN_DOWN_HPP

#include <boost/align/detail/align_down.hpp>

namespace boost {
namespace alignment {

BOOST_CONSTEXPR inline std::size_t
align_down(std::size_t value, std::size_t alignment) BOOST_NOEXCEPT
{
return value & ~(alignment - 1);
}

} /* alignment */
} /* boost */

#endif
25 changes: 25 additions & 0 deletions inst/include/boost/align/align_up.hpp
@@ -0,0 +1,25 @@
/*
Copyright 2015 Glen Joseph Fernandes
(glenjofe@gmail.com)
Distributed under the Boost Software License, Version 1.0.
(http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_ALIGN_ALIGN_UP_HPP
#define BOOST_ALIGN_ALIGN_UP_HPP

#include <boost/align/detail/align_up.hpp>

namespace boost {
namespace alignment {

BOOST_CONSTEXPR inline std::size_t
align_up(std::size_t value, std::size_t alignment) BOOST_NOEXCEPT
{
return (value + alignment - 1) & ~(alignment - 1);
}

} /* alignment */
} /* boost */

#endif
43 changes: 43 additions & 0 deletions inst/include/boost/align/aligned_alloc.hpp
@@ -0,0 +1,43 @@
/*
Copyright 2014-2015 Glen Joseph Fernandes
(glenjofe@gmail.com)
Distributed under the Boost Software License, Version 1.0.
(http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_ALIGN_ALIGNED_ALLOC_HPP
#define BOOST_ALIGN_ALIGNED_ALLOC_HPP

#include <boost/config.hpp>

#if defined(BOOST_HAS_UNISTD_H)
#include <unistd.h>
#endif

#if defined(__APPLE__) || defined(__APPLE_CC__) || defined(macintosh)
#include <AvailabilityMacros.h>
#endif

#if defined(BOOST_ALIGN_USE_ALLOCATE)
#include <boost/align/detail/aligned_alloc.hpp>
#elif defined(_MSC_VER) && !defined(UNDER_CE)
#include <boost/align/detail/aligned_alloc_msvc.hpp>
#elif defined(__MINGW32__) && (__MSVCRT_VERSION__ >= 0x0700)
#include <boost/align/detail/aligned_alloc_msvc.hpp>
#elif MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
#include <boost/align/detail/aligned_alloc_posix.hpp>
#elif MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
#include <boost/align/detail/aligned_alloc_macos.hpp>
#elif defined(__ANDROID__)
#include <boost/align/detail/aligned_alloc_android.hpp>
#elif defined(__SunOS_5_11) || defined(__SunOS_5_12)
#include <boost/align/detail/aligned_alloc_posix.hpp>
#elif defined(sun) || defined(__sun)
#include <boost/align/detail/aligned_alloc_sunos.hpp>
#elif (_POSIX_C_SOURCE >= 200112L) || (_XOPEN_SOURCE >= 600)
#include <boost/align/detail/aligned_alloc_posix.hpp>
#else
#include <boost/align/detail/aligned_alloc.hpp>
#endif

#endif
160 changes: 160 additions & 0 deletions inst/include/boost/align/aligned_allocator.hpp
@@ -0,0 +1,160 @@
/*
Copyright 2014-2015 Glen Joseph Fernandes
(glenjofe@gmail.com)
Distributed under the Boost Software License, Version 1.0.
(http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_ALIGN_ALIGNED_ALLOCATOR_HPP
#define BOOST_ALIGN_ALIGNED_ALLOCATOR_HPP

#include <boost/align/detail/addressof.hpp>
#include <boost/align/detail/is_alignment_constant.hpp>
#include <boost/align/detail/max_objects.hpp>
#include <boost/align/detail/max_size.hpp>
#include <boost/align/aligned_alloc.hpp>
#include <boost/align/aligned_allocator_forward.hpp>
#include <boost/align/alignment_of.hpp>
#include <boost/static_assert.hpp>
#include <boost/throw_exception.hpp>
#include <new>

#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
#include <utility>
#endif

namespace boost {
namespace alignment {

template<class T, std::size_t Alignment>
class aligned_allocator {
BOOST_STATIC_ASSERT(detail::
is_alignment_constant<Alignment>::value);

public:
typedef T value_type;
typedef T* pointer;
typedef const T* const_pointer;
typedef void* void_pointer;
typedef const void* const_void_pointer;
typedef std::size_t size_type;
typedef std::ptrdiff_t difference_type;
typedef T& reference;
typedef const T& const_reference;

private:
enum {
min_align = detail::max_size<Alignment,
alignment_of<value_type>::value>::value
};

public:
template<class U>
struct rebind {
typedef aligned_allocator<U, Alignment> other;
};

#if !defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS)
aligned_allocator() = default;
#else
aligned_allocator() BOOST_NOEXCEPT { }
#endif

template<class U>
aligned_allocator(const aligned_allocator<U, Alignment>&)
BOOST_NOEXCEPT { }

pointer address(reference value) const BOOST_NOEXCEPT {
return detail::addressof(value);
}

const_pointer address(const_reference value) const BOOST_NOEXCEPT {
return detail::addressof(value);
}

pointer allocate(size_type size, const_void_pointer = 0) {
if (size == 0) {
return 0;
}
void* p = aligned_alloc(min_align, sizeof(T) * size);
if (!p) {
boost::throw_exception(std::bad_alloc());
}
return static_cast<T*>(p);
}

void deallocate(pointer ptr, size_type) {
boost::alignment::aligned_free(ptr);
}

BOOST_CONSTEXPR size_type max_size() const BOOST_NOEXCEPT {
return detail::max_objects<T>::value;
}

#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
template<class U, class... Args>
void construct(U* ptr, Args&&... args) {
::new((void*)ptr) U(std::forward<Args>(args)...);
}
#else
template<class U, class V>
void construct(U* ptr, V&& value) {
::new((void*)ptr) U(std::forward<V>(value));
}
#endif
#else
template<class U, class V>
void construct(U* ptr, const V& value) {
::new((void*)ptr) U(value);
}
#endif

template<class U>
void construct(U* ptr) {
::new((void*)ptr) U();
}

template<class U>
void destroy(U* ptr) {
(void)ptr;
ptr->~U();
}
};

template<std::size_t Alignment>
class aligned_allocator<void, Alignment> {
BOOST_STATIC_ASSERT(detail::
is_alignment_constant<Alignment>::value);

public:
typedef void value_type;
typedef void* pointer;
typedef const void* const_pointer;

template<class U>
struct rebind {
typedef aligned_allocator<U, Alignment> other;
};
};

template<class T, class U, std::size_t Alignment>
inline bool
operator==(const aligned_allocator<T, Alignment>&,
const aligned_allocator<U, Alignment>&) BOOST_NOEXCEPT
{
return true;
}

template<class T, class U, std::size_t Alignment>
inline bool
operator!=(const aligned_allocator<T, Alignment>&,
const aligned_allocator<U, Alignment>&) BOOST_NOEXCEPT
{
return false;
}

} /* alignment */
} /* boost */

#endif

0 comments on commit 8fd370a

Please sign in to comment.