(git:ccc2433)
dbm_multiply.h
Go to the documentation of this file.
1 /*----------------------------------------------------------------------------*/
2 /* CP2K: A general program to perform molecular dynamics simulations */
3 /* Copyright 2000-2024 CP2K developers group <https://cp2k.org> */
4 /* */
5 /* SPDX-License-Identifier: BSD-3-Clause */
6 /*----------------------------------------------------------------------------*/
7 
8 #ifndef DBM_MULTIPLY_H
9 #define DBM_MULTIPLY_H
10 
11 #include <stdbool.h>
12 #include <stdint.h>
13 
14 #include "dbm_matrix.h"
15 
16 /*******************************************************************************
17  * \brief Performs a multiplication of two dbm_matrix_t matrices,
18  as C := alpha * op( A ) * op( B ) + beta * C.
19 
20  The filter_eps parameter is used to filter the resulting matrix.
21  The filtering criterion is whether the block-frobenius norm is less
22  than the specified epsilon. One-the-fly filtering is done such that
23  individual multiplications are skipped if the product of the frobenius
24  norms of the left- and right-matrix blocks are less than the specified
25  epsilon divided by the maximum number of possible multiplies in each
26  row. In addition a final filtering is done as well with the same
27  epsilon value.
28  * \author Ole Schuett
29  ******************************************************************************/
30 void dbm_multiply(const bool transa, const bool transb, const double alpha,
31  const dbm_matrix_t *matrix_a, const dbm_matrix_t *matrix_b,
32  const double beta, dbm_matrix_t *matrix_c,
33  const bool retain_sparsity, const double filter_eps,
34  int64_t *flop);
35 
36 #endif
37 
38 // EOF
void dbm_multiply(const bool transa, const bool transb, const double alpha, const dbm_matrix_t *matrix_a, const dbm_matrix_t *matrix_b, const double beta, dbm_matrix_t *matrix_c, const bool retain_sparsity, const double filter_eps, int64_t *flop)
Performs a multiplication of two dbm_matrix_t matrices, as C := alpha * op( A ) * op( B ) + beta * C.
Definition: dbm_multiply.c:324
Internal struct for storing a matrix.
Definition: dbm_matrix.h:20