(git:0d88fc2)
Loading...
Searching...
No Matches
grid_gpu_task_list.h
Go to the documentation of this file.
1/*----------------------------------------------------------------------------*/
2/* CP2K: A general program to perform molecular dynamics simulations */
3/* Copyright 2000-2026 CP2K developers group <https://cp2k.org> */
4/* */
5/* SPDX-License-Identifier: BSD-3-Clause */
6/*----------------------------------------------------------------------------*/
7#ifndef GRID_GPU_TASK_LIST_H
8#define GRID_GPU_TASK_LIST_H
9
10#include <stdbool.h>
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
16#include "../../offload/offload_buffer.h"
17#include "../common/grid_basis_set.h"
18#include "../common/grid_constants.h"
19
20typedef void grid_gpu_task_list;
21/*******************************************************************************
22 * \brief Allocates a task list for the GPU backend.
23 * See grid_task_list.h for details.
24 ******************************************************************************/
26 const bool ortho, const int ntasks, const int nlevels, const int natoms,
27 const int nkinds, const int nblocks, const int *block_offsets,
28 const double *atom_positions, const int *atom_kinds,
29 const grid_basis_set **basis_sets, const int *level_list,
30 const int *iatom_list, const int *jatom_list, const int *iset_list,
31 const int *jset_list, const int *ipgf_list, const int *jpgf_list,
32 const int *border_mask_list, const int *block_num_list,
33 const double *radius_list, const double *rab_list, const int *npts_global,
34 const int *npts_local, const int *shift_local, const int *border_width,
35 const double *dh, const double *dh_inv, grid_gpu_task_list **ptr);
36/*******************************************************************************
37 * \brief Deallocates given task list, basis_sets have to be freed separately.
38 ******************************************************************************/
40
41/*******************************************************************************
42 * \brief Collocate all tasks of in given list onto given grids.
43 * See grid_task_list.h for details.
44 ******************************************************************************/
46 const enum grid_func func, const int nlevels,
47 const offload_buffer *pab_blocks,
48 offload_buffer **grids);
49
50/*******************************************************************************
51 * \brief Integrate all tasks of in given list onto given grids.
52 * See grid_task_list.h for details.
53 ******************************************************************************/
55 const bool compute_tau, const int nlevels,
56 const offload_buffer *pab_blocks,
57 const offload_buffer **grids,
58 offload_buffer *hab_blocks, double *forces,
59 double *virial);
60#ifdef __cplusplus
61}
62#endif
63
64#endif
grid_func
static void const int const int const int const int const int const double const int const int const int npts_local[3]
void grid_gpu_task_list
void grid_gpu_collocate_task_list(const grid_gpu_task_list *ptr, const enum grid_func func, const int nlevels, const offload_buffer *pab_blocks, offload_buffer **grids)
Collocate all tasks of in given list onto given grids. See grid_task_list.h for details.
void grid_gpu_create_task_list(const bool ortho, const int ntasks, const int nlevels, const int natoms, const int nkinds, const int nblocks, const int *block_offsets, const double *atom_positions, const int *atom_kinds, const grid_basis_set **basis_sets, const int *level_list, const int *iatom_list, const int *jatom_list, const int *iset_list, const int *jset_list, const int *ipgf_list, const int *jpgf_list, const int *border_mask_list, const int *block_num_list, const double *radius_list, const double *rab_list, const int *npts_global, const int *npts_local, const int *shift_local, const int *border_width, const double *dh, const double *dh_inv, grid_gpu_task_list **ptr)
Allocates a task list for the GPU backend. See grid_task_list.h for details.
void grid_gpu_free_task_list(grid_gpu_task_list *ptr)
Deallocates given task list, basis_sets have to be freed separately.
void grid_gpu_integrate_task_list(const grid_gpu_task_list *ptr, const bool compute_tau, const int nlevels, const offload_buffer *pab_blocks, const offload_buffer **grids, offload_buffer *hab_blocks, double *forces, double *virial)
Integrate all tasks of in given list onto given grids. See grid_task_list.h for details.
Internal representation of a basis set.
Internal representation of a buffer.