nupp.gpu.layout

Module contents

Constructors

ConstructorDescription
new

Types

TypeKindDescription
Layoutrecord

Functions

FunctionKindDescription
asStridedfunction
broadcastfunction
dimensionsfunction
extentfunction
isDensefunction
isInjectivefunction
offsetfunction
stridesfunction
subviewfunction
transposefunction

Constructors#

layout.newconstructor#

function layout.new(offset: integer, shape: {integer}, strides: {integer}): layout.Layout

Arguments

NameTypeDescription
offsetinteger
shape{integer}
strides{integer}

Returns

TypeDescription
layout.Layout

Types#

Layoutrecord#

record layout.Layout

    readonly count: integer
end

Fields

count#
count: integer

Functions#

layout.asStridedfunction#

function layout.asStrided(borrows value: layout.Layout, shape: {integer}, strides: {integer}, relativeOffset: integer): layout.Layout

Arguments

NameTypeDescription
borrows valuelayout.Layout
shape{integer}
strides{integer}
relativeOffsetinteger

Returns

TypeDescription
layout.Layout

layout.broadcastfunction#

function layout.broadcast(borrows value: layout.Layout, shape: {integer}): layout.Layout

Arguments

NameTypeDescription
borrows valuelayout.Layout
shape{integer}

Returns

TypeDescription
layout.Layout

layout.dimensionsfunction#

function layout.dimensions(borrows value: layout.Layout): {integer}

Arguments

NameTypeDescription
borrows valuelayout.Layout

Returns

TypeDescription
{integer}

layout.extentfunction#

function layout.extent(borrows value: layout.Layout): integer

Arguments

NameTypeDescription
borrows valuelayout.Layout

Returns

TypeDescription
integer

layout.isDensefunction#

function layout.isDense(borrows value: layout.Layout): boolean

Arguments

NameTypeDescription
borrows valuelayout.Layout

Returns

TypeDescription
boolean

layout.isInjectivefunction#

function layout.isInjective(borrows value: layout.Layout): boolean

Arguments

NameTypeDescription
borrows valuelayout.Layout

Returns

TypeDescription
boolean

layout.offsetfunction#

function layout.offset(borrows value: layout.Layout): integer

Arguments

NameTypeDescription
borrows valuelayout.Layout

Returns

TypeDescription
integer

layout.stridesfunction#

function layout.strides(borrows value: layout.Layout): {integer}

Arguments

NameTypeDescription
borrows valuelayout.Layout

Returns

TypeDescription
{integer}

layout.subviewfunction#

function layout.subview(borrows value: layout.Layout, origin: {integer}, shape: {integer}): layout.Layout

Arguments

NameTypeDescription
borrows valuelayout.Layout
origin{integer}
shape{integer}

Returns

TypeDescription
layout.Layout

layout.transposefunction#

function layout.transpose(borrows value: layout.Layout, order: {integer}): layout.Layout

Arguments

NameTypeDescription
borrows valuelayout.Layout
order{integer}

Returns

TypeDescription
layout.Layout