Show / Hide Table of Contents

# Class FixedBufferOnnxValue

Represents an OrtValue with its underlying buffer pinned

##### Inheritance

System.Object
FixedBufferOnnxValue

###### Namespace: Microsoft.ML.OnnxRuntime

###### Assembly: cs.temp.dll.dll

##### Syntax

    public class FixedBufferOnnxValue : IDisposable

### Methods

#### CreateFromMemory<T>(OrtMemoryInfo, Memory<T>, TensorElementType, Int64[], Int64)

##### Declaration

    public static FixedBufferOnnxValue CreateFromMemory<T>(OrtMemoryInfo memoryInfo, Memory<T> memory, TensorElementType elementType, long[] shape, long bytesSize)

##### Parameters

Type | Name | Description
--- | --- | ---
OrtMemoryInfo | memoryInfo |
Memory<T> | memory |
TensorElementType | elementType |
System.Int64[] | shape |
System.Int64 | bytesSize |

##### Returns

Type | Description
--- | ---
FixedBufferOnnxValue |

##### Type Parameters

Name | Description
--- | ---
T |

#### CreateFromTensor<T>(Tensor<T>)

Creates a FixedBufferOnnxValue object from the tensor and pins its underlying buffer.

##### Declaration

    public static FixedBufferOnnxValue CreateFromTensor<T>(Tensor<T> value)

##### Parameters

Type | Name | Description
--- | --- | ---
Tensor<T> | value |

##### Returns

Type | Description
--- | ---
FixedBufferOnnxValue | a disposable instance of FixedBufferOnnxValue

##### Type Parameters

Name | Description
--- | ---
T |

#### Dispose()

IDisposable implementation

##### Declaration

    public void Dispose()

#### Dispose(Boolean)

IDisposable implementation

##### Declaration

    protected virtual void Dispose(bool disposing)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Boolean | disposing | true if invoked from Dispose()