(git:b279b6b)
dbm_multiply_gpu_kernel.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_GPU_KERNEL_H
9 #define DBM_MULTIPLY_GPU_KERNEL_H
10 
11 #include "../offload/offload_runtime.h"
12 #if defined(__OFFLOAD) && !defined(__NO_OFFLOAD_DBM)
13 
14 #include "dbm_multiply_internal.h"
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19 
20 /*******************************************************************************
21  * \brief Internal routine for launching the GPU kernel.
22  * All arguments are assumed to be device pointers.
23  * \author Ole Schuett
24  ******************************************************************************/
25 void dbm_multiply_gpu_launch_kernel(
26  const offloadStream_t stream, const int mnk_range[3][2], const double alpha,
27  const int ntasks, const dbm_task_t *batch, const double *pack_a_data,
28  const double *pack_b_data, double *shard_c_data);
29 
30 #ifdef __cplusplus
31 }
32 #endif
33 
34 #endif // defined(__OFFLOAD) && !defined(__NO_OFFLOAD_DBM)
35 #endif
36 
37 // EOF
Internal struct for storing a task, ie. a single block multiplication.