Blaze 3.9
Blocking.h
Go to the documentation of this file.
1//=================================================================================================
33//=================================================================================================
34
35#ifndef _BLAZE_SYSTEM_BLOCKING_H_
36#define _BLAZE_SYSTEM_BLOCKING_H_
37
38
39//*************************************************************************************************
40// Includes
41//*************************************************************************************************
42
45#include <blaze/util/Types.h>
46
47
48namespace blaze {
49
50//=================================================================================================
51//
52// BLOCKING SETTINGS
53//
54//=================================================================================================
55
56//*************************************************************************************************
58constexpr size_t DEFAULT_BLOCK_SIZE = 256UL;
59
60constexpr size_t MMM_DEFAULT_OUTER_BLOCK_SIZE = 112UL;
61constexpr size_t MMM_DEFAULT_INNER_BLOCK_SIZE = 96UL;
63//*************************************************************************************************
64
65
66//*************************************************************************************************
68constexpr size_t DEBUG_BLOCK_SIZE = 8UL;
69
70constexpr size_t MMM_DEBUG_OUTER_BLOCK_SIZE = 16UL;
71constexpr size_t MMM_DEBUG_INNER_BLOCK_SIZE = 16UL;
73//*************************************************************************************************
74
75
76//*************************************************************************************************
78constexpr size_t BLOCK_SIZE = ( BLAZE_DEBUG_MODE ? DEBUG_BLOCK_SIZE : DEFAULT_BLOCK_SIZE );
79
80constexpr size_t MMM_OUTER_BLOCK_SIZE = ( BLAZE_DEBUG_MODE ? MMM_DEBUG_OUTER_BLOCK_SIZE : MMM_DEFAULT_OUTER_BLOCK_SIZE );
81constexpr size_t MMM_INNER_BLOCK_SIZE = ( BLAZE_DEBUG_MODE ? MMM_DEBUG_INNER_BLOCK_SIZE : MMM_DEFAULT_INNER_BLOCK_SIZE );
83//*************************************************************************************************
84
85} // namespace blaze
86
87
88
89
90//=================================================================================================
91//
92// COMPILE TIME CONSTRAINT
93//
94//=================================================================================================
95
96//*************************************************************************************************
98namespace {
99
100BLAZE_STATIC_ASSERT( blaze::BLOCK_SIZE >= 4UL );
101
102BLAZE_STATIC_ASSERT( blaze::MMM_OUTER_BLOCK_SIZE >= 16UL && blaze::MMM_OUTER_BLOCK_SIZE % 16UL == 0UL );
103BLAZE_STATIC_ASSERT( blaze::MMM_INNER_BLOCK_SIZE >= 16UL && blaze::MMM_INNER_BLOCK_SIZE % 16UL == 0UL );
104
105}
107//*************************************************************************************************
108
109#endif
Compile time assertion.
#define BLAZE_STATIC_ASSERT(expr)
Compile time assertion macro.
Definition: StaticAssert.h:112
System settings for the debugging policy of the Blaze library.
Header file for basic type definitions.