DBCSR Memory Pool to avoid slow allocations of accelerator memory
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| character(len=*), | private, | parameter | :: | moduleN | = | 'dbcsr_mem_methods' |
Picks a suitable data_area from mempool, returns Null() if none found.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(dbcsr_memtype_type) | :: | memtype | ||||
| integer, | intent(in) | :: | datatype | |||
| integer, | intent(in) | :: | datasize |
Test if two memtypes are equal
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(dbcsr_memtype_type), | intent(in) | :: | mt1 | |||
| type(dbcsr_memtype_type), | intent(in) | :: | mt2 |
Creates a memory pool.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(dbcsr_mempool_type), | POINTER | :: | pool |
Ensures that mempool has at least the given capacity.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(dbcsr_mempool_type), | POINTER | :: | pool | |||
| integer, | intent(in) | :: | capacity |
Adds an unused (refcount==0) data_area to the pool.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(dbcsr_data_obj) | :: | area |
Ensures that pool_size < max_size, e.g. that there is a free slot.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(dbcsr_mempool_type), | POINTER | :: | pool |
Finalizes mempool, includes deallocation of all contained data_areas.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(dbcsr_mempool_type), | POINTER | :: | pool |
Deallocates all data_areas contained in given mempool.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(dbcsr_mempool_type), | POINTER | :: | pool |
Ensures that given memtype has requested settings.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(dbcsr_memtype_type), | intent(inout) | :: | memtype | |||
| logical, | intent(in), | optional | :: | acc_hostalloc | ||
| logical, | intent(in), | optional | :: | acc_devalloc | ||
| logical, | intent(in), | optional | :: | mpi | ||
| type(acc_stream_type), | optional | :: | acc_stream | |||
| real(kind=dp), | optional | :: | oversize_factor | |||
| logical, | intent(in), | optional | :: | has_pool |