Blaze 3.9
AlignmentCheck.h
Go to the documentation of this file.
1//=================================================================================================
33//=================================================================================================
34
35#ifndef _BLAZE_UTIL_ALIGNMENTCHECK_H_
36#define _BLAZE_UTIL_ALIGNMENTCHECK_H_
37
38
39//*************************************************************************************************
40// Includes
41//*************************************************************************************************
42
43#include <blaze/system/Inline.h>
45
46
47namespace blaze {
48
49//=================================================================================================
50//
51// SIZETRAIT CLASS DEFINITION
52//
53//=================================================================================================
54
55//*************************************************************************************************
67template< typename T >
68BLAZE_ALWAYS_INLINE bool checkAlignment( const T* address )
69{
70 return ( misalignment( address ) == 0UL );
71}
72//*************************************************************************************************
73
74} // namespace blaze
75
76#endif
Header file for the misalignment function.
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
BLAZE_ALWAYS_INLINE size_t misalignment(const T *address)
Computes the misalignment of the given address.
Definition: Misalignment.h:68
BLAZE_ALWAYS_INLINE bool checkAlignment(const T *address)
Checks the alignment of the given address.
Definition: AlignmentCheck.h:68
System settings for the inline keywords.