docs.unity3d.com
    Show / Hide Table of Contents

    Class UnsafeArrayTensorData

    Tensor data storage based on unsafe array

    Inheritance
    Object
    UniqueResourceId
    SharedArrayTensorData
    UnsafeArrayTensorData
    BurstTensorData
    Inherited Members
    SharedArrayTensorData.array
    SharedArrayTensorData.offset
    SharedArrayTensorData.count
    SharedArrayTensorData.ScheduleAsyncDownload(Int32)
    SharedArrayTensorData.Download(TensorShape)
    SharedArrayTensorData.SharedAccess(Int32)
    SharedArrayTensorData.maxCapacity
    SharedArrayTensorData.inUse
    SharedArrayTensorData.isGPUMem
    UniqueResourceId.uniqueId
    UniqueResourceId.GetUniqueId()
    Namespace: Unity.Barracuda
    Syntax
    public class UnsafeArrayTensorData : SharedArrayTensorData, ITensorData, IDisposable, ITensorDataStatistics, IUniqueResource

    Constructors

    UnsafeArrayTensorData(Int32)

    Create UnsafeArrayTensorData with new array

    Declaration
    public UnsafeArrayTensorData(int count)
    Parameters
    Type Name Description
    Int32 count

    element count to reserve

    UnsafeArrayTensorData(ArrayTensorData)

    Create UnsafeArrayTensorData and use shared array

    Declaration
    public UnsafeArrayTensorData(ArrayTensorData sharedArray)
    Parameters
    Type Name Description
    ArrayTensorData sharedArray

    shared array

    UnsafeArrayTensorData(BarracudaArray, Int32, Int32, Boolean)

    Create UnsafeArrayTensorData from supplied array

    Declaration
    protected UnsafeArrayTensorData(BarracudaArray data, int offset = 0, int count = null, bool isReadonly = false)
    Parameters
    Type Name Description
    BarracudaArray data

    data

    Int32 offset

    offset in data

    Int32 count

    element count

    Boolean isReadonly

    read-only flag

    UnsafeArrayTensorData(SharedArrayTensorData)

    Create UnsafeArrayTensorData and use shared array

    Declaration
    public UnsafeArrayTensorData(SharedArrayTensorData sharedArray)
    Parameters
    Type Name Description
    SharedArrayTensorData sharedArray

    shared array

    UnsafeArrayTensorData(TensorShape)

    Create UnsafeArrayTensorData with new array

    Declaration
    public UnsafeArrayTensorData(TensorShape shape)
    Parameters
    Type Name Description
    TensorShape shape

    shape

    Methods

    Dispose()

    Dispose

    Declaration
    public override void Dispose()
    Overrides
    SharedArrayTensorData.Dispose()

    Finalize()

    Finalizer

    Declaration
    protected void Finalize()

    Reserve(Int32)

    Reserve uninitialized memory.

    Declaration
    public override void Reserve(int count)
    Parameters
    Type Name Description
    Int32 count

    element count to reserve

    Overrides
    SharedArrayTensorData.Reserve(Int32)

    ToString()

    Summary

    Declaration
    public override string ToString()
    Returns
    Type Description
    String

    summary

    Overrides
    SharedArrayTensorData.ToString()

    Upload(Single[], TensorShape, Int32)

    Initialize with data. shape is the TensorShape (and thus length) of the data to copy. managedBufferStartIndex is the offset where to start the copy in the data

    Declaration
    public override void Upload(float[] data, TensorShape shape, int managedBufferStartIndex = 0)
    Parameters
    Type Name Description
    Single[] data

    data as float array

    TensorShape shape

    Tensor shape

    Int32 managedBufferStartIndex

    managed buffer start index

    Overrides
    SharedArrayTensorData.Upload(Single[], TensorShape, Int32)
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023