Commit 733f05d5 authored by Thomas Applencourt's avatar Thomas Applencourt
Browse files

introduce clprof.h

parent 3b9d82f0
Pipeline #12225 failed with stage
......@@ -128,7 +128,7 @@ nodist_libCLProf_la_SOURCES = \
tracer_opencl.h \
babeltrace_cl_dispatchers.c
libCLProf_la_SOURCES = \
babeltrace_cl.h
clprof.h
libCLProf_la_CPPFLAGS = -I$(top_srcdir)/utils -I$(srcdir)/include -I./
libCLProf_la_CFLAGS = -Wall -Wextra -Wno-unused-parameter -Werror $(BABELTRACE2_CFLAGS)
......@@ -187,7 +187,7 @@ nodist_libTestingCLProf_la_SOURCES = \
tracer_opencl.h \
babeltrace_cl_dispatchers.c
libTestingCLProf_la_SOURCES = \
babeltrace_cl.h
clprof.h
libTestingCLProf_la_CPPFLAGS = -I$(top_srcdir)/utils -I$(srcdir)/include -I./
libTestingCLProf_la_CFLAGS = -Wall -Wextra -Wno-unused-parameter -Werror $(BABELTRACE2_CFLAGS)
......
#ifndef _BABELTRACE_CL_H
#define _BABELTRACE_CL_H
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <inttypes.h>
#include <string.h>
#include <stdbool.h>
#include <babeltrace2/babeltrace.h>
#include "uthash.h"
#include "utarray.h"
#ifdef __cplusplus
extern "C" {
#endif
struct opencl_dispatch;
struct opencl_callbacks;
extern void init_dispatchers(struct opencl_dispatch *opencl_dispatch);
typedef void (opencl_dispatcher_t)
(struct opencl_dispatch *opencl_dispatch,
struct opencl_callbacks *callbacks,
const bt_event *message,
const bt_clock_snapshot *clock);
struct opencl_callbacks {
const char *name;
opencl_dispatcher_t *dispatcher;
UT_array *callbacks;
UT_hash_handle hh;
};
struct opencl_event_callbacks {
const char *name;
opencl_dispatcher_t *dispatcher;
UT_array *callbacks;
UT_hash_handle hh;
};
/* Sink component's private data */
struct opencl_dispatch {
/* Upstream message iterator (owned by this) */
bt_message_iterator *message_iterator;
/* Hash table */
struct opencl_callbacks *callbacks;
/* Hash table by name */
struct opencl_event_callbacks *event_callbacks;
};
extern void
opencl_register_dispatcher(struct opencl_dispatch *opencl_dispatch,
const char *name,
opencl_dispatcher_t *dispatcher);
extern void
opencl_register_callback(struct opencl_dispatch *opencl_dispatch,
const char *name,
void *func);
#ifdef __cplusplus
}
#endif
#endif
#include "babeltrace2/babeltrace.h"
#include "babeltrace_cl.h"
#include "xprof_utils.h"
#include <iomanip>
#include <algorithm>
......
#include "babeltrace_cl.h"
#include "clprof.h"
#include "babeltrace_cl_callbacks.h"
#ifndef CPP_H
#define CPP_H
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment