rt_ai_runtime.h 971 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * Copyright (c) 2006-2018, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2021-04-01 liqiwen the first version
  9. */
  10. #ifndef __RT_AI_RUNTIME_H__
  11. #define __RT_AI_RUNTIME_H__
  12. #include <rt_ai_def.h>
  13. #ifdef __cplusplus
  14. extern "C"{
  15. #endif
  16. void run_done(void *arg);
  17. void run_entry(rt_ai_t ai);
  18. rt_ai_record_t rt_ai_record_find(const char *name);
  19. rt_ai_record_t rt_ai_record_register(rt_ai_record_t record, const char *name);
  20. rt_ai_record_t rt_ai_record_unregister(const char *name);
  21. rt_ai_record_t rt_ai_record_create(const char *name, rt_ai_uint32_t value);
  22. rt_ai_record_t rt_ai_record_delete(const char *name);
  23. rt_ai_timestamp_t statistic_time_interval(const char *name);
  24. #define TIMESTAMP_INSERT(_name) \
  25. rt_ai_record_create(_name, rt_ai_get_timestamp())
  26. #define STATISTIC_TIME_INTERVAL(_name) \
  27. statistic_time_interval(_name)
  28. #ifdef __cplusplus
  29. }
  30. #endif
  31. #endif //end