ILNumerics Ultimate VSSizeGetElementSpan Method (Int64)ILNumerics Ultimate VS Documentation
ILNumerics - Technical Application Development
Gets the element index of the last element addressed by a size descriptor.

[ILNumerics Core Module]

Namespace: ILNumerics
Assembly: ILNumerics.Core (in ILNumerics.Core.dll) Version: 5.3.0.0 (5.3.7131.2749)
Syntax

public static long GetElementSpan(
	long* bsd
)

Parameters

bsd
Type: SystemInt64*

Return Value

Type: Int64
Element span.
Remarks

The value computed indicates the size of memory region required to store all elements of an array according to the size descriptor bsd. Basically, the value indicates the element position where the last (highest address) element is stored in the 1-dimensional array / memory region. Since no negative indices are allowed, the 'last' element is the one with index tupels corresponding to the value of "dimension length - 1" for each dimension. The value returned will simply be the sum of such tuple items factored with the corresponding strides.

This value is useful to 1) provide sufficiently large Array for exporting and copying of elements in arbitray storage layouts, and 2) to determine whether a certain storage layout stores the elements continously in memory (for cache performant iteration).

The storage layout is continous, if and only if the value returned is equal to NumberOfElements minus 1.

[ILNumerics Core Module]

See Also

Reference