Blaze  3.6
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 
43 #include <blaze/system/Debugging.h>
45 #include <blaze/util/Types.h>
46 
47 
48 namespace blaze {
49 
50 //=================================================================================================
51 //
52 // BLOCKING SETTINGS
53 //
54 //=================================================================================================
55 
56 //*************************************************************************************************
58 constexpr size_t DEFAULT_BLOCK_SIZE = 256UL;
59 
60 constexpr size_t MMM_DEFAULT_OUTER_BLOCK_SIZE = 112UL;
61 constexpr size_t MMM_DEFAULT_INNER_BLOCK_SIZE = 96UL;
63 //*************************************************************************************************
64 
65 
66 //*************************************************************************************************
68 constexpr size_t DEBUG_BLOCK_SIZE = 8UL;
69 
70 constexpr size_t MMM_DEBUG_OUTER_BLOCK_SIZE = 16UL;
71 constexpr size_t MMM_DEBUG_INNER_BLOCK_SIZE = 16UL;
73 //*************************************************************************************************
74 
75 
76 //*************************************************************************************************
78 constexpr size_t BLOCK_SIZE = ( BLAZE_DEBUG_MODE ? DEBUG_BLOCK_SIZE : DEFAULT_BLOCK_SIZE );
79 
80 constexpr size_t MMM_OUTER_BLOCK_SIZE = ( BLAZE_DEBUG_MODE ? MMM_DEBUG_OUTER_BLOCK_SIZE : MMM_DEFAULT_OUTER_BLOCK_SIZE );
81 constexpr 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 //*************************************************************************************************
98 namespace {
99 
100 BLAZE_STATIC_ASSERT( blaze::BLOCK_SIZE >= 4UL );
101 
102 BLAZE_STATIC_ASSERT( blaze::MMM_OUTER_BLOCK_SIZE >= 16UL && blaze::MMM_OUTER_BLOCK_SIZE % 16UL == 0UL );
103 BLAZE_STATIC_ASSERT( blaze::MMM_INNER_BLOCK_SIZE >= 16UL && blaze::MMM_INNER_BLOCK_SIZE % 16UL == 0UL );
104 
105 }
107 //*************************************************************************************************
108 
109 #endif
Header file for basic type definitions.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
Compile time assertion.
#define BLAZE_STATIC_ASSERT(expr)
Compile time assertion macro.In case of an invalid compile time expression, a compilation error is cr...
Definition: StaticAssert.h:112
System settings for the debugging policy of the Blaze library.