Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ Change log for Vector class library
* constructors to make boolean vectors from their elements
* constructors and = operators to broadcast boolean scalar into boolean vectors
* various lookup functions improved
* operators &, |, ^, ~, etc. defined for various boolean vectors to avoid converson
* operators &, |, ^, ~, etc. defined for various boolean vectors to avoid conversion
to integer vectors
* nmul_add functions
* mul_add etc. moved to main header files
Expand Down
10 changes: 5 additions & 5 deletions instrset.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
// Header files for non-vector intrinsic functions including _BitScanReverse(int), __cpuid(int[4],int), _xgetbv(int)
#ifdef _MSC_VER // Microsoft compiler or compatible Intel compiler
#include <intrin.h>
#pragma warning(disable: 6323 4514 4710 4711) // Diasble annoying warnings
#pragma warning(disable: 6323 4514 4710 4711) // Disable annoying warnings
#else
#include <x86intrin.h> // Gcc or Clang compiler
#endif
Expand Down Expand Up @@ -182,7 +182,7 @@ Additional problem: The version number is not consistent across platforms. The A
different version numbers. We have to rely on __apple_build_version__ on the Mac platform:
http://llvm.org/bugs/show_bug.cgi?id=12643
We have to make switches here when - hopefully - the error some day has been fixed.
We need different version checks with and whithout __apple_build_version__
We need different version checks with and without __apple_build_version__
*/
#if (defined (__clang__) || defined(__apple_build_version__)) && !defined(__INTEL_COMPILER)
#define FIX_CLANG_VECTOR_ALIAS_AMBIGUITY
Expand Down Expand Up @@ -1235,7 +1235,7 @@ constexpr uint64_t blend_flags(int const (&a)[V::size()]) {
// blend_perm_indexes: return an Indexlist for implementing a blend function as
// two permutations. N = vector size.
// dozero = 0: let unused elements be don't care. The two permutation results must be blended
// dozero = 1: zero unused elements in each permuation. The two permutation results can be OR'ed
// dozero = 1: zero unused elements in each permutation. The two permutation results can be OR'ed
// dozero = 2: indexes that are -1 or V_DC are preserved
template <int N, int dozero>
constexpr EList<int, 2*N> blend_perm_indexes(int const (&a)[N]) {
Expand Down Expand Up @@ -1321,7 +1321,7 @@ constexpr EList<int, N/2> largeblock_indexes(int const (&a)[N]) {
*
****************************************************************************************/

// Make dummy blend function templates to avoid error messages when the blend funtions are not yet defined
// Make dummy blend function templates to avoid error messages when the blend functions are not yet defined
template <typename dummy> void blend2(){}
template <typename dummy> void blend4(){}
template <typename dummy> void blend8(){}
Expand All @@ -1331,7 +1331,7 @@ template <typename dummy> void blend32(){}
// blend_half_indexes: return an Indexlist for emulating a blend function as
// blends or permutations from multiple sources
// dozero = 0: let unused elements be don't care. Multiple permutation results must be blended
// dozero = 1: zero unused elements in each permuation. Multiple permutation results can be OR'ed
// dozero = 1: zero unused elements in each permutation. Multiple permutation results can be OR'ed
// dozero = 2: indexes that are -1 or V_DC are preserved
// src1, src2: sources to blend in a partial implementation
template <int N, int dozero, int src1, int src2>
Expand Down
2 changes: 1 addition & 1 deletion vector_convert.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Project: vector class library
* Description:
* Header file for conversion between different vector classes with different
* sizes. Also includes verious generic template functions.
* sizes. Also includes various generic template functions.
*
* (c) Copyright 2012-2022 Agner Fog.
* Apache License version 2.0 or later.
Expand Down
4 changes: 2 additions & 2 deletions vectorf128.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ class Vec4fb {
but apparently the problem has come back. The aliasing of vector types has been reported on
__apple_build_version__ = 8000042
We have to make switches here when - hopefully - the error some day has been fixed.
We need different version checks with and whithout __apple_build_version__
We need different version checks with and without __apple_build_version__
*/
#ifndef FIX_CLANG_VECTOR_ALIAS_AMBIGUITY
// Type cast operator to convert to type Vec4ib used as Boolean for integer vectors
Expand Down Expand Up @@ -1404,7 +1404,7 @@ static inline Vec4f exp2(Vec4i const n) {
//static Vec4f exp2(Vec4f const x); // defined in vectormath_exp.h


// Control word manipulaton
// Control word manipulation
// ------------------------
// The MXCSR control word has the following bits:
// 0: Invalid Operation Flag
Expand Down
2 changes: 1 addition & 1 deletion vectori128.h
Original file line number Diff line number Diff line change
Expand Up @@ -4076,7 +4076,7 @@ static inline Vec2q operator * (Vec2q const a, Vec2q const b) {
int64_t aa[2], bb[2];
a.store(aa); // split into elements
b.store(bb);
return Vec2q(aa[0] * bb[0], aa[1] * bb[1]); // multiply elements separetely
return Vec2q(aa[0] * bb[0], aa[1] * bb[1]); // multiply elements separately
#endif
}

Expand Down
12 changes: 6 additions & 6 deletions vectori256.h
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,7 @@ static inline Vec32c operator >> (Vec32c const a, int b) {
#endif
}

// vector operator >>= : shift right artihmetic
// vector operator >>= : shift right arithmetic
static inline Vec32c & operator >>= (Vec32c & a, int b) {
a = a >> b;
return a;
Expand Down Expand Up @@ -1139,7 +1139,7 @@ static inline Vec32uc operator >> (Vec32uc const a, int32_t b) {
return a >> (uint32_t)b;
}

// vector operator >>= : shift right artihmetic
// vector operator >>= : shift right arithmetic
static inline Vec32uc & operator >>= (Vec32uc & a, uint32_t b) {
a = a >> b;
return a;
Expand Down Expand Up @@ -1984,7 +1984,7 @@ static inline Vec16us operator >> (Vec16us const a, int32_t b) {
return a >> (uint32_t)b;
}

// vector operator >>= : shift right artihmetic
// vector operator >>= : shift right arithmetic
static inline Vec16us & operator >>= (Vec16us & a, uint32_t b) {
a = a >> b;
return a;
Expand Down Expand Up @@ -3700,7 +3700,7 @@ static inline Vec4uq operator >> (Vec4uq const a, uint32_t b) {
static inline Vec4uq operator >> (Vec4uq const a, int32_t b) {
return a >> (uint32_t)b;
}
// vector operator >>= : shift right artihmetic
// vector operator >>= : shift right arithmetic
static inline Vec4uq & operator >>= (Vec4uq & a, uint32_t b) {
a = a >> b;
return a;
Expand Down Expand Up @@ -5389,7 +5389,7 @@ static inline Vec8i operator / (Vec8i const a, Divisor_i const d) {
__m256i t4 = _mm256_mul_epi32(t3,m); // 32x32->64 bit signed multiplication of odd elements
__m256i t7 = _mm256_blend_epi32(t2,t4,0xAA);
__m256i t8 = _mm256_add_epi32(t7,a); // add
__m256i t9 = _mm256_sra_epi32(t8,d.gets1()); // shift right artihmetic
__m256i t9 = _mm256_sra_epi32(t8,d.gets1()); // shift right arithmetic
__m256i t10 = _mm256_srai_epi32(a,31); // sign of a
__m256i t11 = _mm256_sub_epi32(t10,sgn); // sign of a - sign of d
__m256i t12 = _mm256_sub_epi32(t9,t11); // + 1 if a < 0, -1 if d < 0
Expand All @@ -5416,7 +5416,7 @@ static inline Vec16s operator / (Vec16s const a, Divisor_s const d) {
__m256i sgn = _mm256_broadcastq_epi64(d.getsign()); // broadcast sign of d
__m256i t1 = _mm256_mulhi_epi16(a, m); // multiply high signed words
__m256i t2 = _mm256_add_epi16(t1,a); // + a
__m256i t3 = _mm256_sra_epi16(t2,d.gets1()); // shift right artihmetic
__m256i t3 = _mm256_sra_epi16(t2,d.gets1()); // shift right arithmetic
__m256i t4 = _mm256_srai_epi16(a,15); // sign of a
__m256i t5 = _mm256_sub_epi16(t4,sgn); // sign of a - sign of d
__m256i t6 = _mm256_sub_epi16(t3,t5); // + 1 if a < 0, -1 if d < 0
Expand Down
8 changes: 4 additions & 4 deletions vectori256e.h
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ static inline Vec32c operator >> (Vec32c const a, int b) {
return Vec32c(a.get_low() >> b, a.get_high() >> b);
}

// vector operator >>= : shift right artihmetic
// vector operator >>= : shift right arithmetic
static inline Vec32c & operator >>= (Vec32c & a, int b) {
a = a >> b;
return a;
Expand Down Expand Up @@ -839,7 +839,7 @@ static inline Vec32uc operator >> (Vec32uc const a, int32_t b) {
return a >> (uint32_t)b;
}

// vector operator >>= : shift right artihmetic
// vector operator >>= : shift right arithmetic
static inline Vec32uc & operator >>= (Vec32uc & a, uint32_t b) {
a = a >> b;
return a;
Expand Down Expand Up @@ -1566,7 +1566,7 @@ static inline Vec16us operator >> (Vec16us const a, int b) {
return a >> (uint32_t)b;
}

// vector operator >>= : shift right artihmetic
// vector operator >>= : shift right arithmetic
static inline Vec16us & operator >>= (Vec16us & a, uint32_t b) {
a = a >> b;
return a;
Expand Down Expand Up @@ -3007,7 +3007,7 @@ static inline Vec4uq operator >> (Vec4uq const a, int32_t b) {
return a >> (uint32_t)b;
}

// vector operator >>= : shift right artihmetic
// vector operator >>= : shift right arithmetic
static inline Vec4uq & operator >>= (Vec4uq & a, uint32_t b) {
a = a >> b;
return a;
Expand Down
4 changes: 2 additions & 2 deletions vectori512.h
Original file line number Diff line number Diff line change
Expand Up @@ -1180,7 +1180,7 @@ static inline Vec8uq operator >> (Vec8uq const a, uint32_t b) {
static inline Vec8uq operator >> (Vec8uq const a, int32_t b) {
return a >> (uint32_t)b;
}
// vector operator >>= : shift right artihmetic
// vector operator >>= : shift right arithmetic
static inline Vec8uq & operator >>= (Vec8uq & a, uint32_t b) {
a = a >> b;
return a;
Expand Down Expand Up @@ -1993,7 +1993,7 @@ static inline Vec16i operator / (Vec16i const a, Divisor_i const d) {
__m512i t2 = _mm512_srli_epi64(t1,32); // dword of even index results
__m512i t7 = _mm512_mask_mov_epi32(t2, 0xAAAA, t4); // blend two results
__m512i t8 = _mm512_add_epi32(t7,a); // add
__m512i t9 = _mm512_sra_epi32(t8,d.gets1()); // shift right artihmetic
__m512i t9 = _mm512_sra_epi32(t8,d.gets1()); // shift right arithmetic
__m512i t10 = _mm512_srai_epi32(a,31); // sign of a
__m512i t11 = _mm512_sub_epi32(t10,sgn); // sign of a - sign of d
__m512i t12 = _mm512_sub_epi32(t9,t11); // + 1 if a < 0, -1 if d < 0
Expand Down
2 changes: 1 addition & 1 deletion vectori512e.h
Original file line number Diff line number Diff line change
Expand Up @@ -1649,7 +1649,7 @@ static inline Vec8uq operator >> (Vec8uq const a, int32_t b) {
return a >> (uint32_t)b;
}

// vector operator >>= : shift right artihmetic
// vector operator >>= : shift right arithmetic
static inline Vec8uq & operator >>= (Vec8uq & a, uint32_t b) {
a = a >> b;
return a;
Expand Down
4 changes: 2 additions & 2 deletions vectori512s.h
Original file line number Diff line number Diff line change
Expand Up @@ -1546,7 +1546,7 @@ static inline Vec64c permute64(Vec64c const a) {
EList<uint16_t, 32> u = {{0}}; // list to return
for (int i = 0; i < 64; i += 2) { // loop through even indexes
uint16_t ix = indexs[i] & 63;
// source bytes with odd position are in opposite 16-bit word becase of 32-bit rotation
// source bytes with odd position are in opposite 16-bit word because of 32-bit rotation
u.a[i>>1] = ((ix >> 1) ^ (ix & 1)) | (((ix & 1) ^ 1) << 5);
}
return u;
Expand Down Expand Up @@ -2077,7 +2077,7 @@ static inline Vec32s operator / (Vec32s const a, Divisor_s const d) {
__m512i sgn = _mm512_broadcastq_epi64(d.getsign()); // broadcast sign of d
__m512i t1 = _mm512_mulhi_epi16(a, m); // multiply high signed words
__m512i t2 = _mm512_add_epi16(t1,a); // + a
__m512i t3 = _mm512_sra_epi16(t2,d.gets1()); // shift right artihmetic
__m512i t3 = _mm512_sra_epi16(t2,d.gets1()); // shift right arithmetic
__m512i t4 = _mm512_srai_epi16(a,15); // sign of a
__m512i t5 = _mm512_sub_epi16(t4,sgn); // sign of a - sign of d
__m512i t6 = _mm512_sub_epi16(t3,t5); // + 1 if a < 0, -1 if d < 0
Expand Down