Dynamic Load Balance 3.6.1+32-59d1
gpu_record_utils.h
Go to the documentation of this file.
1/*********************************************************************************/
2/* Copyright 2009-2025 Barcelona Supercomputing Center */
3/* */
4/* This file is part of the DLB library. */
5/* */
6/* DLB is free software: you can redistribute it and/or modify */
7/* it under the terms of the GNU Lesser General Public License as published by */
8/* the Free Software Foundation, either version 3 of the License, or */
9/* (at your option) any later version. */
10/* */
11/* DLB is distributed in the hope that it will be useful, */
12/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
13/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
14/* GNU Lesser General Public License for more details. */
15/* */
16/* You should have received a copy of the GNU Lesser General Public License */
17/* along with DLB. If not, see <https://www.gnu.org/licenses/>. */
18/*********************************************************************************/
19
20#ifndef GPU_RECORD_UTILS_H
21#define GPU_RECORD_UTILS_H
22
23#include <stdint.h>
24#include <stddef.h>
25
26typedef struct {
27 uint64_t start;
28 uint64_t end;
30
31typedef struct {
33 size_t size;
34 size_t capacity;
36
37
38void gpu_record_init_buffer(gpu_records_buffer_t *buf, size_t initial_capacity);
41void gpu_record_append_event(gpu_records_buffer_t* buf, uint64_t start, uint64_t end);
45 const gpu_records_buffer_t *mem_buf,
46 const gpu_records_buffer_t *kernel_buf);
47
48#endif /* GPU_RECORD_UTILS_H */
void gpu_record_free_buffer(gpu_records_buffer_t *buf)
Definition: gpu_record_utils.c:74
void gpu_record_clear_buffer(gpu_records_buffer_t *buf)
Definition: gpu_record_utils.c:82
void gpu_record_flatten(gpu_records_buffer_t *buf)
Definition: gpu_record_utils.c:99
uint64_t gpu_record_get_duration(const gpu_records_buffer_t *buf)
Definition: gpu_record_utils.c:130
void gpu_record_append_event(gpu_records_buffer_t *buf, uint64_t start, uint64_t end)
Definition: gpu_record_utils.c:88
uint64_t gpu_record_get_memory_exclusive_duration(const gpu_records_buffer_t *mem_buf, const gpu_records_buffer_t *kernel_buf)
Definition: gpu_record_utils.c:144
void gpu_record_init_buffer(gpu_records_buffer_t *buf, size_t initial_capacity)
Definition: gpu_record_utils.c:63
Definition: gpu_record_utils.h:26
uint64_t start
Definition: gpu_record_utils.h:27
uint64_t end
Definition: gpu_record_utils.h:28
Definition: gpu_record_utils.h:31
gpu_record_t * data
Definition: gpu_record_utils.h:32
size_t size
Definition: gpu_record_utils.h:33
size_t capacity
Definition: gpu_record_utils.h:34