(git:374b731)
Loading...
Searching...
No Matches
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 ******************************************************************************/
30void 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
subroutine, public dbm_multiply(transa, transb, alpha, matrix_a, matrix_b, beta, matrix_c, retain_sparsity, filter_eps, flop)
Computes matrix product: matrix_c = alpha * matrix_a * matrix_b + beta * matrix_c.
Definition dbm_api.F:736
Internal struct for storing a matrix.
Definition dbm_matrix.h:20