| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public | :: | ngrid | ||||
| integer, | public | :: | sz | ||||
| integer, | public | :: | next_id | = | 0 |
The id for the next allocated block. This counter is incremented each time a new block is allocated. |
|
| class(field_t), | public, | pointer | :: | first | => | null() |
The pointer to the first block on the list. Non associated if the list is empty |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | dims(3) | |||
| integer, | intent(in) | :: | sz |
Return a pointer to the first available memory block, i.e. the current head of the block list. If the list is empty, allocate a new block with create_block first.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(allocator_t), | intent(inout) | :: | self | |||
| integer, | intent(in) | :: | dir | |||
| integer, | intent(in), | optional | :: | data_loc |
Release memory block pointed to by HANDLE to the block list. It is pushed to the front of the block list, in other words it is made the head block.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(allocator_t), | intent(inout) | :: | self | |||
| class(field_t), | pointer | :: | handle |
Utility function that returns a array made of the id of the
block currently in the block list. Return the array [0] if
block list is empty.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(allocator_t), | intent(inout) | :: | self |
Go through the block list from head to tail, deallocating each memory block in turn. Deallocation of a m_allocator object automatically deallocates its internal allocatable data array.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(allocator_t), | intent(inout) | :: | self |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(allocator_t), | intent(inout) | :: | self | |||
| integer, | intent(in) | :: | dir |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(allocator_t), | intent(inout) | :: | self | |||
| integer, | intent(in) | :: | dir |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cuda_allocator_t), | intent(inout) | :: | self | |||
| type(cuda_field_t), | intent(in), | pointer | :: | next |