![]() |
(git:e70887f)
|
#include "fft_timer.h"#include "../offload/offload_library.h"#include "../base/cp_assert.h"#include <omp.h>#include <stdarg.h>#include <stdio.h>#include <stdlib.h>#include <string.h>Go to the source code of this file.
Data Structures | |
| struct | fft_timed_routine |
| struct | fft_timing_statistics |
| struct | fft_stack_type |
Functions | |
| static char * | fft_strdup (const char *src) |
| String duplication. Can be removed with migration to C23. | |
| static int | find_routine_by_name (const char *routine_name) |
| Find the index of a timed routine by name. | |
| int | get_routine_handle (const char *routine_name) |
| Get a routine handle to a given routine name. | |
| void | get_routine_infos (const char *routine_name, double *total_time, double *self_time, int *number_of_calls) |
| Get a routine handle to a given routine name. | |
| void | update_routine (const int handle, const double total_time, const double self_time) |
| Get a routine handle to a given routine name. | |
| void | push_on_stack (const int handle) |
| Push new routine on function stack. | |
| void | pop_from_stack (int *handle, double *run_time, double *self_time) |
| Removes the element on top of the stack and returns its data. | |
| int | compare_fft_timing_statistics (const void *a, const void *b) |
| Comparator for sorting FFT timing entries by maximum total time. | |
| void | fft_init_timer () |
| Initializes the internal timer. | |
| static void | fft_print_to_stdout (const char *msg, const int msglen, const int output_unit) |
| Write an FFT timing message to standard output. | |
| static void | fft_report_printf (fft_print_func_t print_func, const int output_unit, const char *format,...) |
| Format and emit one FFT timing-report line through a callback. | |
| 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. | |
| void | fft_print_timing_report (const double threshold, const cp_mpi_comm_t comm) |
| Print the FFT timing report to standard output. | |
| void | fft_finalize_timer () |
| Finalizes the internal timer. | |
| int | fft_start_timer (const char *routine_name) |
| Start a timing section. | |
| void | fft_stop_timer (const int handle) |
| Stop a timing. | |
Variables | |
| static fft_timed_routine * | timed_routines = NULL |
| static struct fft_stack_type * | stack = NULL |
| static bool | timers_initialized = false |
| static int | number_of_timed_routines = 0 |
| static int | buffer_size_timed_routines = 0 |
|
static |
String duplication. Can be removed with migration to C23.
| handle | Handle of the pushed function |
| src | Source string to duplicate. |
Definition at line 55 of file fft_timer.c.
|
static |
Find the index of a timed routine by name.
Definition at line 65 of file fft_timer.c.
| int get_routine_handle | ( | const char * | routine_name | ) |
Get a routine handle to a given routine name.
| routine_name | Name of the timed routine. |
Definition at line 77 of file fft_timer.c.
| void get_routine_infos | ( | const char * | routine_name, |
| double * | total_time, | ||
| double * | self_time, | ||
| int * | number_of_calls ) |
Get a routine handle to a given routine name.
| handle | Handle of the pushed function |
| routine_name | Name of the timed routine. |
| total_time | Total time of the timed routine. |
| self_time | Self time of the timed routine. |
| number_of_calls | Number of calls of the timed routine. |
Definition at line 108 of file fft_timer.c.
| void update_routine | ( | const int | handle, |
| const double | total_time, | ||
| const double | self_time ) |
Get a routine handle to a given routine name.
| handle | Handle of the pushed function |
| total_time | Total time of the timed routine. |
| self_time | Self time of the timed routine. |
Definition at line 129 of file fft_timer.c.
| void push_on_stack | ( | const int | handle | ) |
Push new routine on function stack.
| handle | Handle of the pushed function |
Definition at line 144 of file fft_timer.c.
| void pop_from_stack | ( | int * | handle, |
| double * | run_time, | ||
| double * | self_time ) |
Removes the element on top of the stack and returns its data.
| handle | Handle of the routines (for external checks) |
| run_time | Total run time of the routine |
| self_time | Time spent within the routine without called routines |
Definition at line 160 of file fft_timer.c.
| int compare_fft_timing_statistics | ( | const void * | a, |
| const void * | b ) |
Comparator for sorting FFT timing entries by maximum total time.
| a | First timing entry. |
| b | Second timing entry. |
Definition at line 180 of file fft_timer.c.
| void fft_init_timer | ( | ) |
Initializes the internal timer.
Definition at line 199 of file fft_timer.c.
|
static |
Write an FFT timing message to standard output.
| msg | Message buffer. |
| msglen | Number of characters to write. |
| output_unit | Unused stdout marker. |
Definition at line 215 of file fft_timer.c.
|
static |
Format and emit one FFT timing-report line through a callback.
| print_func | Output callback. |
| output_unit | Destination output unit. |
| format | printf-style format string. |
| ... | Optional format arguments. |
Definition at line 229 of file fft_timer.c.
| 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.
| threshold | Minimum relative timing value to report. |
| print_func | Callback used to print the timing report. |
| output_unit | Destination output unit. |
| comm | MPI communicator. |
Definition at line 253 of file fft_timer.c.
| void fft_print_timing_report | ( | const double | threshold, |
| const cp_mpi_comm_t | comm ) |
Print the FFT timing report to standard output.
Prints the timing report.
| threshold | Minimum relative timing value to report. |
| comm | MPI communicator used to aggregate timing data. |
Definition at line 357 of file fft_timer.c.
| void fft_finalize_timer | ( | ) |
Finalizes the internal timer.
Definition at line 367 of file fft_timer.c.
| int fft_start_timer | ( | const char * | routine_name | ) |
Start a timing section.
| routine_name | Name of the timed routine. |
Definition at line 386 of file fft_timer.c.
| void fft_stop_timer | ( | const int | handle | ) |
Stop a timing.
| handle | Timer handle. |
Definition at line 402 of file fft_timer.c.
|
static |
Definition at line 42 of file fft_timer.c.
|
static |
Definition at line 43 of file fft_timer.c.
|
static |
Definition at line 45 of file fft_timer.c.
|
static |
Definition at line 46 of file fft_timer.c.
|
static |
Definition at line 47 of file fft_timer.c.