A device-resident field.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| class(field_t), | public, | pointer | :: | next | |||
| real(kind=dp), | public, | pointer, contiguous | :: | data(:,:,:) | |||
| integer, | public | :: | dir | ||||
| integer, | public | :: | data_loc | ||||
| integer, | public | :: | refcount | = | 0 | ||
| integer, | public | :: | id |
An integer identifying the memory block. |
Frees the device allocation when the field is finalised.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(omptgt_field_t) | :: | self |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(field_t) | :: | self | ||||
| integer, | intent(in) | :: | data_loc |
Free the host storage of the block and nullify the data view of it.
A block that never allocated host storage, as on a device backend, is
left as it is. There is no final procedure for this, because the
constructor result is copied by intrinsic assignment and a finaliser
on the temporary would free the storage the copy still uses.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(field_t) | :: | self |
Sets every point of the field, padding included, to the constant c.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(omptgt_field_t) | :: | self | ||||
| real(kind=dp), | intent(in) | :: | c |
Returns the shape the field is currently viewed with, or -1s if
set_shape has not been called yet.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(omptgt_field_t) | :: | self |
Sets the shape the field is viewed with. Unlike the host and CUDA fields there is no array pointer to reshape here, so this only records the extents later used to cast the device pointer into an array.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(omptgt_field_t) | :: | self | ||||
| integer, | intent(in) | :: | dims(3) |
Returns the device address of the field's storage, which the backend views as a Fortran array to pass to its kernels.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(omptgt_field_t) | :: | self |