Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6fcb1488 authored by Glenn Kasten's avatar Glenn Kasten Committed by Android (Google) Code Review
Browse files

Merge "Use static_assert instead of COMPILE_TIME_ASSERT_FUNCTION_SCOPE"

parents efb7b9b2 91164e7f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -186,7 +186,7 @@ void ProcessBase(TO* const out,
        TINTERP lerpP,
        const TO* const volumeLR)
{
    COMPILE_TIME_ASSERT_FUNCTION_SCOPE(CHANNELS > 0)
    static_assert(CHANNELS > 0, "CHANNELS must be > 0");

    if (CHANNELS > 2) {
        // TO accum[CHANNELS];
+3 −3
Original line number Diff line number Diff line
@@ -83,7 +83,7 @@ static inline void ProcessNeonIntrinsic(int32_t* out,
        const int16_t* coefsN1)
{
    ALOG_ASSERT(count > 0 && (count & 7) == 0); // multiple of 8
    COMPILE_TIME_ASSERT_FUNCTION_SCOPE(CHANNELS == 1 || CHANNELS == 2);
    static_assert(CHANNELS == 1 || CHANNELS == 2, "CHANNELS must be 1 or 2");

    sP -= CHANNELS*((STRIDE>>1)-1);
    coefsP = (const int16_t*)__builtin_assume_aligned(coefsP, 16);
@@ -191,7 +191,7 @@ static inline void ProcessNeonIntrinsic(int32_t* out,
        const int32_t* coefsN1)
{
    ALOG_ASSERT(count > 0 && (count & 7) == 0); // multiple of 8
    COMPILE_TIME_ASSERT_FUNCTION_SCOPE(CHANNELS == 1 || CHANNELS == 2);
    static_assert(CHANNELS == 1 || CHANNELS == 2, "CHANNELS must be 1 or 2");

    sP -= CHANNELS*((STRIDE>>1)-1);
    coefsP = (const int32_t*)__builtin_assume_aligned(coefsP, 16);
@@ -366,7 +366,7 @@ static inline void ProcessNeonIntrinsic(float* out,
        const float* coefsN1)
{
    ALOG_ASSERT(count > 0 && (count & 7) == 0); // multiple of 8
    COMPILE_TIME_ASSERT_FUNCTION_SCOPE(CHANNELS == 1 || CHANNELS == 2);
    static_assert(CHANNELS == 1 || CHANNELS == 2, "CHANNELS must be 1 or 2");

    sP -= CHANNELS*((STRIDE>>1)-1);
    coefsP = (const float*)__builtin_assume_aligned(coefsP, 16);
+1 −1
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ static inline void ProcessSSEIntrinsic(float* out,
        const float* coefsN1)
{
    ALOG_ASSERT(count > 0 && (count & 7) == 0); // multiple of 8
    COMPILE_TIME_ASSERT_FUNCTION_SCOPE(CHANNELS == 1 || CHANNELS == 2);
    static_assert(CHANNELS == 1 || CHANNELS == 2, "CHANNELS must be 1 or 2");

    sP -= CHANNELS*(4-1);   // adjust sP for a loop iteration of four

+1 −1
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ enum FastTrackUnderrunStatus {
// This packed representation is used to keep the information atomic.
union FastTrackUnderruns {
    FastTrackUnderruns() { mAtomic = 0;
            COMPILE_TIME_ASSERT_FUNCTION_SCOPE(sizeof(FastTrackUnderruns) == sizeof(uint32_t)); }
            static_assert(sizeof(FastTrackUnderruns) == sizeof(uint32_t), "FastTrackUnderrun"); }
    FastTrackUnderruns(const FastTrackUnderruns& copyFrom) : mAtomic(copyFrom.mAtomic) { }
    FastTrackUnderruns& operator=(const FastTrackUnderruns& rhs)
            { if (this != &rhs) mAtomic = rhs.mAtomic; return *this; }