openpilot is an open source driver assistance system. openpilot performs the functions of Automated Lane Centering and Adaptive Cruise Control for over 200 supported car makes and models.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
550 B

#pragma once
6 years ago
5 years ago
#include "clutil.h"
6 years ago
#ifdef __cplusplus
extern "C" {
#endif
typedef struct VisionBuf {
size_t len;
size_t mmap_len;
6 years ago
void* addr;
int handle;
int fd;
5 years ago
CLContext *ctx;
6 years ago
cl_mem buf_cl;
cl_command_queue copy_q;
} VisionBuf;
#define VISIONBUF_SYNC_FROM_DEVICE 0
#define VISIONBUF_SYNC_TO_DEVICE 1
VisionBuf visionbuf_allocate(size_t len);
5 years ago
VisionBuf visionbuf_allocate_cl(CLContext *ctx, size_t len);
6 years ago
void visionbuf_sync(const VisionBuf* buf, int dir);
void visionbuf_free(const VisionBuf* buf);
#ifdef __cplusplus
}
#endif