mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-09-02 22:23:42 +08:00
eefc084302
version: sunnypilot v2025.003.000 (dev) date: 2025-12-18T05:48:43 master commit: 16c052af0835f049a67b80251d8cc1114fc08bb4
28 lines
787 B
Cython
28 lines
787 B
Cython
# distutils: language = c++
|
|
|
|
from msgq.visionipc.visionipc cimport cl_device_id, cl_context, cl_mem
|
|
|
|
cdef extern from "common/mat.h":
|
|
cdef struct mat3:
|
|
float v[9]
|
|
|
|
cdef extern from "common/clutil.h":
|
|
cdef unsigned long CL_DEVICE_TYPE_DEFAULT
|
|
cl_device_id cl_get_device_id(unsigned long)
|
|
cl_context cl_create_context(cl_device_id)
|
|
void cl_release_context(cl_context)
|
|
|
|
cdef extern from "selfdrive/modeld/models/commonmodel.h":
|
|
cppclass ModelFrame:
|
|
int buf_size
|
|
unsigned char * buffer_from_cl(cl_mem*, int);
|
|
cl_mem * prepare(cl_mem, int, int, int, int, mat3)
|
|
|
|
cppclass DrivingModelFrame:
|
|
int buf_size
|
|
DrivingModelFrame(cl_device_id, cl_context, int)
|
|
|
|
cppclass MonitoringModelFrame:
|
|
int buf_size
|
|
MonitoringModelFrame(cl_device_id, cl_context)
|