mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 06:17:49 +00:00
Special case for alpha=1 in saxpy, slight performance increase.
This commit is contained in:
@@ -177,10 +177,19 @@ namespace Blas {
|
||||
float * SF_BLAS_RESTRICT Y
|
||||
)
|
||||
{
|
||||
|
||||
for(int i = 0; i < N; ++i)
|
||||
if (alpha == 1.0f)
|
||||
{
|
||||
Y[i] += X[i] * alpha;
|
||||
for (int i = 0; i < N; ++i)
|
||||
{
|
||||
Y[i] += X[i];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < N; ++i)
|
||||
{
|
||||
Y[i] += X[i] * alpha;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user