(git:5a3db73)
Loading...
Searching...
No Matches
dbm_multiply_cpu.h
Go to the documentation of this file.
1/*----------------------------------------------------------------------------*/
2/* CP2K: A general program to perform molecular dynamics simulations */
3/* Copyright 2000-2026 CP2K developers group <https://cp2k.org> */
4/* */
5/* SPDX-License-Identifier: BSD-3-Clause */
6/*----------------------------------------------------------------------------*/
7#ifndef DBM_MULTIPLY_CPU_H
8#define DBM_MULTIPLY_CPU_H
9
10#include "dbm_internal.h"
11#include "dbm_shard.h"
12
17
18// Approximate order of the tasks within a batch (bucket sort).
20 DBM_TASK_ORDER_NONE = 0, // as generated
21 DBM_TASK_ORDER_SHAPE = 1 // by m,n,k
22};
23
24/*******************************************************************************
25 * \brief Internal routine for ordering the tasks of a batch approximately by
26 * shape. The order is returned as permutation of the task indexes.
27 * \author Hans Pabst
28 ******************************************************************************/
29void dbm_multiply_cpu_task_order(int ntasks, const dbm_task_t batch[ntasks],
30 int order[ntasks]);
31
32/*******************************************************************************
33 * \brief Internal routine for executing the tasks in given batch on the CPU.
34 * \author Ole Schuett
35 ******************************************************************************/
36void dbm_multiply_cpu_process_batch(const dbm_batch_t *batch, double alpha,
37 const dbm_pack_t *pack_a,
38 const dbm_pack_t *pack_b,
39 dbm_shard_t *shard_c, int options);
40
41#endif
42
43// EOF
dbm_multiply_cpu_options
@ DBM_MULTIPLY_BLAS_LIBRARY
@ DBM_MULTIPLY_TASK_REORDER
dbm_multiply_task_order
@ DBM_TASK_ORDER_SHAPE
@ DBM_TASK_ORDER_NONE
void dbm_multiply_cpu_process_batch(const dbm_batch_t *batch, double alpha, const dbm_pack_t *pack_a, const dbm_pack_t *pack_b, dbm_shard_t *shard_c, int options)
Internal routine for executing the tasks in given batch on the CPU.
void dbm_multiply_cpu_task_order(int ntasks, const dbm_task_t batch[ntasks], int order[ntasks])
Internal routine for ordering the tasks of a batch approximately by shape. The order is returned as p...
Internal struct for storing a batch of tasks along with its shape, which is tracked while the batch i...
Internal struct for storing a pack - essentially a shard for MPI.
Internal struct for storing a matrix shard.
Definition dbm_shard.h:30
Internal struct for storing a task, ie. a single block multiplication.