29 template<
class C,
class Allocator = std::allocator<C> >
33 std::vector<C,Allocator> m_array;
41 gsThreaded() : m_array(omp_get_max_threads()) { }
44 operator C&() {
return m_array[omp_get_thread_num()]; }
45 operator const C&()
const {
return m_array[omp_get_thread_num()]; }
48 C& mine() {
return m_array[omp_get_thread_num()]; }
49 const C& mine()
const {
return m_array[omp_get_thread_num()]; }
52 C& operator = (C other) {
return m_array[omp_get_thread_num()] =
give(other); }
54 operator C&() {
return m_c; }
56 operator const C&()
const {
return m_c; }
59 C& mine() {
return m_c; }
60 const C& mine()
const {
return m_c; }
63 C& operator = (C other) {
return m_c =
give(other); }
S give(S &x)
Definition: gsMemory.h:266