Table of Contents

Class ArraySlice

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

Methods

Allocate(NPTypeCode, int)

public static IArraySlice Allocate(NPTypeCode typeCode, int count)

Parameters

typeCode NPTypeCode
count int

Returns

IArraySlice

Allocate(NPTypeCode, int, bool)

public static IArraySlice Allocate(NPTypeCode typeCode, int count, bool fillDefault)

Parameters

typeCode NPTypeCode
count int
fillDefault bool

Returns

IArraySlice

Allocate(NPTypeCode, int, object)

public static IArraySlice Allocate(NPTypeCode typeCode, int count, object fill)

Parameters

typeCode NPTypeCode
count int
fill object

Returns

IArraySlice

Allocate(Type, int)

public static IArraySlice Allocate(Type elementType, int count)

Parameters

elementType Type
count int

Returns

IArraySlice

Allocate(Type, int, bool)

public static IArraySlice Allocate(Type elementType, int count, bool fillDefault)

Parameters

elementType Type
count int
fillDefault bool

Returns

IArraySlice

Allocate(Type, int, object)

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

Parameters

elementType Type
count int
fill object

Returns

IArraySlice

Allocate<T>(int)

Allocate an array filled with noisy memory.

public static ArraySlice<T> Allocate<T>(int count) where T : unmanaged

Parameters

count int

How many items this array will have (aka Count).

Returns

ArraySlice<T>

A newly allocated array.

Type Parameters

T

Allocate<T>(int, bool)

Allocate an array filled with default value of T.

public static ArraySlice<T> Allocate<T>(int count, bool fillDefault) where T : unmanaged

Parameters

count int

How many items this array will have (aka Count).

fillDefault bool

Should the newly allocated memory be filled with the default of T

Returns

ArraySlice<T>

A newly allocated array.

Type Parameters

T

Allocate<T>(int, T)

Allocate an array filled filled with fill.

public static ArraySlice<T> Allocate<T>(int count, T fill) where T : unmanaged

Parameters

count int

How many items this array will have (aka Count).

fill T

The item to fill the newly allocated memory with.

Returns

ArraySlice<T>

A newly allocated array.

Type Parameters

T

FromArray(Array, bool)

public static IArraySlice FromArray(Array arr, bool copy = false)

Parameters

arr Array
copy bool

Returns

IArraySlice

FromArray(bool[], bool)

public static ArraySlice<bool> FromArray(bool[] bools, bool copy = false)

Parameters

bools bool[]
copy bool

Returns

ArraySlice<bool>

FromArray(byte[], bool)

public static ArraySlice<byte> FromArray(byte[] bytes, bool copy = false)

Parameters

bytes byte[]
copy bool

Returns

ArraySlice<byte>

FromArray(char[], bool)

public static ArraySlice<char> FromArray(char[] chars, bool copy = false)

Parameters

chars char[]
copy bool

Returns

ArraySlice<char>

FromArray(decimal[], bool)

public static ArraySlice<decimal> FromArray(decimal[] decimals, bool copy = false)

Parameters

decimals decimal[]
copy bool

Returns

ArraySlice<decimal>

FromArray(double[], bool)

public static ArraySlice<double> FromArray(double[] doubles, bool copy = false)

Parameters

doubles double[]
copy bool

Returns

ArraySlice<double>

FromArray(short[], bool)

public static ArraySlice<short> FromArray(short[] shorts, bool copy = false)

Parameters

shorts short[]
copy bool

Returns

ArraySlice<short>

FromArray(int[], bool)

public static ArraySlice<int> FromArray(int[] ints, bool copy = false)

Parameters

ints int[]
copy bool

Returns

ArraySlice<int>

FromArray(long[], bool)

public static ArraySlice<long> FromArray(long[] longs, bool copy = false)

Parameters

longs long[]
copy bool

Returns

ArraySlice<long>

FromArray(float[], bool)

public static ArraySlice<float> FromArray(float[] floats, bool copy = false)

Parameters

floats float[]
copy bool

Returns

ArraySlice<float>

FromArray(ushort[], bool)

public static ArraySlice<ushort> FromArray(ushort[] ushorts, bool copy = false)

Parameters

ushorts ushort[]
copy bool

Returns

ArraySlice<ushort>

FromArray(uint[], bool)

public static ArraySlice<uint> FromArray(uint[] uints, bool copy = false)

Parameters

uints uint[]
copy bool

Returns

ArraySlice<uint>

FromArray(ulong[], bool)

public static ArraySlice<ulong> FromArray(ulong[] ulongs, bool copy = false)

Parameters

ulongs ulong[]
copy bool

Returns

ArraySlice<ulong>

FromArray<T>(T[,,,,,,,,,,,,,,,], bool)

public static ArraySlice<T> FromArray<T>(T[,,,,,,,,,,,,,,,] array, bool copy = false) where T : unmanaged

Parameters

array T[,,,,,,,,,,,,,,,]
copy bool

Returns

ArraySlice<T>

Type Parameters

T

FromArray<T>(T[,,,,,,,,,,,,,,], bool)

public static ArraySlice<T> FromArray<T>(T[,,,,,,,,,,,,,,] array, bool copy = false) where T : unmanaged

Parameters

array T[,,,,,,,,,,,,,,]
copy bool

Returns

ArraySlice<T>

Type Parameters

T

FromArray<T>(T[,,,,,,,,,,,,,], bool)

public static ArraySlice<T> FromArray<T>(T[,,,,,,,,,,,,,] array, bool copy = false) where T : unmanaged

Parameters

array T[,,,,,,,,,,,,,]
copy bool

Returns

ArraySlice<T>

Type Parameters

T

FromArray<T>(T[,,,,,,,,,,,,], bool)

public static ArraySlice<T> FromArray<T>(T[,,,,,,,,,,,,] array, bool copy = false) where T : unmanaged

Parameters

array T[,,,,,,,,,,,,]
copy bool

Returns

ArraySlice<T>

Type Parameters

T

FromArray<T>(T[,,,,,,,,,,,], bool)

public static ArraySlice<T> FromArray<T>(T[,,,,,,,,,,,] array, bool copy = false) where T : unmanaged

Parameters

array T[,,,,,,,,,,,]
copy bool

Returns

ArraySlice<T>

Type Parameters

T

FromArray<T>(T[,,,,,,,,,,], bool)

public static ArraySlice<T> FromArray<T>(T[,,,,,,,,,,] array, bool copy = false) where T : unmanaged

Parameters

array T[,,,,,,,,,,]
copy bool

Returns

ArraySlice<T>

Type Parameters

T

FromArray<T>(T[,,,,,,,,,], bool)

public static ArraySlice<T> FromArray<T>(T[,,,,,,,,,] array, bool copy = false) where T : unmanaged

Parameters

array T[,,,,,,,,,]
copy bool

Returns

ArraySlice<T>

Type Parameters

T

FromArray<T>(T[,,,,,,,,], bool)

public static ArraySlice<T> FromArray<T>(T[,,,,,,,,] array, bool copy = false) where T : unmanaged

Parameters

array T[,,,,,,,,]
copy bool

Returns

ArraySlice<T>

Type Parameters

T

FromArray<T>(T[,,,,,,,], bool)

public static ArraySlice<T> FromArray<T>(T[,,,,,,,] array, bool copy = false) where T : unmanaged

Parameters

array T[,,,,,,,]
copy bool

Returns

ArraySlice<T>

Type Parameters

T

FromArray<T>(T[,,,,,,], bool)

public static ArraySlice<T> FromArray<T>(T[,,,,,,] array, bool copy = false) where T : unmanaged

Parameters

array T[,,,,,,]
copy bool

Returns

ArraySlice<T>

Type Parameters

T

FromArray<T>(T[,,,,,], bool)

public static ArraySlice<T> FromArray<T>(T[,,,,,] array, bool copy = false) where T : unmanaged

Parameters

array T[,,,,,]
copy bool

Returns

ArraySlice<T>

Type Parameters

T

FromArray<T>(T[,,,,], bool)

public static ArraySlice<T> FromArray<T>(T[,,,,] array, bool copy = false) where T : unmanaged

Parameters

array T[,,,,]
copy bool

Returns

ArraySlice<T>

Type Parameters

T

FromArray<T>(T[,,,], bool)

public static ArraySlice<T> FromArray<T>(T[,,,] array, bool copy = false) where T : unmanaged

Parameters

array T[,,,]
copy bool

Returns

ArraySlice<T>

Type Parameters

T

FromArray<T>(T[,,], bool)

public static ArraySlice<T> FromArray<T>(T[,,] array, bool copy = false) where T : unmanaged

Parameters

array T[,,]
copy bool

Returns

ArraySlice<T>

Type Parameters

T

FromArray<T>(T[,], bool)

public static ArraySlice<T> FromArray<T>(T[,] array, bool copy = false) where T : unmanaged

Parameters

array T[,]
copy bool

Returns

ArraySlice<T>

Type Parameters

T

FromArray<T>(T[], bool)

public static ArraySlice<T> FromArray<T>(T[] array, bool copy = false) where T : unmanaged

Parameters

array T[]
copy bool

Returns

ArraySlice<T>

Type Parameters

T

FromBuffer<T>(byte[], bool)

public static ArraySlice<T> FromBuffer<T>(byte[] arr, bool copy = false) where T : unmanaged

Parameters

arr byte[]
copy bool

Returns

ArraySlice<T>

Type Parameters

T

FromMemoryBlock(IMemoryBlock, bool)

public static IArraySlice FromMemoryBlock(IMemoryBlock block, bool copy = false)

Parameters

block IMemoryBlock
copy bool

Returns

IArraySlice

FromPool<T>(StackedMemoryPool)

public static ArraySlice<T> FromPool<T>(StackedMemoryPool pool) where T : unmanaged

Parameters

pool StackedMemoryPool

Returns

ArraySlice<T>

Type Parameters

T

Scalar(object)

Wrap a val inside ArraySlice<T>.

public static IArraySlice Scalar(object val)

Parameters

val object

The value to wrap into an arrayslice.

Returns

IArraySlice

Scalar(object, NPTypeCode)

Wrap a T inside ArraySlice<T>.

public static IArraySlice Scalar(object val, NPTypeCode typeCode)

Parameters

val object

The value to wrap into an arrayslice.

typeCode NPTypeCode

The type expected to be returned

Returns

IArraySlice

Scalar<T>(T)

Wrap a T inside ArraySlice<T>.

public static ArraySlice<T> Scalar<T>(T val) where T : unmanaged

Parameters

val T

Returns

ArraySlice<T>

Type Parameters

T

Wrap<T>(void*, int)

Wrap around a address with given count without claiming ownership of the address.

public static ArraySlice<T> Wrap<T>(void* address, int count) where T : unmanaged

Parameters

address void*

The address at which the memory block starts

count int

The count of items of type T (not bytes count)

Returns

ArraySlice<T>

A wrapped memory block as ArraySlice<T>

Type Parameters

T

Wrap<T>(T*, int)

Wrap around a address with given count without claiming ownership of the address.

public static ArraySlice<T> Wrap<T>(T* address, int count) where T : unmanaged

Parameters

address T*

The address at which the memory block starts

count int

The count of items of type T (not bytes count)

Returns

ArraySlice<T>

A wrapped memory block as ArraySlice<T>

Type Parameters

T