mirror of
https://github.com/emqx/neuron.git
synced 2026-10-27 12:28:44 +08:00
Ad get value type function for data value
This commit is contained in:
@@ -182,6 +182,7 @@ static inline neu_dtype_e neu_flags_type_in_dtype(neu_dtype_e type)
|
||||
}
|
||||
|
||||
neu_dtype_e neu_dvalue_get_type(neu_data_val_t *val);
|
||||
neu_dtype_e neu_dvalue_get_value_type(neu_data_val_t *val);
|
||||
|
||||
/*
|
||||
* declare all basic function for neu_data_val_t
|
||||
|
||||
@@ -161,6 +161,11 @@ neu_dtype_e neu_dvalue_get_type(neu_data_val_t *val)
|
||||
return val->type;
|
||||
}
|
||||
|
||||
neu_dtype_e neu_dvalue_get_value_type(neu_data_val_t *val)
|
||||
{
|
||||
return val->type & (NEU_DTYPE_FLAGS_START - 1);
|
||||
}
|
||||
|
||||
/* new a normal neu_data_val_t with external buffer */
|
||||
neu_data_val_t *neu_dvalue_new(neu_dtype_e type)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user