2023-08-24 17:00:26 -07:00
|
|
|
# distutils: language = c++
|
|
|
|
|
|
2024-06-06 14:31:56 -07:00
|
|
|
from msgq.visionipc.visionipc cimport cl_device_id, cl_context, cl_mem
|
2023-08-24 17:00:26 -07:00
|
|
|
|
|
|
|
|
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)
|
2025-01-13 02:15:26 +08:00
|
|
|
void cl_release_context(cl_context)
|
2023-08-24 17:00:26 -07:00
|
|
|
|
|
|
|
|
cdef extern from "selfdrive/modeld/models/commonmodel.h":
|
|
|
|
|
cppclass ModelFrame:
|
|
|
|
|
int buf_size
|
2024-12-18 11:58:59 -08:00
|
|
|
unsigned char * buffer_from_cl(cl_mem*, int);
|
|
|
|
|
cl_mem * prepare(cl_mem, int, int, int, int, mat3)
|
2024-12-16 16:29:06 -08:00
|
|
|
|
|
|
|
|
cppclass DrivingModelFrame:
|
|
|
|
|
int buf_size
|
2025-03-07 14:24:22 -08:00
|
|
|
DrivingModelFrame(cl_device_id, cl_context, int)
|
2024-12-16 16:29:06 -08:00
|
|
|
|
|
|
|
|
cppclass MonitoringModelFrame:
|
|
|
|
|
int buf_size
|
|
|
|
|
MonitoringModelFrame(cl_device_id, cl_context)
|