Skip to content

Commit

Permalink
Syntax fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
aous72 committed Apr 11, 2024
1 parent fe24e55 commit 5e4b627
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
10 changes: 6 additions & 4 deletions src/core/transform/ojph_transform_avx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,12 @@ namespace ojph {
float K = atk->get_K();
float K_inv = 1.0f / K;
float* dp;
int i;
__m256 factor;

factor = _mm256_set1_ps(K_inv);
dp = lp;
int i = (int)l_width;
i = (int)l_width;
for ( ; i > 0; i -= 8, dp += 8)
{
__m256 s = _mm256_load_ps(dp);
Expand All @@ -176,7 +177,7 @@ namespace ojph {

factor = _mm256_set1_ps(K);
dp = hp;
int i = (int)h_width;
i = (int)h_width;
for ( ; i > 0; i -= 8, dp += 8)
{
__m256 s = _mm256_load_ps(dp);
Expand Down Expand Up @@ -228,11 +229,12 @@ namespace ojph {
float K = atk->get_K();
float K_inv = 1.0f / K;
float* dp;
int i;
__m256 factor;

factor = _mm256_set1_ps(K);
dp = aug;
int i = (int)aug_width;
i = (int)aug_width;
for ( ; i > 0; i -= 8, dp += 8)
{
__m256 s = _mm256_load_ps(dp);
Expand All @@ -241,7 +243,7 @@ namespace ojph {

factor = _mm256_set1_ps(K_inv);
dp = oth;
int i = (int)oth_width;
i = (int)oth_width;
for ( ; i > 0; i -= 8, dp += 8)
{
__m256 s = _mm256_load_ps(dp);
Expand Down
10 changes: 6 additions & 4 deletions src/core/transform/ojph_transform_sse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,12 @@ namespace ojph {
float K = atk->get_K();
float K_inv = 1.0f / K;
float* dp;
int i;
__m128 factor;

factor = _mm_set1_ps(K_inv);
dp = lp;
int i = (int)l_width;
i = (int)l_width;
for ( ; i > 0; i -= 4, dp += 4)
{
__m128 s = _mm_load_ps(dp);
Expand All @@ -156,7 +157,7 @@ namespace ojph {

factor = _mm_set1_ps(K);
dp = hp;
int i = (int)h_width;
i = (int)h_width;
for ( ; i > 0; i -= 4, dp += 4)
{
__m128 s = _mm_load_ps(dp);
Expand Down Expand Up @@ -208,11 +209,12 @@ namespace ojph {
float K = atk->get_K();
float K_inv = 1.0f / K;
float* dp;
int i;
__m128 factor;

factor = _mm_set1_ps(K);
dp = aug;
int i = (int)aug_width;
i = (int)aug_width;
for ( ; i > 0; i -= 4, dp += 4)
{
__m128 s = _mm_load_ps(dp);
Expand All @@ -221,7 +223,7 @@ namespace ojph {

factor = _mm_set1_ps(K_inv);
dp = oth;
int i = (int)oth_width;
i = (int)oth_width;
for ( ; i > 0; i -= 4, dp += 4)
{
__m128 s = _mm_load_ps(dp);
Expand Down

0 comments on commit 5e4b627

Please sign in to comment.