|
libjmmcg
release_579_6_g8cffd
A C++ library containing an eclectic mix of useful, advanced components.
|
#include "blatant_old_msvc_compiler_hacks.hpp"#include "int128_compatibility.hpp"#include "max_min.hpp"#include <boost/mpl/assert.hpp>#include <algorithm>#include <cassert>#include <cstdint>#include <cstring>#include <iostream>#include <memory>#include "memops_impl.hpp"Go to the source code of this file.
Namespaces | |
| namespace | jmmcg |
| Link with -lrt to include these functions. | |
| namespace | jmmcg::LIBJMMCG_VER_NAMESPACE |
Functions | |
| template<class Iter1 , class Iter2 > | |
| void FORCE_INLINE | jmmcg::LIBJMMCG_VER_NAMESPACE::memcpy (Iter1 dest, Iter2 src, std::size_t n) noexcept(true) |
| Equivalent to the memcpy operations. More... | |
| template<> | |
| void FORCE_INLINE | jmmcg::LIBJMMCG_VER_NAMESPACE::memcpy< char *, char const * > (char *dest, char const *src, std::size_t n) noexcept(true) |
| template<> | |
| void FORCE_INLINE | jmmcg::LIBJMMCG_VER_NAMESPACE::memcpy< wchar_t *, wchar_t const * > (wchar_t *dest, wchar_t const *src, std::size_t n) noexcept(true) |
| template<class Iter1 , class Iter2 > | |
| void FORCE_INLINE | jmmcg::LIBJMMCG_VER_NAMESPACE::memmove (Iter1 dest, Iter2 src, std::size_t n) noexcept(true) |
| Equivalent to the memmove operations. More... | |
| template<> | |
| void FORCE_INLINE | jmmcg::LIBJMMCG_VER_NAMESPACE::memmove< char *, char const * > (char *dest, char const *src, std::size_t n) noexcept(true) |
| template<> | |
| void FORCE_INLINE | jmmcg::LIBJMMCG_VER_NAMESPACE::memmove< wchar_t *, wchar_t const * > (wchar_t *dest, wchar_t const *src, std::size_t n) noexcept(true) |
| template<class Iter , class V > | |
| std::enable_if< std::is_same< typename std::iterator_traits< Iter >::value_type, V >::value >::type FORCE_INLINE | jmmcg::LIBJMMCG_VER_NAMESPACE::memset (Iter dest, V i, std::size_t n) noexcept(true) |
| Equivalent to the memset operations. More... | |
| template<> | |
| void FORCE_INLINE | jmmcg::LIBJMMCG_VER_NAMESPACE::memset< char *, char > (char *dest, char i, std::size_t n) noexcept(true) |
| template<> | |
| void FORCE_INLINE | jmmcg::LIBJMMCG_VER_NAMESPACE::memset< wchar_t *, wchar_t > (wchar_t *dest, wchar_t i, std::size_t n) noexcept(true) |
| template<class Iter > | |
| bool FORCE_INLINE | jmmcg::LIBJMMCG_VER_NAMESPACE::memcmp (Iter src1, Iter src2, std::size_t n) noexcept(true) |
| Equivalent to the std::memcmp() operations. More... | |
| template<> | |
| bool FORCE_INLINE | jmmcg::LIBJMMCG_VER_NAMESPACE::memcmp< char const * > (char const *src1, char const *src2, std::size_t n) noexcept(true) |
| template<> | |
| bool FORCE_INLINE | jmmcg::LIBJMMCG_VER_NAMESPACE::memcmp< wchar_t const * > (wchar_t const *src1, wchar_t const *src2, std::size_t n) noexcept(true) |
| template<class Val , std::size_t SrcSz, std::size_t DestSz> | |
| void FORCE_INLINE | jmmcg::LIBJMMCG_VER_NAMESPACE::memcpy (Val const (&src)[SrcSz], Val(&dest)[DestSz]) noexcept(false) |
| template<std::size_t SrcSz, std::size_t DestSz> | |
| constexpr void FORCE_INLINE | jmmcg::LIBJMMCG_VER_NAMESPACE::memcpy_opt (char const (&src)[SrcSz], char(&dest)[DestSz]) noexcept(true) |
| Copy the source array to the destination (which may overlap), statically unrolled. More... | |
| template<std::size_t FirstSz, std::size_t SecondSz> | |
| constexpr bool FORCE_INLINE | jmmcg::LIBJMMCG_VER_NAMESPACE::memcmp_opt (char const (&first)[FirstSz], char const (&second)[SecondSz]) noexcept(true) |
| Compare the source array to the destination (which may overlap), statically unrolled. More... | |
| template<char const needle, std::size_t FirstSz> | |
| constexpr char const *FORCE_INLINE | jmmcg::LIBJMMCG_VER_NAMESPACE::strchr_opt (char const (&haystack)[FirstSz]) noexcept(true) __attribute__((pure)) |
| Find the first occurrence of the character in the string. More... | |
The objective of these template specialisations is to allow the compiler to correctly select the appropriate, high-speed operation.
Definition in file memops.hpp.