(git:27c966b)
Loading...
Searching...
No Matches
grid_gpu_backend::context_info Class Reference

#include <grid_gpu_context.h>

Public Member Functions

 context_info ()=default
 context_info (int device_id__)
 ~context_info ()
 context_info (const context_info &)=delete
context_info & operator= (const context_info &)=delete
 context_info (context_info &&other) noexcept
context_info & operator= (context_info &&other) noexcept
void clear ()
int lmax () const
int max_nsgf_set () const
void initialize_basis_sets (const grid_basis_set **basis_sets, const int nkinds__)
void create_streams ()
void synchronize (offloadStream_t &stream)
void set_device ()
void collocate_one_grid_level (const int level, const enum grid_func func, int *lp_diff)
 Launches the Cuda kernel that collocates all tasks of one grid level.
void integrate_one_grid_level (const int level, int *lp_diff)
 Launches the Cuda kernel that integrates all tasks of one grid level.
void compute_hab_coefficients ()
void compute_checksum ()
void verify_checksum ()
void calculate_all_coefficients (const enum grid_func func, int *lp_diff)
void prepare_cab_workspace (const int la_max_diff, const int lb_max_diff)
 Lays out the cab workspace of the coefficient kernels for the angular momentum offsets of the current operation: block b gets ncoset(la_max_b + la_max_diff) * ncoset(lb_max_b + lb_max_diff) elements, la_max_b / lb_max_b being the largest basis set angular momenta of its tasks. Must be called before set_kernel_parameters, when no coefficient kernel is running (the collocate and integrate entry points synchronize the main stream before returning). The allocation only grows, the layout is recomputed when the offsets change.

Data Fields

int ntasks {0}
int nlevels {0}
int natoms {0}
int nkinds {0}
int nblocks {0}
int cab_size_per_block_ {0}
std::vector< double * > sphi
std::vector< offloadStream_t > level_streams
offloadStream_t main_stream
int stats [2][20]
gpu_vector< int > block_offsets_dev
gpu_vector< int > cab_block_offset_dev
gpu_vector< double > coef_dev_
gpu_vector< double > cab_dev_
std::vector< int > block_la_max_
std::vector< int > block_lb_max_
int cab_la_max_diff_ {-1}
int cab_lb_max_diff_ {-1}
gpu_vector< double > pab_block_
gpu_vector< double > hab_block_
gpu_vector< double > forces_
gpu_vector< double > virial_
gpu_vector< task_info > tasks_dev
gpu_vector< int > num_tasks_per_block_dev_
std::vector< grid_info< double > > grid_
std::vector< int > number_of_tasks_per_level_
std::vector< int > first_task_per_level_
std::vector< int > sphi_size
gpu_vector< double * > sphi_dev
gpu_vector< int > task_sorted_by_blocks_dev
gpu_vector< int > sorted_blocks_offset_dev
bool calculate_forces {false}
bool calculate_virial {false}
bool compute_tau {false}
bool apply_border_mask {false}

Detailed Description

Definition at line 470 of file grid_gpu_context.h.

Constructor & Destructor Documentation

◆ context_info() [1/4]

grid_gpu_backend::context_info::context_info ( )
default
Here is the caller graph for this function:

◆ context_info() [2/4]

grid_gpu_backend::context_info::context_info ( int device_id__)
inlineexplicit

Definition at line 520 of file grid_gpu_context.h.

◆ ~context_info()

grid_gpu_backend::context_info::~context_info ( )
inline

Definition at line 524 of file grid_gpu_context.h.

Here is the call graph for this function:

◆ context_info() [3/4]

grid_gpu_backend::context_info::context_info ( const context_info & )
delete
Here is the call graph for this function:

◆ context_info() [4/4]

grid_gpu_backend::context_info::context_info ( context_info && other)
inlinenoexcept

Definition at line 531 of file grid_gpu_context.h.

Here is the call graph for this function:

Member Function Documentation

◆ operator=() [1/2]

context_info & grid_gpu_backend::context_info::operator= ( const context_info & )
delete
Here is the call graph for this function:

◆ operator=() [2/2]

context_info & grid_gpu_backend::context_info::operator= ( context_info && other)
inlinenoexcept

Definition at line 587 of file grid_gpu_context.h.

Here is the call graph for this function:

◆ clear()

void grid_gpu_backend::context_info::clear ( )
inline

Definition at line 654 of file grid_gpu_context.h.

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

◆ lmax()

int grid_gpu_backend::context_info::lmax ( ) const
inline

Definition at line 698 of file grid_gpu_context.h.

Here is the caller graph for this function:

◆ max_nsgf_set()

int grid_gpu_backend::context_info::max_nsgf_set ( ) const
inline

Definition at line 699 of file grid_gpu_context.h.

Here is the caller graph for this function:

◆ initialize_basis_sets()

void grid_gpu_backend::context_info::initialize_basis_sets ( const grid_basis_set ** basis_sets,
const int nkinds__ )
inline

Definition at line 701 of file grid_gpu_context.h.

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

◆ create_streams()

void grid_gpu_backend::context_info::create_streams ( )
inline

Definition at line 743 of file grid_gpu_context.h.

Here is the caller graph for this function:

◆ synchronize()

void grid_gpu_backend::context_info::synchronize ( offloadStream_t & stream)
inline

Definition at line 756 of file grid_gpu_context.h.

Here is the caller graph for this function:

◆ set_device()

void grid_gpu_backend::context_info::set_device ( )
inline

Definition at line 760 of file grid_gpu_context.h.

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

◆ collocate_one_grid_level()

void grid_gpu_backend::context_info::collocate_one_grid_level ( const int level,
const enum grid_func func,
int * lp_diff )

Launches the Cuda kernel that collocates all tasks of one grid level.

Definition at line 514 of file grid_gpu_collocate.cu.

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

◆ integrate_one_grid_level()

void grid_gpu_backend::context_info::integrate_one_grid_level ( const int level,
int * lp_diff )

Launches the Cuda kernel that integrates all tasks of one grid level.

Definition at line 1227 of file grid_gpu_integrate.cu.

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

◆ compute_hab_coefficients()

void grid_gpu_backend::context_info::compute_hab_coefficients ( )

Definition at line 1319 of file grid_gpu_integrate.cu.

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

◆ compute_checksum()

void grid_gpu_backend::context_info::compute_checksum ( )
inline

Definition at line 771 of file grid_gpu_context.h.

Here is the caller graph for this function:

◆ verify_checksum()

void grid_gpu_backend::context_info::verify_checksum ( )
inline

Definition at line 772 of file grid_gpu_context.h.

Here is the caller graph for this function:

◆ calculate_all_coefficients()

void grid_gpu_backend::context_info::calculate_all_coefficients ( const enum grid_func func,
int * lp_diff )

Definition at line 472 of file grid_gpu_collocate.cu.

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

◆ prepare_cab_workspace()

void grid_gpu_backend::context_info::prepare_cab_workspace ( const int la_max_diff,
const int lb_max_diff )

Lays out the cab workspace of the coefficient kernels for the angular momentum offsets of the current operation: block b gets ncoset(la_max_b + la_max_diff) * ncoset(lb_max_b + lb_max_diff) elements, la_max_b / lb_max_b being the largest basis set angular momenta of its tasks. Must be called before set_kernel_parameters, when no coefficient kernel is running (the collocate and integrate entry points synchronize the main stream before returning). The allocation only grows, the layout is recomputed when the offsets change.

Definition at line 101 of file grid_gpu_context.cu.

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

Field Documentation

◆ ntasks

int grid_gpu_backend::context_info::ntasks {0}

Definition at line 480 of file grid_gpu_context.h.

◆ nlevels

int grid_gpu_backend::context_info::nlevels {0}

Definition at line 481 of file grid_gpu_context.h.

◆ natoms

int grid_gpu_backend::context_info::natoms {0}

Definition at line 482 of file grid_gpu_context.h.

◆ nkinds

int grid_gpu_backend::context_info::nkinds {0}

Definition at line 483 of file grid_gpu_context.h.

◆ nblocks

int grid_gpu_backend::context_info::nblocks {0}

Definition at line 484 of file grid_gpu_context.h.

◆ cab_size_per_block_

int grid_gpu_backend::context_info::cab_size_per_block_ {0}

Definition at line 485 of file grid_gpu_context.h.

◆ sphi

std::vector<double *> grid_gpu_backend::context_info::sphi

Definition at line 486 of file grid_gpu_context.h.

◆ level_streams

std::vector<offloadStream_t> grid_gpu_backend::context_info::level_streams

Definition at line 487 of file grid_gpu_context.h.

◆ main_stream

offloadStream_t grid_gpu_backend::context_info::main_stream

Definition at line 488 of file grid_gpu_context.h.

◆ stats

int grid_gpu_backend::context_info::stats[2][20]

Definition at line 489 of file grid_gpu_context.h.

◆ block_offsets_dev

gpu_vector<int> grid_gpu_backend::context_info::block_offsets_dev

Definition at line 492 of file grid_gpu_context.h.

◆ cab_block_offset_dev

gpu_vector<int> grid_gpu_backend::context_info::cab_block_offset_dev

Definition at line 493 of file grid_gpu_context.h.

◆ coef_dev_

gpu_vector<double> grid_gpu_backend::context_info::coef_dev_

Definition at line 494 of file grid_gpu_context.h.

◆ cab_dev_

gpu_vector<double> grid_gpu_backend::context_info::cab_dev_

Definition at line 495 of file grid_gpu_context.h.

◆ block_la_max_

std::vector<int> grid_gpu_backend::context_info::block_la_max_

Definition at line 498 of file grid_gpu_context.h.

◆ block_lb_max_

std::vector<int> grid_gpu_backend::context_info::block_lb_max_

Definition at line 498 of file grid_gpu_context.h.

◆ cab_la_max_diff_

int grid_gpu_backend::context_info::cab_la_max_diff_ {-1}

Definition at line 500 of file grid_gpu_context.h.

◆ cab_lb_max_diff_

int grid_gpu_backend::context_info::cab_lb_max_diff_ {-1}

Definition at line 500 of file grid_gpu_context.h.

◆ pab_block_

gpu_vector<double> grid_gpu_backend::context_info::pab_block_

Definition at line 501 of file grid_gpu_context.h.

◆ hab_block_

gpu_vector<double> grid_gpu_backend::context_info::hab_block_

Definition at line 502 of file grid_gpu_context.h.

◆ forces_

gpu_vector<double> grid_gpu_backend::context_info::forces_

Definition at line 503 of file grid_gpu_context.h.

◆ virial_

gpu_vector<double> grid_gpu_backend::context_info::virial_

Definition at line 504 of file grid_gpu_context.h.

◆ tasks_dev

gpu_vector<task_info> grid_gpu_backend::context_info::tasks_dev

Definition at line 505 of file grid_gpu_context.h.

◆ num_tasks_per_block_dev_

gpu_vector<int> grid_gpu_backend::context_info::num_tasks_per_block_dev_

Definition at line 506 of file grid_gpu_context.h.

◆ grid_

std::vector<grid_info<double> > grid_gpu_backend::context_info::grid_

Definition at line 507 of file grid_gpu_context.h.

◆ number_of_tasks_per_level_

std::vector<int> grid_gpu_backend::context_info::number_of_tasks_per_level_

Definition at line 508 of file grid_gpu_context.h.

◆ first_task_per_level_

std::vector<int> grid_gpu_backend::context_info::first_task_per_level_

Definition at line 509 of file grid_gpu_context.h.

◆ sphi_size

std::vector<int> grid_gpu_backend::context_info::sphi_size

Definition at line 510 of file grid_gpu_context.h.

◆ sphi_dev

gpu_vector<double *> grid_gpu_backend::context_info::sphi_dev

Definition at line 511 of file grid_gpu_context.h.

◆ task_sorted_by_blocks_dev

gpu_vector<int> grid_gpu_backend::context_info::task_sorted_by_blocks_dev

Definition at line 512 of file grid_gpu_context.h.

◆ sorted_blocks_offset_dev

gpu_vector<int> grid_gpu_backend::context_info::sorted_blocks_offset_dev

Definition at line 512 of file grid_gpu_context.h.

◆ calculate_forces

bool grid_gpu_backend::context_info::calculate_forces {false}

Definition at line 513 of file grid_gpu_context.h.

◆ calculate_virial

bool grid_gpu_backend::context_info::calculate_virial {false}

Definition at line 514 of file grid_gpu_context.h.

◆ compute_tau

bool grid_gpu_backend::context_info::compute_tau {false}

Definition at line 515 of file grid_gpu_context.h.

◆ apply_border_mask

bool grid_gpu_backend::context_info::apply_border_mask {false}

Definition at line 516 of file grid_gpu_context.h.


The documentation for this class was generated from the following files: