Update documentation
parent
81f0b9bd83
commit
b40ca97550
|
|
@ -11,6 +11,11 @@
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "blake2.h"
|
#include "blake2.h"
|
||||||
|
|
||||||
|
// Uncomment for benchmarking C++ against SSE2 or NEON.
|
||||||
|
// Do so in both blake2.cpp and blake2-simd.cpp.
|
||||||
|
// #undef CRYPTOPP_SSE42_AVAILABLE
|
||||||
|
// #undef CRYPTOPP_ARM_NEON_AVAILABLE
|
||||||
|
|
||||||
#if !(defined(__ARM_NEON) || defined(_MSC_VER))
|
#if !(defined(__ARM_NEON) || defined(_MSC_VER))
|
||||||
# undef CRYPTOPP_ARM_NEON_AVAILABLE
|
# undef CRYPTOPP_ARM_NEON_AVAILABLE
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,8 @@
|
||||||
|
|
||||||
NAMESPACE_BEGIN(CryptoPP)
|
NAMESPACE_BEGIN(CryptoPP)
|
||||||
|
|
||||||
// Uncomment for benchmarking C++ against SSE2 or NEON
|
// Uncomment for benchmarking C++ against SSE2 or NEON.
|
||||||
|
// Do so in both blake2.cpp and blake2-simd.cpp.
|
||||||
// #undef CRYPTOPP_SSE42_AVAILABLE
|
// #undef CRYPTOPP_SSE42_AVAILABLE
|
||||||
// #undef CRYPTOPP_ARM_NEON_AVAILABLE
|
// #undef CRYPTOPP_ARM_NEON_AVAILABLE
|
||||||
|
|
||||||
|
|
|
||||||
16
cpu.h
16
cpu.h
|
|
@ -80,6 +80,9 @@ CRYPTOPP_DLL void CRYPTOPP_API DetectX86Features();
|
||||||
CRYPTOPP_DLL bool CRYPTOPP_API CpuId(word32 func, word32 subfunc, word32 output[4]);
|
CRYPTOPP_DLL bool CRYPTOPP_API CpuId(word32 func, word32 subfunc, word32 output[4]);
|
||||||
#endif // CRYPTOPP_DOXYGEN_PROCESSING
|
#endif // CRYPTOPP_DOXYGEN_PROCESSING
|
||||||
|
|
||||||
|
//! \name IA-32 CPU FEATURES
|
||||||
|
//@{
|
||||||
|
|
||||||
//! \brief Determines SSE2 availability
|
//! \brief Determines SSE2 availability
|
||||||
//! \returns true if SSE2 is determined to be available, false otherwise
|
//! \returns true if SSE2 is determined to be available, false otherwise
|
||||||
//! \details MMX, SSE and SSE2 are core processor features for x86_64, and
|
//! \details MMX, SSE and SSE2 are core processor features for x86_64, and
|
||||||
|
|
@ -264,6 +267,8 @@ inline int GetCacheLineSize()
|
||||||
DetectX86Features();
|
DetectX86Features();
|
||||||
return g_cacheLineSize;
|
return g_cacheLineSize;
|
||||||
}
|
}
|
||||||
|
//@}
|
||||||
|
|
||||||
#endif // CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X64
|
#endif // CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X64
|
||||||
|
|
||||||
// ***************************** ARM-32, Aarch32 and Aarch64 ***************************** //
|
// ***************************** ARM-32, Aarch32 and Aarch64 ***************************** //
|
||||||
|
|
@ -277,6 +282,9 @@ extern bool g_hasNEON, g_hasPMULL, g_hasCRC32, g_hasAES, g_hasSHA1, g_hasSHA2;
|
||||||
void CRYPTOPP_API DetectArmFeatures();
|
void CRYPTOPP_API DetectArmFeatures();
|
||||||
#endif // CRYPTOPP_DOXYGEN_PROCESSING
|
#endif // CRYPTOPP_DOXYGEN_PROCESSING
|
||||||
|
|
||||||
|
//! \name ARM A-32, Aarch32 and AArch64 CPU FEATURES
|
||||||
|
//@{
|
||||||
|
|
||||||
//! \brief Determine if an ARM processor has Advanced SIMD available
|
//! \brief Determine if an ARM processor has Advanced SIMD available
|
||||||
//! \returns true if the hardware is capable of Advanced SIMD at runtime, false otherwise.
|
//! \returns true if the hardware is capable of Advanced SIMD at runtime, false otherwise.
|
||||||
//! \details Advanced SIMD instructions are available under most ARMv7, Aarch32 and Aarch64.
|
//! \details Advanced SIMD instructions are available under most ARMv7, Aarch32 and Aarch64.
|
||||||
|
|
@ -389,6 +397,9 @@ inline bool HasSHA2()
|
||||||
return false;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//@}
|
||||||
|
|
||||||
#endif // CRYPTOPP_BOOL_ARM32 || CRYPTOPP_BOOL_ARM64
|
#endif // CRYPTOPP_BOOL_ARM32 || CRYPTOPP_BOOL_ARM64
|
||||||
|
|
||||||
// ***************************** PowerPC ***************************** //
|
// ***************************** PowerPC ***************************** //
|
||||||
|
|
@ -403,6 +414,9 @@ extern word32 g_cacheLineSize;
|
||||||
void CRYPTOPP_API DetectPowerpcFeatures();
|
void CRYPTOPP_API DetectPowerpcFeatures();
|
||||||
#endif // CRYPTOPP_DOXYGEN_PROCESSING
|
#endif // CRYPTOPP_DOXYGEN_PROCESSING
|
||||||
|
|
||||||
|
//! \name POWERPC CPU FEATURES
|
||||||
|
//@{
|
||||||
|
|
||||||
//! \brief Determine if a PowerPC processor has Altivec available
|
//! \brief Determine if a PowerPC processor has Altivec available
|
||||||
//! \returns true if the hardware is capable of Altivec at runtime, false otherwise.
|
//! \returns true if the hardware is capable of Altivec at runtime, false otherwise.
|
||||||
//! \details Altivec instructions are available under most modern PowerPCs.
|
//! \details Altivec instructions are available under most modern PowerPCs.
|
||||||
|
|
@ -511,6 +525,8 @@ inline int GetCacheLineSize()
|
||||||
return g_cacheLineSize;
|
return g_cacheLineSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//@}
|
||||||
|
|
||||||
#endif // CRYPTOPP_BOOL_PPC32 || CRYPTOPP_BOOL_PPC64
|
#endif // CRYPTOPP_BOOL_PPC32 || CRYPTOPP_BOOL_PPC64
|
||||||
|
|
||||||
// ***************************** L1 cache line ***************************** //
|
// ***************************** L1 cache line ***************************** //
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue