MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ download_to_view()

template<typename T >
Kakshya::DataAccess MayaFlux::Buffers::download_to_view ( const std::shared_ptr< VKBuffer > &  source,
Kakshya::DataVariant target_variant,
const std::vector< Kakshya::DataDimension > &  dimensions,
Kakshya::DataModality  modality,
const std::shared_ptr< VKBuffer > &  staging = nullptr 
)

Download GPU buffer to DataAccess-compatible format (precision-preserving)

Definition at line 241 of file StagingUtils.hpp.

247{
248 size_t element_count = source->get_size_bytes() / sizeof(T);
249
250 std::vector<T> temp_buffer(element_count);
251 download_from_gpu(source, temp_buffer, staging);
252
253 target_variant = std::move(temp_buffer);
254
255 return Kakshya::DataAccess(target_variant, dimensions, modality);
256}
Type-erased accessor for NDData with semantic view construction.
void download_from_gpu(const std::shared_ptr< VKBuffer > &source, void *data, size_t size, const std::shared_ptr< VKBuffer > &staging)
Download from GPU buffer to raw data (auto-detects host-visible vs device-local)

References download_from_gpu().

+ Here is the call graph for this function: