-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
aa64859
commit 36d466d
Showing
1,182 changed files
with
21,688 additions
and
14,851 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
Copyright (c) 2014 Glen Joseph Fernandes | ||
glenfe at live dot com | ||
Distributed under the Boost Software License, | ||
Version 1.0. (See accompanying file LICENSE_1_0.txt | ||
or copy at http://boost.org/LICENSE_1_0.txt) | ||
*/ | ||
#ifndef BOOST_ALIGN_HPP | ||
#define BOOST_ALIGN_HPP | ||
|
||
/** | ||
Boost.Align | ||
all headers. | ||
@note This header includes all public headers | ||
of the Boost.Align library. | ||
@file | ||
@author Glen Fernandes | ||
*/ | ||
|
||
#include <boost/align/align.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/is_aligned.hpp> | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
/* | ||
Copyright (c) 2014 Glen Joseph Fernandes | ||
glenfe at live dot com | ||
Distributed under the Boost Software License, | ||
Version 1.0. (See accompanying file LICENSE_1_0.txt | ||
or copy at http://boost.org/LICENSE_1_0.txt) | ||
*/ | ||
#ifndef BOOST_ALIGN_ALIGN_HPP | ||
#define BOOST_ALIGN_ALIGN_HPP | ||
|
||
/** | ||
Function align. | ||
@file | ||
@author Glen Fernandes | ||
*/ | ||
|
||
#include <boost/config.hpp> | ||
|
||
/** | ||
@cond | ||
*/ | ||
#if !defined(BOOST_NO_CXX11_STD_ALIGN) | ||
#include <boost/align/detail/align_cxx11.hpp> | ||
#else | ||
#include <boost/align/detail/align.hpp> | ||
#endif | ||
|
||
#if defined(BOOST_NO_CXX11_STD_ALIGN) | ||
/** | ||
@endcond | ||
*/ | ||
|
||
/** | ||
Boost namespace. | ||
*/ | ||
namespace boost { | ||
/** | ||
Alignment namespace. | ||
*/ | ||
namespace alignment { | ||
/** | ||
If it is possible to fit `size` bytes of storage | ||
aligned by `alignment` into the buffer pointed to by | ||
`ptr` with length `space`, the function updates `ptr` | ||
to point to the first possible address of such | ||
storage and decreases `space` by the number of bytes | ||
used for alignment. Otherwise, the function does | ||
nothing. | ||
@param alignment Shall be a fundamental alignment | ||
value or an extended alignment value, and shall be | ||
a power of two. | ||
@param size The size in bytes of storage to fit into | ||
the buffer. | ||
@param ptr Shall point to contiguous storage of at | ||
least `space` bytes. | ||
@param space The length of the buffer. | ||
@return A null pointer if the requested aligned | ||
buffer would not fit into the available space, | ||
otherwise the adjusted value of `ptr`. | ||
@remark **Note:** The function updates its `ptr` and | ||
space arguments so that it can be called repeatedly | ||
with possibly different `alignment` and `size` | ||
arguments for the same buffer. | ||
*/ | ||
inline void* align(std::size_t alignment, std::size_t size, | ||
void*& ptr, std::size_t& space); | ||
} | ||
} | ||
|
||
/** | ||
@cond | ||
*/ | ||
#endif | ||
/** | ||
@endcond | ||
*/ | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
/* | ||
Copyright (c) 2014 Glen Joseph Fernandes | ||
glenfe at live dot com | ||
Distributed under the Boost Software License, | ||
Version 1.0. (See accompanying file LICENSE_1_0.txt | ||
or copy at http://boost.org/LICENSE_1_0.txt) | ||
*/ | ||
#ifndef BOOST_ALIGN_ALIGNED_ALLOC_HPP | ||
#define BOOST_ALIGN_ALIGNED_ALLOC_HPP | ||
|
||
/** | ||
Functions aligned_alloc and aligned_free. | ||
@file | ||
@author Glen Fernandes | ||
*/ | ||
|
||
#include <boost/config.hpp> | ||
|
||
/** | ||
@cond | ||
*/ | ||
#if defined(BOOST_HAS_UNISTD_H) | ||
#include <unistd.h> | ||
#endif | ||
|
||
#if defined(__APPLE__) || defined(__APPLE_CC__) || defined(macintosh) | ||
#include <AvailabilityMacros.h> | ||
#endif | ||
|
||
#if defined(_MSC_VER) | ||
#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 | ||
/** | ||
@endcond | ||
*/ | ||
|
||
/** | ||
Boost namespace. | ||
*/ | ||
namespace boost { | ||
/** | ||
Alignment namespace. | ||
*/ | ||
namespace alignment { | ||
/** | ||
Allocates space for an object whose alignment is | ||
specified by `alignment`, whose size is | ||
specified by `size`, and whose value is | ||
indeterminate. | ||
@param alignment Shall be a power of two. | ||
@param size Size of space to allocate. | ||
@return A null pointer or a pointer to the | ||
allocated space. | ||
@remark **Note:** On certain platforms, the | ||
alignment may be rounded up to `alignof(void*)` | ||
and the space allocated may be slightly larger | ||
than `size` bytes, by an additional | ||
`sizeof(void*)` and `alignment - 1` bytes. | ||
*/ | ||
inline void* aligned_alloc(std::size_t alignment, | ||
std::size_t size) BOOST_NOEXCEPT; | ||
|
||
/** | ||
Causes the space pointed to by `ptr` to be | ||
deallocated, that is, made available for further | ||
allocation. If `ptr` is a null pointer, no | ||
action occurs. Otherwise, if the argument does | ||
not match a pointer earlier returned by the | ||
`aligned_alloc` function, or if the space has | ||
been deallocated by a call to `aligned_free`, | ||
the behavior is undefined. | ||
*/ | ||
inline void aligned_free(void* ptr) | ||
BOOST_NOEXCEPT; | ||
} | ||
} | ||
|
||
#endif |
Oops, something went wrong.