1 #ifndef HeterogeneousCore_CUDAUtilities_interface_SimpleVector_h
2 #define HeterogeneousCore_CUDAUtilities_interface_SimpleVector_h
26 auto previousSize =
m_size;
29 m_data[previousSize] = element;
37 template <
class... Ts>
39 auto previousSize =
m_size;
42 (
new (&
m_data[previousSize])
T(std::forward<Ts>(
args)...));
63 m_data[previousSize] = element;
71 template <
class... Ts>
75 (
new (&
m_data[previousSize])
T(std::forward<Ts>(
args)...));
96 if (previousSize >=
size) {
97 return previousSize -
size;
134 ret->construct(capacity, data);
141 #endif // HeterogeneousCore_CUDAUtilities_interface_SimpleVector_h
tuple ret
prodAgent to be discontinued
constexpr const T & operator[](int i) const
constexpr int size() const
__device__ int shrink(int size=1)
T1 atomicSub(T1 *a, T2 b)
SimpleVector< T > make_SimpleVector(int capacity, T *data)
constexpr void resize(int size)
__device__ int emplace_back(Ts &&...args)
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type * mem
__device__ int push_back(const T &element)
constexpr bool empty() const
constexpr int emplace_back_unsafe(Ts &&...args)
__device__ int extend(int size=1)
__device__ const T & back() const
constexpr int capacity() const
constexpr T const * data() const
constexpr void set_data(T *data)
constexpr SimpleVector()=default
constexpr bool full() const
char data[epos_bytes_allocation]
constexpr T & operator[](int i)
constexpr void construct(int capacity, T *data)
T1 atomicAdd(T1 *a, T2 b)
constexpr int push_back_unsafe(const T &element)