Program Listing for File tracetools.h
↰ Return to documentation for file (/tmp/ws/src/tracetools_acceleration/include/tracetools_acceleration/tracetools.h
)
/*
____ ____
/ /\/ /
/___/ \ / Copyright (c) 2021, Xilinx®.
\ \ \/ Author: Víctor Mayoral Vilches <victorma@xilinx.com>
\ \
/ /
/___/ /\
\ \ / \
\___\/\___\
Inspired by https://gitlab.com/ros-tracing/ros2_tracing
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#ifndef TRACETOOLS_ACCELERATION__TRACETOOLS_H_
#define TRACETOOLS_ACCELERATION__TRACETOOLS_H_
#include <stdint.h>
#include <string.h>
#include <stdbool.h>
#include "tracetools_acceleration/config.h"
#include "tracetools_acceleration/visibility_control.hpp"
#ifndef TRACETOOLS_DISABLED
# define TRACEPOINT(event_name, ...) \
(ros_trace_ ## event_name)(__VA_ARGS__)
# define DECLARE_TRACEPOINT(event_name, ...) \
TRACETOOLS_PUBLIC void ros_trace_ ## event_name(__VA_ARGS__);
#else
# define TRACEPOINT(event_name, ...) ((void) (0))
# define DECLARE_TRACEPOINT(event_name, ...)
#endif
#ifdef __cplusplus
extern "C"
{
#endif
TRACETOOLS_PUBLIC bool ros_trace_compile_status();
DECLARE_TRACEPOINT(
vadd_pre,
const char * iteration)
DECLARE_TRACEPOINT(
vadd_post,
const char * iteration)
DECLARE_TRACEPOINT(
kria_power,
const double power)
DECLARE_TRACEPOINT(
kria_power_dt,
const double power,
const double dt)
DECLARE_TRACEPOINT(
kria_voltage,
const double voltage)
DECLARE_TRACEPOINT(
kria_current,
const double current)
#ifdef __cplusplus
}
#endif
#endif // TRACETOOLS_ACCELERATION__TRACETOOLS_H_