SyterKit 0.4.0.x
SyterKit is a bare-metal framework
Loading...
Searching...
No Matches
Macros
tm_port.h File Reference
#include <log.h>
#include <timer.h>
Include dependency graph for tm_port.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define TM_ARCH_CPU   (0)
 
#define TM_ARCH_ARM_SIMD   (1)
 
#define TM_ARCH_ARM_NEON   (2)
 
#define TM_ARCH_ARM_MVEI   (3)
 
#define TM_ARCH_RV32P   (4)
 
#define TM_ARCH_RV64V   (5)
 
#define TM_ARCH_CSKYV2   (6)
 
#define TM_ARCH_X86_SSE2   (7)
 
#define TM_OPT0   (0)
 
#define TM_OPT1   (1)
 
#define TM_OPT2   (2)
 
#define TM_ARCH   TM_ARCH_CPU
 
#define TM_OPT_LEVEL   TM_OPT0
 
#define TM_MDL_TYPE   TM_MDL_INT8
 
#define TM_FASTSCALE   (0)
 
#define TM_LOCAL_MATH   (1)
 
#define TM_ENABLE_STAT   (1)
 
#define TM_MAX_CSIZE   (1000)
 
#define TM_MAX_KSIZE   (5 * 5)
 
#define TM_MAX_KCSIZE   (3 * 3 * 256)
 
#define TM_INLINE   __attribute__((always_inline)) static inline
 
#define TM_WEAK   __attribute__((weak))
 
#define tm_malloc(x)   smalloc(x)
 
#define tm_free(x)   sfree(x)
 
#define TM_PRINTF(...)   printk(LOG_LEVEL_MUTE, __VA_ARGS__)
 
#define TM_DBG(...)
 
#define TM_DBGL()   TM_PRINTF("###L%d\n", __LINE__);
 
#define TM_GET_US()   time_us();
 
#define TM_DBGT_INIT()
 
#define TM_DBGT_START()   _start = TM_GET_US();
 
#define TM_DBGT(x)
 
#define TM_EN_PERF   0
 
#define TM_GET_TICK(x)
 
#define TM_TICK_PERUS
 
#define TM_PERF_REG(x)
 
#define TM_PERF_EXTREG(x)
 
#define TM_PERF_INIT(x)
 
#define TM_PERF_START(x)
 
#define TM_PERF_ADD(x)
 
#define TM_PERF_PRINT(x)
 

Macro Definition Documentation

◆ TM_ARCH

#define TM_ARCH   TM_ARCH_CPU

◆ TM_ARCH_ARM_MVEI

#define TM_ARCH_ARM_MVEI   (3)

◆ TM_ARCH_ARM_NEON

#define TM_ARCH_ARM_NEON   (2)

◆ TM_ARCH_ARM_SIMD

#define TM_ARCH_ARM_SIMD   (1)

◆ TM_ARCH_CPU

#define TM_ARCH_CPU   (0)

◆ TM_ARCH_CSKYV2

#define TM_ARCH_CSKYV2   (6)

◆ TM_ARCH_RV32P

#define TM_ARCH_RV32P   (4)

◆ TM_ARCH_RV64V

#define TM_ARCH_RV64V   (5)

◆ TM_ARCH_X86_SSE2

#define TM_ARCH_X86_SSE2   (7)

◆ TM_DBG

#define TM_DBG (   ...)
Value:
TM_PRINTF("###L%d: ", __LINE__); \
TM_PRINTF(__VA_ARGS__);
#define TM_PRINTF(...)
Definition tm_port.h:50

◆ TM_DBGL

#define TM_DBGL ( )    TM_PRINTF("###L%d\n", __LINE__);

◆ TM_DBGT

#define TM_DBGT (   x)
Value:
{ \
_finish = TM_GET_US(); \
_time = (float) (_finish - _start) / 1000.0; \
TM_PRINTF("===%s use %.3f ms\n", (x), _time); \
_start = TM_GET_US(); \
}
#define TM_GET_US()
Definition tm_port.h:58

◆ TM_DBGT_INIT

#define TM_DBGT_INIT ( )
Value:
uint32_t _start, _finish; \
float _time; \
_start = TM_GET_US();
u32_t uint32_t
Definition stdint.h:13

◆ TM_DBGT_START

#define TM_DBGT_START ( )    _start = TM_GET_US();

◆ TM_EN_PERF

#define TM_EN_PERF   0

◆ TM_ENABLE_STAT

#define TM_ENABLE_STAT   (1)

◆ TM_FASTSCALE

#define TM_FASTSCALE   (0)

◆ tm_free

#define tm_free (   x)    sfree(x)

◆ TM_GET_TICK

#define TM_GET_TICK (   x)

◆ TM_GET_US

#define TM_GET_US ( )    time_us();

◆ TM_INLINE

#define TM_INLINE   __attribute__((always_inline)) static inline

◆ TM_LOCAL_MATH

#define TM_LOCAL_MATH   (1)

◆ tm_malloc

#define tm_malloc (   x)    smalloc(x)

◆ TM_MAX_CSIZE

#define TM_MAX_CSIZE   (1000)

◆ TM_MAX_KCSIZE

#define TM_MAX_KCSIZE   (3 * 3 * 256)

◆ TM_MAX_KSIZE

#define TM_MAX_KSIZE   (5 * 5)

◆ TM_MDL_TYPE

#define TM_MDL_TYPE   TM_MDL_INT8

◆ TM_OPT0

#define TM_OPT0   (0)

◆ TM_OPT1

#define TM_OPT1   (1)

◆ TM_OPT2

#define TM_OPT2   (2)

◆ TM_OPT_LEVEL

#define TM_OPT_LEVEL   TM_OPT0

◆ TM_PERF_ADD

#define TM_PERF_ADD (   x)

◆ TM_PERF_EXTREG

#define TM_PERF_EXTREG (   x)

◆ TM_PERF_INIT

#define TM_PERF_INIT (   x)

◆ TM_PERF_PRINT

#define TM_PERF_PRINT (   x)

◆ TM_PERF_REG

#define TM_PERF_REG (   x)

◆ TM_PERF_START

#define TM_PERF_START (   x)

◆ TM_PRINTF

#define TM_PRINTF (   ...)    printk(LOG_LEVEL_MUTE, __VA_ARGS__)

◆ TM_TICK_PERUS

#define TM_TICK_PERUS

◆ TM_WEAK

#define TM_WEAK   __attribute__((weak))