MCPcopy Create free account
hub / github.com/AnswerDotAI/gpu.cpp / TensorView

Class TensorView

gpu.hpp:116–120  ·  view source on GitHub ↗

* @brief Represents a non-owning view into a tensor specifying an offset and a * subspan. This is useful for specifying a slice of a tensor on the GPU * without copying the data. * * @code * TensorView view = {tensor, 0, 256}; * @endcode */

Source from the content-addressed store, hash-verified

114 * @endcode
115 */
116struct TensorView {
117 Tensor data; // non-owning view
118 size_t offset = 0;
119 size_t span = 0;
120};
121
122/**
123 * @brief Represents an ordered collection of WGPUBuffers (wrapped as tensors,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected