# `nupp.gpu.layout`
## Constructors
### `layout.new` _constructor_
```nupp
function layout.new(offset: integer, shape: {integer}, strides: {integer}): layout.Layout
```
#### Arguments
| Name | Type | Description |
| --- | --- | --- |
| `offset` | `integer` | |
| `shape` | `{integer}` | |
| `strides` | `{integer}` | |
#### Returns
| Type | Description |
| --- | --- |
| `layout.Layout` | |
## Types
### `Layout` _record_
```nupp
record layout.Layout
readonly count: integer
end
```
#### Fields
##### `count`
```nupp
count: integer
```
## Functions
### `layout.asStrided` _function_
```nupp
function layout.asStrided(borrows value: layout.Layout, shape: {integer}, strides: {integer}, relativeOffset: integer): layout.Layout
```
#### Arguments
| Name | Type | Description |
| --- | --- | --- |
| `borrows value` | `layout.Layout` | |
| `shape` | `{integer}` | |
| `strides` | `{integer}` | |
| `relativeOffset` | `integer` | |
#### Returns
| Type | Description |
| --- | --- |
| `layout.Layout` | |
### `layout.broadcast` _function_
```nupp
function layout.broadcast(borrows value: layout.Layout, shape: {integer}): layout.Layout
```
#### Arguments
| Name | Type | Description |
| --- | --- | --- |
| `borrows value` | `layout.Layout` | |
| `shape` | `{integer}` | |
#### Returns
| Type | Description |
| --- | --- |
| `layout.Layout` | |
### `layout.dimensions` _function_
```nupp
function layout.dimensions(borrows value: layout.Layout): {integer}
```
#### Arguments
| Name | Type | Description |
| --- | --- | --- |
| `borrows value` | `layout.Layout` | |
#### Returns
| Type | Description |
| --- | --- |
| `{integer}` | |
### `layout.extent` _function_
```nupp
function layout.extent(borrows value: layout.Layout): integer
```
#### Arguments
| Name | Type | Description |
| --- | --- | --- |
| `borrows value` | `layout.Layout` | |
#### Returns
| Type | Description |
| --- | --- |
| `integer` | |
### `layout.isDense` _function_
```nupp
function layout.isDense(borrows value: layout.Layout): boolean
```
#### Arguments
| Name | Type | Description |
| --- | --- | --- |
| `borrows value` | `layout.Layout` | |
#### Returns
| Type | Description |
| --- | --- |
| `boolean` | |
### `layout.isInjective` _function_
```nupp
function layout.isInjective(borrows value: layout.Layout): boolean
```
#### Arguments
| Name | Type | Description |
| --- | --- | --- |
| `borrows value` | `layout.Layout` | |
#### Returns
| Type | Description |
| --- | --- |
| `boolean` | |
### `layout.offset` _function_
```nupp
function layout.offset(borrows value: layout.Layout): integer
```
#### Arguments
| Name | Type | Description |
| --- | --- | --- |
| `borrows value` | `layout.Layout` | |
#### Returns
| Type | Description |
| --- | --- |
| `integer` | |
### `layout.strides` _function_
```nupp
function layout.strides(borrows value: layout.Layout): {integer}
```
#### Arguments
| Name | Type | Description |
| --- | --- | --- |
| `borrows value` | `layout.Layout` | |
#### Returns
| Type | Description |
| --- | --- |
| `{integer}` | |
### `layout.subview` _function_
```nupp
function layout.subview(borrows value: layout.Layout, origin: {integer}, shape: {integer}): layout.Layout
```
#### Arguments
| Name | Type | Description |
| --- | --- | --- |
| `borrows value` | `layout.Layout` | |
| `origin` | `{integer}` | |
| `shape` | `{integer}` | |
#### Returns
| Type | Description |
| --- | --- |
| `layout.Layout` | |
### `layout.transpose` _function_
```nupp
function layout.transpose(borrows value: layout.Layout, order: {integer}): layout.Layout
```
#### Arguments
| Name | Type | Description |
| --- | --- | --- |
| `borrows value` | `layout.Layout` | |
| `order` | `{integer}` | |
#### Returns
| Type | Description |
| --- | --- |
| `layout.Layout` | |