(git:e70887f)
Loading...
Searching...
No Matches
fft_timer.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 FFT_TIMER_H
8#define FFT_TIMER_H
9
10#include "../mpiwrap/cp_mpi.h"
11
12#define FFT_MAX_STRING_LENGTH 30
13
14/*******************************************************************************
15 * \brief Initializes the internal timer.
16 * \author Frederick Stein
17 ******************************************************************************/
18void fft_init_timer();
19
20typedef void (*fft_print_func_t)(const char *, int, int);
21
22/*******************************************************************************
23 * \brief Prints the timing report.
24 * \author Frederick Stein
25 ******************************************************************************/
26void fft_print_timing_report(const double threshold, const cp_mpi_comm_t comm);
27void fft_print_timing_report_unit(const double threshold,
29 const int output_unit,
30 const cp_mpi_comm_t comm);
31
32/*******************************************************************************
33 * \brief Finalizes the internal timer.
34 * \author Frederick Stein
35 ******************************************************************************/
37
38/*******************************************************************************
39 * \brief Start a timing section.
40 * \author Frederick Stein
41 ******************************************************************************/
42int fft_start_timer(const char *routine_name);
43
44/*******************************************************************************
45 * \brief Stop a timing.
46 * \author Frederick Stein
47 ******************************************************************************/
48void fft_stop_timer(const int handle);
49
50#endif /* FFT_TIMER_H */
51
52// EOF
int cp_mpi_comm_t
Definition cp_mpi.h:18
static void print_func(const char *msg, int msglen, int output_unit)
Wrapper for printf, passed to dbm_library_print_stats.
Definition dbm_miniapp.c:26
void(* fft_print_func_t)(const char *, int, int)
Definition fft_api_F.h:42
void fft_stop_timer(const int handle)
Stop a timing.
Definition fft_timer.c:402
void fft_init_timer()
Initializes the internal timer.
Definition fft_timer.c:199
int fft_start_timer(const char *routine_name)
Start a timing section.
Definition fft_timer.c:386
void fft_print_timing_report_unit(const double threshold, fft_print_func_t print_func, const int output_unit, const cp_mpi_comm_t comm)
Prints the timing report.
Definition fft_timer.c:253
void fft_print_timing_report(const double threshold, const cp_mpi_comm_t comm)
Prints the timing report.
Definition fft_timer.c:357
void fft_finalize_timer()
Finalizes the internal timer.
Definition fft_timer.c:367