Commit Graph

8 Commits

Author SHA1 Message Date
Dean Lee
177c3b89b6 thneed/serialize: use funtions from clutil(#22760) 2021-11-04 16:19:25 +01:00
Dean Lee
4625098a79 enclose macro arguments in parentheses (#21947)
* macro argument should be enclosed in parentheses

* CL_CHECK
2021-08-18 10:56:37 +02:00
Dean Lee
c53cb5d570 Use C++ header files instead of C header files. (#21192)
* use cstring instead of string.h

* use cstdio instead of stdio.h

* remove inttypes.h

* use cstdlib instead of stdlib.h

* use cstdint instead of stdint.h

* #include <cstddef>

* cstdlib

* use cmath

* remove stddef.h

* use cassert

* use csignal

* use ctime

* use cerror

* rebase master
2021-06-08 13:46:22 -07:00
Dean Lee
3381cd371c clutil.h: remove extern C (#19809) 2021-01-18 15:04:37 +01:00
Dean Lee
3c08d0f1f7 clutil refactor (#2733)
* cleaup clutil.h

* clutil.c -> clutil.cc

* std::hash

* try simplify functions

* using namespace group help functions

* continue

* add function get_platform_info

* continue

* remove caching

* struct CLContext

* std::cout & CL_ERR_TO_STR

* remove CLU_NO_CACHE

* Revert "struct CLContext"

This reverts commit 882e413f227e4c1ba4bb83f956cc67739a189221.

* cl_get_error_string : remove undefied error codes

* replace all printf with std::cout

* util::read_file

* cleanup

* revert CL_ERR_TO_STR

* simplify

* add macro CL_ERR_TO_STR

* cl_get_error_string: fix undeclared errors

* log_size should not +1

* use std::stirng log

* apply review
2020-12-11 13:05:32 +01:00
Dean Lee
42183d913f Error checking macros for opencl (#2615)
* macro CL_CHECK&CL_CHECK_ERR

* trigger checks
2020-11-30 12:04:49 +01:00
Dean Lee
d158837617 add function cl_get_device_id (#1948)
* add func cl_get_device_id

cleanup

* add fix from review
2020-08-17 11:24:39 +02:00
George Hotz
368a956b96 selfdrive/common 2020-01-17 11:01:02 -08:00