gpu.cpp 0.1.0
 
Loading...
Searching...
No Matches
gpu::Tensor Struct Reference

Represents a tensor on the GPU, which is a buffer of values with a shape. More...

#include <gpu.h>

Public Attributes

Array data
 
Shape shape
 

Detailed Description

Represents a tensor on the GPU, which is a buffer of values with a shape.

Tensor tensor = createTensor(ctx, {256, 256}, kf32);
Tensor createTensor(TensorPool &pool, WGPUDevice &device, const Shape &shape, NumType dtype, WGPUBufferUsageFlags usage=WGPUBufferUsage_Storage|WGPUBufferUsage_CopyDst|WGPUBufferUsage_CopySrc)
Tensor factory function to create a tensor (a Tensor type is simply an Array with an N-dimensional Sh...
Definition gpu.h:491
@ kf32
Definition gpu.h:185
Represents a tensor on the GPU, which is a buffer of values with a shape.
Definition gpu.h:96

Definition at line 96 of file gpu.h.

Member Data Documentation

◆ data

Array gpu::Tensor::data

Definition at line 97 of file gpu.h.

◆ shape

Shape gpu::Tensor::shape

Definition at line 98 of file gpu.h.


The documentation for this struct was generated from the following file: