Formatted code (#1007)

* Updated style

* Updated files

* fixed new line

* Updated spacing

* File fix WIP

* Updated to clang 13

* updated comment style

* Removed old comment code
This commit is contained in:
jLynx 2023-05-19 08:16:05 +12:00 committed by GitHub
parent 7aca7ce74d
commit 033c4e9a5b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
599 changed files with 70746 additions and 66896 deletions

View file

@ -29,86 +29,82 @@
#include <cstdint>
struct vec4_s8 {
union {
int8_t v[4];
uint32_t w;
};
union {
int8_t v[4];
uint32_t w;
};
};
struct vec2_s16 {
constexpr vec2_s16(
) : v { 0, 0 }
{
}
constexpr vec2_s16()
: v{0, 0} {
}
constexpr vec2_s16(
const int16_t v
) : v { v, v }
{
}
constexpr vec2_s16(
const int16_t v0,
const int16_t v1
) : v { v0, v1 }
{
}
constexpr vec2_s16(
const int16_t v)
: v{v, v} {
}
constexpr vec2_s16(
const vec2_s16& other
) : w { other.w }
{
}
constexpr vec2_s16(
const int16_t v0,
const int16_t v1)
: v{v0, v1} {
}
vec2_s16& operator=(const vec2_s16& other) {
w = other.w;
return *this;
}
constexpr vec2_s16(
const vec2_s16& other)
: w{other.w} {
}
union {
int16_t v[2];
uint32_t w;
};
vec2_s16& operator=(const vec2_s16& other) {
w = other.w;
return *this;
}
union {
int16_t v[2];
uint32_t w;
};
};
static inline vec4_s8 rev16(const vec4_s8 v) {
vec4_s8 result;
result.w = __REV16(v.w);
return result;
vec4_s8 result;
result.w = __REV16(v.w);
return result;
}
static inline vec4_s8 pkhbt(const vec4_s8 v1, const vec4_s8 v2, const size_t sh = 0) {
vec4_s8 result;
result.w = __PKHBT(v1.w, v2.w, sh);
return result;
vec4_s8 result;
result.w = __PKHBT(v1.w, v2.w, sh);
return result;
}
static inline vec2_s16 pkhbt(const vec2_s16 v1, const vec2_s16 v2, const size_t sh = 0) {
vec2_s16 result;
result.w = __PKHBT(v1.w, v2.w, sh);
return result;
vec2_s16 result;
result.w = __PKHBT(v1.w, v2.w, sh);
return result;
}
static inline vec2_s16 pkhtb(const vec2_s16 v1, const vec2_s16 v2, const size_t sh = 0) {
vec2_s16 result;
result.w = __PKHTB(v1.w, v2.w, sh);
return result;
vec2_s16 result;
result.w = __PKHTB(v1.w, v2.w, sh);
return result;
}
static inline vec2_s16 sxtb16(const vec4_s8 v, const size_t sh = 0) {
vec2_s16 result;
result.w = __SXTB16(v.w, sh);
return result;
vec2_s16 result;
result.w = __SXTB16(v.w, sh);
return result;
}
static inline int32_t smlsd(const vec2_s16 v1, const vec2_s16 v2, const int32_t accum) {
return __SMLSD(v1.w, v2.w, accum);
return __SMLSD(v1.w, v2.w, accum);
}
static inline int32_t smlad(const vec2_s16 v1, const vec2_s16 v2, const int32_t accum) {
return __SMLAD(v1.w, v2.w, accum);
return __SMLAD(v1.w, v2.w, accum);
}
#endif /* defined(LPC43XX_M4) */
#endif/*__SIMD_H__*/
#endif /*__SIMD_H__*/