(git:4a2d255)
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#ifndef DBM_INTERNAL_H
8#define DBM_INTERNAL_H
9
10/*******************************************************************************
11 * \brief Returns the larger of two given integers (missing from the C standard)
12 * \author Ole Schuett
13 ******************************************************************************/
14static inline int imax(int x, int y) { return (x > y ? x : y); }
15
16/*******************************************************************************
17 * \brief Internal struct for storing a dbm_block_t plus its norm.
18 * \author Ole Schuett
19 ******************************************************************************/
20typedef struct {
21 int free_index; // Free index in Einstein notation of matrix multiplication.
22 int sum_index; // Summation index - also called dummy index.
23 int offset;
24 float norm;
26
27/*******************************************************************************
28 * \brief Internal struct for storing a pack - essentially a shard for MPI.
29 * \author Ole Schuett
30 ******************************************************************************/
31typedef struct {
35 double *data;
37
38/*******************************************************************************
39 * \brief Internal struct for storing a task, ie. a single block multiplication.
40 * \author Ole Schuett
41 ******************************************************************************/
42typedef struct {
43 int m;
44 int n;
45 int k;
50
51#endif
52
53// 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.