Table of Contents

Class UnmanagedMemoryBlock

Namespace
NumSharp.Backends.Unmanaged
Assembly
NumSharp.dll
public static class UnmanagedMemoryBlock
Inheritance
UnmanagedMemoryBlock
Inherited Members

Methods

Allocate(Type, int)

public static IMemoryBlock Allocate(Type elementType, int count)

Parameters

elementType Type
count int

Returns

IMemoryBlock

Allocate(Type, int, object)

public static IMemoryBlock Allocate(Type elementType, int count, object fill)

Parameters

elementType Type
count int
fill object

Returns

IMemoryBlock

CastTo(IMemoryBlock, IMemoryBlock, int?, int?)

public static void CastTo(this IMemoryBlock source, IMemoryBlock @out, int? bytesOffset = null, int? countOffset = null)

Parameters

source IMemoryBlock
out IMemoryBlock
bytesOffset int?
countOffset int?

Remarks

Returns a copy.

CastTo(IMemoryBlock, NPTypeCode)

public static IMemoryBlock CastTo(this IMemoryBlock source, NPTypeCode to)

Parameters

source IMemoryBlock
to NPTypeCode

The type to cast this memory block to.

Returns

IMemoryBlock

Remarks

Returns a copy.

CastTo<TOut>(IMemoryBlock)

public static IMemoryBlock<TOut> CastTo<TOut>(this IMemoryBlock source) where TOut : unmanaged

Parameters

source IMemoryBlock

Returns

IMemoryBlock<TOut>

Type Parameters

TOut

Remarks

Returns a copy.

CastTo<TIn, TOut>(IMemoryBlock)

public static IMemoryBlock<TOut> CastTo<TIn, TOut>(this IMemoryBlock source) where TIn : unmanaged where TOut : unmanaged

Parameters

source IMemoryBlock

Returns

IMemoryBlock<TOut>

Type Parameters

TIn
TOut

Remarks

Returns a copy.

CastTo<TIn, TOut>(IMemoryBlock<TIn>)

public static IMemoryBlock<TOut> CastTo<TIn, TOut>(this IMemoryBlock<TIn> source) where TIn : unmanaged where TOut : unmanaged

Parameters

source IMemoryBlock<TIn>

Returns

IMemoryBlock<TOut>

Type Parameters

TIn
TOut

Remarks

Returns a copy.

FromArray(Array, bool, Type)

public static IMemoryBlock FromArray(Array arr, bool copy, Type elementType = null)

Parameters

arr Array
copy bool
elementType Type

Returns

IMemoryBlock