Show / Hide Table of Contents

    Method usingPtrAndType

    val usingPtrAndType: CUdeviceptr -> SizeT -> Type -> TensorLayout -> ITensor

    Creates a tensor from the given CUDA pointer, allocation size in bytes, type and layout.

    Declaration
    val usingPtrAndType: ptr:CUdeviceptr -> sizeInBytes:SizeT -> typ:Type -> layout:TensorLayout -> ITensor
    Parameters
    Type Name Description
    ManagedCuda.BasicTypes.CUdeviceptr ptr

    A CUDA device pointer.

    ManagedCuda.BasicTypes.SizeT sizeInBytes

    Size of the allocation referenced by ptr in bytes.

    System.Type typ

    Type of contained data.

    TensorLayout layout

    Layout of the tensor.

    Returns
    Type Description
    ITensor
    Remarks

    This function creates a tensor using existing data in GPU memory.

    The data is referenced. Thus changing values within the tensor affects the original data.

    Back to top Generated by DocFX