(git:f2099e5)
Loading...
Searching...
No Matches
grid_gpu_context.cu File Reference
#include <cassert>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include "../../offload/offload_library.h"
#include "../common/grid_basis_set.h"
#include "../common/grid_constants.h"
#include "../common/grid_library.h"
#include "grid_gpu_context.h"
#include "grid_gpu_internal_header.h"
#include "grid_gpu_task_list.h"

Go to the source code of this file.

Namespaces

namespace  rocm_backend

Functions

constexpr size_t rocm_backend::align_up_elems (size_t n_elems, size_t elem_alignment)
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_ctx.h for details.
void grid_gpu_free_task_list (grid_gpu_task_list *ptr)
 destroy a context
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.
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_ctx.h for details.

Function Documentation

◆ grid_gpu_create_task_list()

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_ctx.h for details.

Allocates a task list for the GPU backend. See grid_task_list.h for details.

Definition at line 94 of file grid_gpu_context.cu.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ grid_gpu_free_task_list()

void grid_gpu_free_task_list ( grid_gpu_task_list * ptr)

destroy a context

Deallocates given task list, basis_sets have to be freed separately.

Definition at line 465 of file grid_gpu_context.cu.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ grid_gpu_collocate_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.

Collocate all tasks of in given list onto given grids. See grid_task_list.h for details.

Definition at line 479 of file grid_gpu_context.cu.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ grid_gpu_integrate_task_list()

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_ctx.h for details.

Integrate all tasks of in given list onto given grids. See grid_task_list.h for details.

Definition at line 562 of file grid_gpu_context.cu.

Here is the call graph for this function:
Here is the caller graph for this function: