mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-09-03 22:53:44 +08:00
81da8ac9f4
date: 2024-06-11T01:36:39 master commit: f8cb04e4a8b032b72a909f68b808a50936184bee
15 lines
625 B
Cython
15 lines
625 B
Cython
# distutils: language = c++
|
|
# cython: c_string_encoding=ascii
|
|
|
|
from libcpp cimport bool
|
|
from libcpp.string cimport string
|
|
|
|
from .thneedmodel cimport ThneedModel as cppThneedModel
|
|
from selfdrive.modeld.models.commonmodel_pyx cimport CLContext
|
|
from selfdrive.modeld.runners.runmodel_pyx cimport RunModel
|
|
from selfdrive.modeld.runners.runmodel cimport RunModel as cppRunModel
|
|
|
|
cdef class ThneedModel(RunModel):
|
|
def __cinit__(self, string path, float[:] output, int runtime, bool use_tf8, CLContext context):
|
|
self.model = <cppRunModel *> new cppThneedModel(path, &output[0], len(output), runtime, use_tf8, context.context)
|