convert loadyuv.c to loadyuv.cc (#2754)

albatross
Dean Lee 2020-12-13 09:10:51 +08:00 committed by GitHub
parent 3d63b3d414
commit d6eead25d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 24 deletions

View File

@ -398,7 +398,8 @@ selfdrive/modeld/models/driving.h
selfdrive/modeld/models/dmonitoring.cc
selfdrive/modeld/models/dmonitoring.h
selfdrive/modeld/transforms/loadyuv.[c,h]
selfdrive/modeld/transforms/loadyuv.cc
selfdrive/modeld/transforms/loadyuv.h
selfdrive/modeld/transforms/loadyuv.cl
selfdrive/modeld/transforms/transform.cc
selfdrive/modeld/transforms/transform.h

View File

@ -8,7 +8,7 @@ TEST_THNEED = False
common_src = [
"models/commonmodel.cc",
"runners/snpemodel.cc",
"transforms/loadyuv.c",
"transforms/loadyuv.cc",
"transforms/transform.cc"
]

View File

@ -1,8 +1,5 @@
#include <string.h>
#include <assert.h>
#include "clutil.h"
#include "loadyuv.h"
void loadyuv_init(LoadYUVState* s, cl_context ctx, cl_device_id device_id, int width, int height) {

View File

@ -1,18 +1,8 @@
#ifndef LOADYUV_H
#define LOADYUV_H
#pragma once
#include <inttypes.h>
#include <stdbool.h>
#ifdef __APPLE__
#include <OpenCL/cl.h>
#else
#include <CL/cl.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
#include "clutil.h"
typedef struct {
int width, height;
@ -26,9 +16,3 @@ void loadyuv_destroy(LoadYUVState* s);
void loadyuv_queue(LoadYUVState* s, cl_command_queue q,
cl_mem y_cl, cl_mem u_cl, cl_mem v_cl,
cl_mem out_cl);
#ifdef __cplusplus
}
#endif
#endif // LOADYUV_H

View File

@ -49,7 +49,7 @@ all: visiontest
libvisiontest_inputs := visiontest.c \
transforms/transform.cc \
transforms/loadyuv.c \
transforms/loadyuv.cc \
../common/clutil.cc \
$(BASEDIR)/selfdrive/common/util.c \
$(CEREAL_OBJS)