Blaze 3.9
Reset.h
Go to the documentation of this file.
1//=================================================================================================
33//=================================================================================================
34
35#ifndef _BLAZE_MATH_SHIMS_RESET_H_
36#define _BLAZE_MATH_SHIMS_RESET_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// RESET SHIM
54//
55//=================================================================================================
56
57//*************************************************************************************************
67template< typename T
68 , EnableIf_t< IsScalar_v<T> || IsSIMDPack_v<T> >* = nullptr >
69BLAZE_ALWAYS_INLINE constexpr void reset( T& resettable )
70{
71 resettable = 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 reset(T &resettable)
Resetting the given value/object to the default value.
Definition: Reset.h:69
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
System settings for the inline keywords.