void accessor<BufferT>::set(const range& blk, uint32_t offset, uint32_t count, const type* p) { if(!blk.is_valid() || offset + count > blk.count || !is_mapped()) return; const uint32_t idx = map_start_ == 0 ? blk.start + offset : offset; buffer_ptr_->mapped_copy(p, idx, count); enqueue_flush(range(idx, count)); }
void accessor<BufferT>::set(const range& blk, uint32_t offset, const std::vector<type>& v) { if(!blk.is_valid() || offset + v.size() > blk.count || !is_mapped()) return; const uint32_t idx = map_start_ == 0 ? blk.start + offset : offset, count = uint32_t(v.size()); buffer_ptr_->mapped_copy(v, idx, count); enqueue_flush(range(idx, uint32_t(v.size()))); }
void accessor<BufferT>::set(const range& blk, uint32_t offset, const type& i) { if(!blk.is_valid() || offset >= blk.count || !is_mapped()) return; const auto idx = map_start_ == 0 ? blk.start + offset : offset; buffer_ptr_->operator[](idx) = i; enqueue_flush(range(idx, 1)); }