介面 TextureConstructorParameters<T>

表示用於從 WebGL 紋理構造張量的引數

interface TextureConstructorParameters<T> {
    dims: readonly number[];
    location: "texture";
    texture: WebGLTexture;
    type: T;
    dispose?(): void;
    download?(): Promise<DataTypeMap[T]>;
}

型別引數

繼承層次結構

  • CommonConstructorParameters<T>
  • GpuResourceConstructorParameters<T>
    • TextureConstructorParameters

屬性

dims: readonly number[]

獲取張量的維度。

location: "texture"

指定資料位置為“紋理”。

texture: WebGLTexture

指定包含張量資料的 WebGL 紋理。

type: T

指定張量的資料型別。

方法

  • 一個可選的回撥函式,當張量被釋放時將被呼叫。

    如果未提供,張量將把 GPU 資料視為外部資源。

    返回 void

  • 一個可選的回撥函式,用於將資料從 GPU 下載到 CPU。

    如果未提供,張量將把 GPU 資料視為外部資源。

    返回 Promise<DataTypeMap[T]>

使用 TypeDoc 生成