16#ifndef ITSTRACKINGGPU_UTILS_H_
17#define ITSTRACKINGGPU_UTILS_H_
27template <
typename T1,
typename T2>
45 GPUd()
ref operator[](
unsigned int idx)
const {
return _data[idx]; }
67 GPUd()
ref operator[](
unsigned int idx)
const {
return _data[idx]; }
90 using Handle = hipStream_t;
92#elif defined(__CUDACC__)
93 using Handle = cudaStream_t;
102#if defined(__HIPCC__)
104#elif defined(__CUDACC__)
113#if defined(__HIPCC__)
115#elif defined(__CUDACC__)
121 operator bool()
const {
return mHandle !=
Default; }
125#if defined(__HIPCC__)
127#elif defined(__CUDACC__)
135static_assert(
sizeof(Stream) ==
sizeof(
void*),
"Stream type must match pointer type!");
142 size_t size() const noexcept {
return mStreams.size(); }
149 std::vector<Stream> mStreams;
Class for time synchronization of RawReader instances.
static constexpr Handle Default
Stream(unsigned int flags=0)
void push_back(const Stream &stream)
auto & operator[](size_t i)
size_t size() const noexcept
GPUd() gpuSpan(const gpuSpan< T > &other)
GPUd() bool empty() const
GPUd() ref operator[](unsigned int idx) const
GPUd() unsigned int size() const
GPUd() bool empty() const
GPUd() ref operator[](unsigned int idx) const
GPUd() unsigned int size() const
VectorOfTObjectPtrs other