48 template <
typename T_DATA >
51 template <
typename T_DATA >
52 ThreadData< T_DATA >::ThreadData(T_DATA&& theData) : data(
std::move(theData)) {}
54 template <
typename T_DATA >
55 ThreadData< T_DATA >::ThreadData(
const ThreadData< T_DATA >& from) : data(from.data) {}
57 template <
typename T_DATA >
58 ThreadData< T_DATA >::ThreadData(ThreadData< T_DATA >&& from) : data(
std::move(from.data)) {}
60 template <
typename T_DATA >
61 ThreadData< T_DATA >& ThreadData< T_DATA >::operator=(
const ThreadData< T_DATA >& from) =
default;
63 template <
typename T_DATA >
64 ThreadData< T_DATA >& ThreadData< T_DATA >::operator=(ThreadData< T_DATA >&& from) {
65 data = std::move(from.data);
69 template <
typename T_DATA >
70 bool ThreadData< T_DATA >::operator==(
const ThreadData< T_DATA >& from)
const {
71 return data == from.data;
74 template <
typename T_DATA >
75 bool ThreadData< T_DATA >::operator==(
const T_DATA& from)
const {
79 template <
typename T_DATA >
80 bool ThreadData< T_DATA >::operator!=(
const ThreadData< T_DATA >& from)
const {
81 return data != from.data;
84 template <
typename T_DATA >
85 bool ThreadData< T_DATA >::operator!=(
const T_DATA& from)
const {
89 template <
typename T_DATA >
90 typename ThreadData< T_DATA >::data_type ThreadData< T_DATA >::operator*() {
94 template <
typename T_DATA >
95 template <
typename X >
96 std::enable_if_t< std::is_pointer< X >::value,
typename ThreadData< T_DATA >::data_pointer >
101 template <
typename T_DATA >
102 template <
typename X >
gum is the global namespace for all aGrUM entities
ThreadData(const T_DATA &theData)
default constructor
typename std::conditional< std::is_pointer< T_DATA >::value, T_DATA, typename std::add_pointer< T_DATA >::type >::type data_pointer
the data we wish to store without cacheline parallel problem
std::enable_if_t< std::is_pointer< X >::value, data_pointer > operator->()
the data we wish to store without cacheline parallel problem
T_DATA data
the data we wish to store without cacheline parallel problem
A wrapper that enables to store data in a way that prevents false cacheline sharing.