Blaze 3.9
Clear.h
Go to the documentation of this file.
1//=================================================================================================
33//=================================================================================================
34
35#ifndef _BLAZE_MATH_SHIMS_CLEAR_H_
36#define _BLAZE_MATH_SHIMS_CLEAR_H_
37
38
39//*************************************************************************************************
40// Includes
41//*************************************************************************************************
42
45#include <blaze/system/Inline.h>
46#include <blaze/util/EnableIf.h>
47
48
49namespace blaze {
50
51//=================================================================================================
52//
53// CLEAR SHIM
54//
55//=================================================================================================
56
57//*************************************************************************************************
67template< typename T
68 , EnableIf_t< IsScalar_v<T> || IsSIMDPack_v<T> >* = nullptr >
69BLAZE_ALWAYS_INLINE constexpr void clear( T& clearable )
70{
71 clearable = T();
72}
73//*************************************************************************************************
74
75} // namespace blaze
76
77#endif
Header file for the EnableIf class template.
Header file for the IsSIMDPack type trait.
Header file for the IsScalar type trait.
BLAZE_ALWAYS_INLINE constexpr void clear(T &clearable)
Clearing the given value/object to the default state.
Definition: Clear.h:69
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
System settings for the inline keywords.