MCPcopy Create free account
hub / github.com/NVIDIA/DALI / CopyOut

Method CopyOut

dali/c_api_2/data_objects.h:750–764  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

748 }
749
750 void CopyOut(
751 void *dst_buffer,
752 daliBufferPlacement_t dst_buffer_placement,
753 std::optional<cudaStream_t> stream,
754 daliCopyFlags_t flags) override {
755 Validate(dst_buffer_placement);
756 AccessOrder order = stream ? *stream : tl_->order();
757 mm::memory_kind_id mem_kind = GetMemoryKind(dst_buffer_placement);
758 std::optional<int> dev_id;
759 if (dst_buffer_placement.device_type == DALI_STORAGE_GPU)
760 dev_id = dst_buffer_placement.device_id;
761 CopyToExternal(dst_buffer, mem_kind, dev_id, *tl_, order, flags & DALI_COPY_USE_KERNEL);
762 if (flags & DALI_COPY_SYNC)
763 AccessOrder::host().wait(order);
764 }
765
766 const auto &NativePtr() const & {
767 return tl_;

Callers

nothing calls this directly

Calls 5

ValidateFunction · 0.85
GetMemoryKindFunction · 0.85
CopyToExternalFunction · 0.85
hostFunction · 0.50
waitMethod · 0.45

Tested by

no test coverage detected