Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
8f022978
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
8f022978
编写于
12月 12, 2022
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor: do some internal refactor.
上级
c31f36d8
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
14 addition
and
14 deletion
+14
-14
include/os/osEnv.h
include/os/osEnv.h
+1
-1
source/common/src/tglobal.c
source/common/src/tglobal.c
+1
-1
source/libs/function/src/detail/tavgfunction.c
source/libs/function/src/detail/tavgfunction.c
+1
-1
source/libs/function/src/detail/tminmax.c
source/libs/function/src/detail/tminmax.c
+5
-5
source/os/src/osEnv.c
source/os/src/osEnv.c
+1
-1
source/os/src/osSysinfo.c
source/os/src/osSysinfo.c
+5
-5
未找到文件。
include/os/osEnv.h
浏览文件 @
8f022978
...
@@ -36,7 +36,7 @@ extern int64_t tsStreamMax;
...
@@ -36,7 +36,7 @@ extern int64_t tsStreamMax;
extern
float
tsNumOfCores
;
extern
float
tsNumOfCores
;
extern
int64_t
tsTotalMemoryKB
;
extern
int64_t
tsTotalMemoryKB
;
extern
char
*
tsProcPath
;
extern
char
*
tsProcPath
;
extern
char
tsSIMD
Enable
;
extern
char
tsSIMD
Builtins
;
extern
char
tsSSE42Enable
;
extern
char
tsSSE42Enable
;
extern
char
tsAVXEnable
;
extern
char
tsAVXEnable
;
extern
char
tsAVX2Enable
;
extern
char
tsAVX2Enable
;
...
...
source/common/src/tglobal.c
浏览文件 @
8f022978
...
@@ -340,7 +340,7 @@ static int32_t taosAddSystemCfg(SConfig *pCfg) {
...
@@ -340,7 +340,7 @@ static int32_t taosAddSystemCfg(SConfig *pCfg) {
if
(
cfgAddBool
(
pCfg
,
"AVX"
,
tsAVXEnable
,
0
)
!=
0
)
return
-
1
;
if
(
cfgAddBool
(
pCfg
,
"AVX"
,
tsAVXEnable
,
0
)
!=
0
)
return
-
1
;
if
(
cfgAddBool
(
pCfg
,
"AVX2"
,
tsAVX2Enable
,
0
)
!=
0
)
return
-
1
;
if
(
cfgAddBool
(
pCfg
,
"AVX2"
,
tsAVX2Enable
,
0
)
!=
0
)
return
-
1
;
if
(
cfgAddBool
(
pCfg
,
"FMA"
,
tsFMAEnable
,
0
)
!=
0
)
return
-
1
;
if
(
cfgAddBool
(
pCfg
,
"FMA"
,
tsFMAEnable
,
0
)
!=
0
)
return
-
1
;
if
(
cfgAddBool
(
pCfg
,
"SIMD-
Supported"
,
tsSIMDEnable
,
0
)
!=
0
)
return
-
1
;
if
(
cfgAddBool
(
pCfg
,
"SIMD-
builtins"
,
tsSIMDBuiltins
,
0
)
!=
0
)
return
-
1
;
if
(
cfgAddInt64
(
pCfg
,
"openMax"
,
tsOpenMax
,
0
,
INT64_MAX
,
1
)
!=
0
)
return
-
1
;
if
(
cfgAddInt64
(
pCfg
,
"openMax"
,
tsOpenMax
,
0
,
INT64_MAX
,
1
)
!=
0
)
return
-
1
;
if
(
cfgAddInt64
(
pCfg
,
"streamMax"
,
tsStreamMax
,
0
,
INT64_MAX
,
1
)
!=
0
)
return
-
1
;
if
(
cfgAddInt64
(
pCfg
,
"streamMax"
,
tsStreamMax
,
0
,
INT64_MAX
,
1
)
!=
0
)
return
-
1
;
...
...
source/libs/function/src/detail/tavgfunction.c
浏览文件 @
8f022978
...
@@ -514,7 +514,7 @@ int32_t avgFunction(SqlFunctionCtx* pCtx) {
...
@@ -514,7 +514,7 @@ int32_t avgFunction(SqlFunctionCtx* pCtx) {
numOfElem
=
pInput
->
numOfRows
;
numOfElem
=
pInput
->
numOfRows
;
pAvgRes
->
count
+=
pInput
->
numOfRows
;
pAvgRes
->
count
+=
pInput
->
numOfRows
;
bool
simdAvailable
=
tsAVXEnable
&&
tsSIMD
Enable
&&
(
numOfRows
>
THRESHOLD_SIZE
);
bool
simdAvailable
=
tsAVXEnable
&&
tsSIMD
Builtins
&&
(
numOfRows
>
THRESHOLD_SIZE
);
switch
(
type
)
{
switch
(
type
)
{
case
TSDB_DATA_TYPE_UTINYINT
:
case
TSDB_DATA_TYPE_UTINYINT
:
...
...
source/libs/function/src/detail/tminmax.c
浏览文件 @
8f022978
...
@@ -369,7 +369,7 @@ static int32_t findFirstValPosition(const SColumnInfoData* pCol, int32_t start,
...
@@ -369,7 +369,7 @@ static int32_t findFirstValPosition(const SColumnInfoData* pCol, int32_t start,
static
void
handleInt8Col
(
const
void
*
data
,
int32_t
start
,
int32_t
numOfRows
,
SMinmaxResInfo
*
pBuf
,
bool
isMinFunc
,
static
void
handleInt8Col
(
const
void
*
data
,
int32_t
start
,
int32_t
numOfRows
,
SMinmaxResInfo
*
pBuf
,
bool
isMinFunc
,
bool
signVal
)
{
bool
signVal
)
{
// AVX2 version to speedup the loop
// AVX2 version to speedup the loop
if
(
tsAVX2Enable
&&
tsSIMD
Enable
)
{
if
(
tsAVX2Enable
&&
tsSIMD
Builtins
)
{
pBuf
->
v
=
i8VectorCmpAVX2
(
data
,
numOfRows
,
isMinFunc
,
signVal
);
pBuf
->
v
=
i8VectorCmpAVX2
(
data
,
numOfRows
,
isMinFunc
,
signVal
);
}
else
{
}
else
{
if
(
!
pBuf
->
assign
)
{
if
(
!
pBuf
->
assign
)
{
...
@@ -403,7 +403,7 @@ static void handleInt8Col(const void* data, int32_t start, int32_t numOfRows, SM
...
@@ -403,7 +403,7 @@ static void handleInt8Col(const void* data, int32_t start, int32_t numOfRows, SM
static
void
handleInt16Col
(
const
void
*
data
,
int32_t
start
,
int32_t
numOfRows
,
SMinmaxResInfo
*
pBuf
,
bool
isMinFunc
,
static
void
handleInt16Col
(
const
void
*
data
,
int32_t
start
,
int32_t
numOfRows
,
SMinmaxResInfo
*
pBuf
,
bool
isMinFunc
,
bool
signVal
)
{
bool
signVal
)
{
// AVX2 version to speedup the loop
// AVX2 version to speedup the loop
if
(
tsAVX2Enable
&&
tsSIMD
Enable
)
{
if
(
tsAVX2Enable
&&
tsSIMD
Builtins
)
{
pBuf
->
v
=
i16VectorCmpAVX2
(
data
,
numOfRows
,
isMinFunc
,
signVal
);
pBuf
->
v
=
i16VectorCmpAVX2
(
data
,
numOfRows
,
isMinFunc
,
signVal
);
}
else
{
}
else
{
if
(
!
pBuf
->
assign
)
{
if
(
!
pBuf
->
assign
)
{
...
@@ -437,7 +437,7 @@ static void handleInt16Col(const void* data, int32_t start, int32_t numOfRows, S
...
@@ -437,7 +437,7 @@ static void handleInt16Col(const void* data, int32_t start, int32_t numOfRows, S
static
void
handleInt32Col
(
const
void
*
data
,
int32_t
start
,
int32_t
numOfRows
,
SMinmaxResInfo
*
pBuf
,
bool
isMinFunc
,
static
void
handleInt32Col
(
const
void
*
data
,
int32_t
start
,
int32_t
numOfRows
,
SMinmaxResInfo
*
pBuf
,
bool
isMinFunc
,
bool
signVal
)
{
bool
signVal
)
{
// AVX2 version to speedup the loop
// AVX2 version to speedup the loop
if
(
tsAVX2Enable
&&
tsSIMD
Enable
)
{
if
(
tsAVX2Enable
&&
tsSIMD
Builtins
)
{
pBuf
->
v
=
i32VectorCmpAVX2
(
data
,
numOfRows
,
isMinFunc
,
signVal
);
pBuf
->
v
=
i32VectorCmpAVX2
(
data
,
numOfRows
,
isMinFunc
,
signVal
);
}
else
{
}
else
{
if
(
!
pBuf
->
assign
)
{
if
(
!
pBuf
->
assign
)
{
...
@@ -500,7 +500,7 @@ static void handleFloatCol(SColumnInfoData* pCol, int32_t start, int32_t numOfRo
...
@@ -500,7 +500,7 @@ static void handleFloatCol(SColumnInfoData* pCol, int32_t start, int32_t numOfRo
float
*
val
=
(
float
*
)
&
pBuf
->
v
;
float
*
val
=
(
float
*
)
&
pBuf
->
v
;
// AVX version to speedup the loop
// AVX version to speedup the loop
if
(
tsAVXEnable
&&
tsSIMD
Enable
)
{
if
(
tsAVXEnable
&&
tsSIMD
Builtins
)
{
*
val
=
floatVectorCmpAVX
(
pData
,
numOfRows
,
isMinFunc
);
*
val
=
floatVectorCmpAVX
(
pData
,
numOfRows
,
isMinFunc
);
}
else
{
}
else
{
if
(
!
pBuf
->
assign
)
{
if
(
!
pBuf
->
assign
)
{
...
@@ -530,7 +530,7 @@ static void handleDoubleCol(SColumnInfoData* pCol, int32_t start, int32_t numOfR
...
@@ -530,7 +530,7 @@ static void handleDoubleCol(SColumnInfoData* pCol, int32_t start, int32_t numOfR
double
*
val
=
(
double
*
)
&
pBuf
->
v
;
double
*
val
=
(
double
*
)
&
pBuf
->
v
;
// AVX version to speedup the loop
// AVX version to speedup the loop
if
(
tsAVXEnable
&&
tsSIMD
Enable
)
{
if
(
tsAVXEnable
&&
tsSIMD
Builtins
)
{
*
val
=
(
double
)
doubleVectorCmpAVX
(
pData
,
numOfRows
,
isMinFunc
);
*
val
=
(
double
)
doubleVectorCmpAVX
(
pData
,
numOfRows
,
isMinFunc
);
}
else
{
}
else
{
if
(
!
pBuf
->
assign
)
{
if
(
!
pBuf
->
assign
)
{
...
...
source/os/src/osEnv.c
浏览文件 @
8f022978
...
@@ -37,7 +37,7 @@ float tsNumOfCores = 0;
...
@@ -37,7 +37,7 @@ float tsNumOfCores = 0;
int64_t
tsTotalMemoryKB
=
0
;
int64_t
tsTotalMemoryKB
=
0
;
char
*
tsProcPath
=
NULL
;
char
*
tsProcPath
=
NULL
;
char
tsSIMD
Enable
=
0
;
char
tsSIMD
Builtins
=
0
;
char
tsSSE42Enable
=
0
;
char
tsSSE42Enable
=
0
;
char
tsAVXEnable
=
0
;
char
tsAVXEnable
=
0
;
char
tsAVX2Enable
=
0
;
char
tsAVX2Enable
=
0
;
...
...
source/os/src/osSysinfo.c
浏览文件 @
8f022978
...
@@ -484,11 +484,11 @@ int32_t taosGetCpuInstructions(char* sse42, char* avx, char* avx2, char* fma) {
...
@@ -484,11 +484,11 @@ int32_t taosGetCpuInstructions(char* sse42, char* avx, char* avx2, char* fma) {
#ifdef _TD_X86_
#ifdef _TD_X86_
// Since the compiler is not support avx/avx2 instructions, the global variables always need to be
// Since the compiler is not support avx/avx2 instructions, the global variables always need to be
// set to be false
// set to be false
#if __AVX__ || __AVX2__
//
#if __AVX__ || __AVX2__
tsSIMDEnable
=
true
;
// tsSIMDBuiltins
= true;
#else
//
#else
tsSIMDEnable
=
false
;
// tsSIMDBuiltins
= false;
#endif
//
#endif
uint32_t
eax
=
0
,
ebx
=
0
,
ecx
=
0
,
edx
=
0
;
uint32_t
eax
=
0
,
ebx
=
0
,
ecx
=
0
,
edx
=
0
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录