#include <folly/crypto/LtHash.h>
#include <folly/CpuId.h>
#ifdef __SSE2__
#include <emmintrin.h>
#endif
#ifdef __AVX2__
#include <immintrin.h>
#endif
#include <folly/Memory.h>
namespace folly {
namespace crypto {
namespace detail {
folly::IOBuf allocateCacheAlignedIOBuf(size_t size) { … }
std::unique_ptr<folly::IOBuf> allocateCacheAlignedIOBufUnique(size_t size) { … }
bool isCacheAlignedAddress(const void* addr) { … }
template <>
bool MathOperation<MathEngine::SIMPLE>::isAvailable() { … }
template <>
bool MathOperation<MathEngine::SSE2>::isAvailable() { … }
template <>
bool MathOperation<MathEngine::AVX2>::isAvailable() { … }
template <>
bool MathOperation<MathEngine::AUTO>::isAvailable() { … }
template <>
bool MathOperation<MathEngine::AUTO>::isImplemented() { … }
template <>
void MathOperation<MathEngine::AUTO>::add(
uint64_t dataMask,
size_t bitsPerElement,
folly::ByteRange b1,
folly::ByteRange b2,
folly::MutableByteRange out) { … }
template <>
void MathOperation<MathEngine::AUTO>::sub(
uint64_t dataMask,
size_t bitsPerElement,
folly::ByteRange b1,
folly::ByteRange b2,
folly::MutableByteRange out) { … }
template <>
void MathOperation<MathEngine::AUTO>::clearPaddingBits(
uint64_t dataMask, folly::MutableByteRange buf) { … }
template <>
bool MathOperation<MathEngine::AUTO>::checkPaddingBits(
uint64_t dataMask, folly::ByteRange buf) { … }
template struct MathOperation<MathEngine::AUTO>;
}
}
}