(git:6344619)
Loading...
Searching...
No Matches
grid_library.h File Reference
#include "grid_constants.h"
#include "grid_sphere_cache.h"
#include <stdbool.h>
#include <stddef.h>

Go to the source code of this file.

Data Structures

struct  grid_library_config
 Configuration of the grid library. More...

Enumerations

enum  grid_library_kernel { GRID_COLLOCATE_ORTHO = 0 , GRID_INTEGRATE_ORTHO = 1 , GRID_COLLOCATE_GENERAL = 2 , GRID_INTEGRATE_GENERAL = 3 }
 Various kernels provided by the grid library. More...

Functions

void grid_library_init (void)
 Initializes the grid library.
void grid_library_finalize (void)
 Finalizes the grid library.
void grid_library_set_config (const enum grid_backend backend, const bool validate, const bool apply_cutoff)
 Configures the grid library.
grid_library_config grid_library_get_config (void)
 Returns the library config.
void grid_library_print_stats (const int fortran_comm, void(*print_func)(const char *, int, int), int output_unit)
 Prints statistics gathered by the grid library.
grid_sphere_cache * grid_library_get_sphere_cache (void)
 Returns a pointer to the thread local sphere cache.
void * grid_library_get_scratch (const size_t bytes)
 Returns a pointer to a thread local scratch buffer with at least the given size. The buffer grows on demand and is reused across calls. It stays valid until the next call on the same thread.
void grid_library_counter_add (const int lp, const enum grid_backend backend, const enum grid_library_kernel kern, const int increment)
 Adds given increment to counter specified by lp, backend, and kernel.

Enumeration Type Documentation

◆ grid_library_kernel

Various kernels provided by the grid library.

Author
Ole Schuett
Enumerator
GRID_COLLOCATE_ORTHO 
GRID_INTEGRATE_ORTHO 
GRID_COLLOCATE_GENERAL 
GRID_INTEGRATE_GENERAL 

Definition at line 67 of file grid_library.h.

Function Documentation

◆ grid_library_init()

void grid_library_init ( void )

Initializes the grid library.

Author
Ole Schuett

Definition at line 55 of file grid_library.c.

Here is the caller graph for this function:

◆ grid_library_finalize()

void grid_library_finalize ( void )

Finalizes the grid library.

Author
Ole Schuett

Definition at line 91 of file grid_library.c.

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

◆ grid_library_set_config()

void grid_library_set_config ( const enum grid_backend backend,
const bool validate,
const bool apply_cutoff )

Configures the grid library.

Author
Ole Schuett

Definition at line 138 of file grid_library.c.

Here is the call graph for this function:

◆ grid_library_get_config()

grid_library_config grid_library_get_config ( void )

Returns the library config.

Author
Ole Schuett

Definition at line 149 of file grid_library.c.

Here is the caller graph for this function:

◆ grid_library_print_stats()

void grid_library_print_stats ( const int fortran_comm,
void(* print_func )(const char *, int, int),
const int output_unit )

Prints statistics gathered by the grid library.

Author
Ole Schuett

Definition at line 181 of file grid_library.c.

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

◆ grid_library_get_sphere_cache()

grid_sphere_cache * grid_library_get_sphere_cache ( void )

Returns a pointer to the thread local sphere cache.

Author
Ole Schuett

Definition at line 111 of file grid_library.c.

Here is the caller graph for this function:

◆ grid_library_get_scratch()

void * grid_library_get_scratch ( const size_t bytes)

Returns a pointer to a thread local scratch buffer with at least the given size. The buffer grows on demand and is reused across calls. It stays valid until the next call on the same thread.

Returns a pointer to a thread local scratch buffer with at least the given size. The buffer grows on demand and is reused across calls. It stays valid until the next call on the same thread.

Definition at line 121 of file grid_library.c.

◆ grid_library_counter_add()

void grid_library_counter_add ( const int lp,
const enum grid_backend backend,
const enum grid_library_kernel kernel,
const int increment )

Adds given increment to counter specified by lp, backend, and kernel.

Author
Ole Schuett

Definition at line 155 of file grid_library.c.

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