(git:d18deda)
Loading...
Searching...
No Matches
dbm_internal.h
Go to the documentation of this file.
1/*----------------------------------------------------------------------------*/
2/* CP2K: A general program to perform molecular dynamics simulations */
3/* Copyright 2000-2025 CP2K developers group <https://cp2k.org> */
4/* */
5/* SPDX-License-Identifier: BSD-3-Clause */
6/*----------------------------------------------------------------------------*/
7
8#ifndef DBM_INTERNAL_H
9#define DBM_INTERNAL_H
10
11/*******************************************************************************
12 * \brief Returns the larger of two given integers (missing from the C standard)
13 * \author Ole Schuett
14 ******************************************************************************/
15static inline int imax(int x, int y) { return (x > y ? x : y); }
16
17/*******************************************************************************
18 * \brief Internal struct for storing a dbm_block_t plus its norm.
19 * \author Ole Schuett
20 ******************************************************************************/
21typedef struct {
22 int free_index; // Free index in Einstein notation of matrix multiplication.
23 int sum_index; // Summation index - also called dummy index.
24 int offset;
25 float norm;
27
28/*******************************************************************************
29 * \brief Internal struct for storing a pack - essentially a shard for MPI.
30 * \author Ole Schuett
31 ******************************************************************************/
32typedef struct {
36 double *data;
38
39/*******************************************************************************
40 * \brief Internal struct for storing a task, ie. a single block multiplication.
41 * \author Ole Schuett
42 ******************************************************************************/
43typedef struct {
44 int m;
45 int n;
46 int k;
51
52#endif
53
54// EOF
static int imax(int x, int y)
Returns the larger of two given integers (missing from the C standard)
Internal struct for storing a dbm_block_t plus its norm.
Internal struct for storing a pack - essentially a shard for MPI.
double * data
dbm_pack_block_t * blocks
Internal struct for storing a task, ie. a single block multiplication.