8#ifndef INCLUDED_BSLS_ALIGNMENTIMP
9#define INCLUDED_BSLS_ALIGNMENTIMP
253#include <bsls_platform.h>
292 struct AlignmentCalc {
306 AlignmentCalc(
const AlignmentCalc&);
315 VALUE =
sizeof(AlignmentCalc) -
sizeof(TYPE)
322#if defined(BSLS_PLATFORM_CPU_POWERPC) && defined(BSLS_PLATFORM_OS_LINUX)
343 typedef AlignmentImpTag<VALUE>
Tag;
348#if defined(BSLS_PLATFORM_CPU_X86) && !defined(BSLS_PLATFORM_CMP_MSVC)
354struct AlignmentImp8ByteAlignedType {
359 long long d_dummy __attribute__((__aligned__(8)));
366struct AlignmentImp16ByteAlignedType {
371 long long d_dummy __attribute__((__aligned__(16)));
381template <
int PRIORITY>
402 typedef void (*Type)();
445#if defined(BSLS_PLATFORM_CPU_X86) && !defined(BSLS_PLATFORM_CMP_MSVC)
448 typedef AlignmentImp8ByteAlignedType Type;
451struct AlignmentImpPriorityToType<14> {
452 typedef AlignmentImp16ByteAlignedType Type;
496# define BSLS_ALIGNMENTIMP_MATCH_FUNC(T, P) \
497 bsls::AlignmentImpTag<P> match( \
498 bsls::AlignmentImpCalc<T>::Tag, \
499 bsls::AlignmentImpTag<static_cast<int>(sizeof(T))>, \
500 bsls::AlignmentImp_Priority<P>)
519#if defined(BSLS_PLATFORM_CPU_X86) && !defined(BSLS_PLATFORM_CMP_MSVC)
532#undef BSLS_ALIGNMENTIMP_MATCH_FUNC
#define BSLS_ALIGNMENTIMP_MATCH_FUNC(T, P)
Definition bsls_alignmentimp.h:496
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
Definition bdlt_iso8601util.h:691
Definition bsls_alignmentimp.h:279
AlignmentImpTag< VALUE > Tag
Alias for the unique type for each alignment value.
Definition bsls_alignmentimp.h:319
@ VALUE
Definition bsls_alignmentimp.h:315
Definition bsls_alignmentimp.h:494
AlignmentImp_Priority< 12 > MaxPriority
Definition bsls_alignmentimp.h:526
static BSLS_ALIGNMENTIMP_MATCH_FUNC(long long, 8)
static BSLS_ALIGNMENTIMP_MATCH_FUNC(int, 10)
static BSLS_ALIGNMENTIMP_MATCH_FUNC(wchar_t, 6)
static BSLS_ALIGNMENTIMP_MATCH_FUNC(float, 3)
static BSLS_ALIGNMENTIMP_MATCH_FUNC(long, 9)
static BSLS_ALIGNMENTIMP_MATCH_FUNC(long double, 1)
static BSLS_ALIGNMENTIMP_MATCH_FUNC(short, 11)
static BSLS_ALIGNMENTIMP_MATCH_FUNC(double, 2)
static BSLS_ALIGNMENTIMP_MATCH_FUNC(char, 12)
static BSLS_ALIGNMENTIMP_MATCH_FUNC(bool, 7)
static BSLS_ALIGNMENTIMP_MATCH_FUNC(void(*)(), 4)
static BSLS_ALIGNMENTIMP_MATCH_FUNC(void *, 5)
int Type
Definition bsls_alignmentimp.h:432
short Type
Definition bsls_alignmentimp.h:437
char Type
Definition bsls_alignmentimp.h:442
long double Type
Definition bsls_alignmentimp.h:387
double Type
Definition bsls_alignmentimp.h:392
float Type
Definition bsls_alignmentimp.h:397
void * Type
Definition bsls_alignmentimp.h:407
wchar_t Type
Definition bsls_alignmentimp.h:412
bool Type
Definition bsls_alignmentimp.h:417
long long Type
Definition bsls_alignmentimp.h:422
long Type
Definition bsls_alignmentimp.h:427
Definition bsls_alignmentimp.h:382
Definition bsls_alignmentimp.h:266
char d_dummy[SIZE]
Definition bsls_alignmentimp.h:269
Definition bsls_alignmentimp.h:466