time to embrace #pragma once

This commit is contained in:
Ahmet Inan 2020-08-05 10:43:49 +02:00
commit 2944a44b28
17 changed files with 17 additions and 55 deletions

View file

@ -4,8 +4,7 @@ Intel AVX2 acceleration
Copyright 2018 Ahmet Inan <inan@aicodix.de> Copyright 2018 Ahmet Inan <inan@aicodix.de>
*/ */
#ifndef AVX2_HH #pragma once
#define AVX2_HH
#include <immintrin.h> #include <immintrin.h>
@ -1135,4 +1134,3 @@ inline SIMD<int64_t, 4> vclamp(SIMD<int64_t, 4> x, int64_t a, int64_t b)
return tmp; return tmp;
} }
#endif

View file

@ -4,8 +4,7 @@ Bit manipulation of byte arrays
Copyright 2018 Ahmet Inan <inan@aicodix.de> Copyright 2018 Ahmet Inan <inan@aicodix.de>
*/ */
#ifndef BITMAN_HH #pragma once
#define BITMAN_HH
namespace CODE { namespace CODE {
@ -41,5 +40,3 @@ bool get_le_bit(const uint8_t *buf, int pos)
} }
#endif

View file

@ -4,8 +4,7 @@ Bitwise stream container
Copyright 2018 Ahmet Inan <inan@aicodix.de> Copyright 2018 Ahmet Inan <inan@aicodix.de>
*/ */
#ifndef BITSTREAM_HH #pragma once
#define BITSTREAM_HH
namespace CODE { namespace CODE {
@ -151,4 +150,3 @@ public:
} }
#endif

View file

@ -4,8 +4,7 @@ Bose Chaudhuri Hocquenghem Decoder
Copyright 2018 Ahmet Inan <inan@aicodix.de> Copyright 2018 Ahmet Inan <inan@aicodix.de>
*/ */
#ifndef BOSE_CHAUDHURI_HOCQUENGHEM_DECODER_HH #pragma once
#define BOSE_CHAUDHURI_HOCQUENGHEM_DECODER_HH
#include "reed_solomon_error_correction.hh" #include "reed_solomon_error_correction.hh"
#include "bitman.hh" #include "bitman.hh"
@ -183,4 +182,3 @@ public:
} }
#endif

View file

@ -4,8 +4,7 @@ Bose Chaudhuri Hocquenghem Encoder
Copyright 2018 Ahmet Inan <inan@aicodix.de> Copyright 2018 Ahmet Inan <inan@aicodix.de>
*/ */
#ifndef BOSE_CHAUDHURI_HOCQUENGHEM_ENCODER_HH #pragma once
#define BOSE_CHAUDHURI_HOCQUENGHEM_ENCODER_HH
#include <initializer_list> #include <initializer_list>
#include "bitman.hh" #include "bitman.hh"
@ -151,4 +150,3 @@ public:
} }
#endif

5
crc.hh
View file

@ -4,8 +4,7 @@ Cyclic redundancy check
Copyright 2018 Ahmet Inan <inan@aicodix.de> Copyright 2018 Ahmet Inan <inan@aicodix.de>
*/ */
#ifndef CRC_HH #pragma once
#define CRC_HH
namespace CODE { namespace CODE {
@ -84,5 +83,3 @@ uint8_t CRC<uint8_t>::operator()(uint8_t data)
} }
#endif

View file

@ -4,8 +4,7 @@ Reduce N times while excluding ith input element
Copyright 2018 Ahmet Inan <inan@aicodix.de> Copyright 2018 Ahmet Inan <inan@aicodix.de>
*/ */
#ifndef EXCLUSIVE_REDUCE_HH #pragma once
#define EXCLUSIVE_REDUCE_HH
namespace CODE { namespace CODE {
@ -28,5 +27,3 @@ void exclusive_reduce(const TYPE *in, TYPE *out, int N, OPERATOR op)
} }
#endif

View file

@ -4,8 +4,7 @@ Galois field arithmetic
Copyright 2018 Ahmet Inan <inan@aicodix.de> Copyright 2018 Ahmet Inan <inan@aicodix.de>
*/ */
#ifndef GALOIS_FIELD_HH #pragma once
#define GALOIS_FIELD_HH
#include <cassert> #include <cassert>
@ -301,4 +300,3 @@ private:
}; };
} }
#endif

View file

@ -4,8 +4,7 @@ LDPC SISO layered decoder
Copyright 2018 Ahmet Inan <inan@aicodix.de> Copyright 2018 Ahmet Inan <inan@aicodix.de>
*/ */
#ifndef LDPC_DECODER_HH #pragma once
#define LDPC_DECODER_HH
#include <algorithm> #include <algorithm>
#include "simd.hh" #include "simd.hh"
@ -287,4 +286,3 @@ public:
} }
#endif

View file

@ -4,8 +4,7 @@ LDPC SISO encoder
Copyright 2018 Ahmet Inan <inan@aicodix.de> Copyright 2018 Ahmet Inan <inan@aicodix.de>
*/ */
#ifndef LDPC_ENCODER_HH #pragma once
#define LDPC_ENCODER_HH
namespace CODE { namespace CODE {
@ -71,4 +70,3 @@ public:
} }
#endif

View file

@ -4,8 +4,7 @@ ARM NEON acceleration
Copyright 2018 Ahmet Inan <inan@aicodix.de> Copyright 2018 Ahmet Inan <inan@aicodix.de>
*/ */
#ifndef NEON_HH #pragma once
#define NEON_HH
#include <arm_neon.h> #include <arm_neon.h>
@ -939,4 +938,3 @@ inline SIMD<int32_t, 4> vclamp(SIMD<int32_t, 4> x, int32_t a, int32_t b)
return tmp; return tmp;
} }
#endif

View file

@ -4,8 +4,7 @@ Reed Solomon Decoder
Copyright 2018 Ahmet Inan <inan@aicodix.de> Copyright 2018 Ahmet Inan <inan@aicodix.de>
*/ */
#ifndef REED_SOLOMON_DECODER_HH #pragma once
#define REED_SOLOMON_DECODER_HH
#include "reed_solomon_error_correction.hh" #include "reed_solomon_error_correction.hh"
@ -100,4 +99,3 @@ public:
} }
#endif

View file

@ -4,8 +4,7 @@ Reed Solomon Encoder
Copyright 2018 Ahmet Inan <inan@aicodix.de> Copyright 2018 Ahmet Inan <inan@aicodix.de>
*/ */
#ifndef REED_SOLOMON_ENCODER_HH #pragma once
#define REED_SOLOMON_ENCODER_HH
namespace CODE { namespace CODE {
@ -79,4 +78,3 @@ public:
} }
#endif

View file

@ -4,8 +4,7 @@ Reed Solomon Error Correction
Copyright 2018 Ahmet Inan <inan@aicodix.de> Copyright 2018 Ahmet Inan <inan@aicodix.de>
*/ */
#ifndef REED_SOLOMON_ERROR_CORRECTION_HH #pragma once
#define REED_SOLOMON_ERROR_CORRECTION_HH
namespace CODE { namespace CODE {
namespace RS { namespace RS {
@ -267,4 +266,3 @@ struct ReedSolomonErrorCorrection
} }
#endif

View file

@ -4,8 +4,7 @@ Single instruction, multiple data
Copyright 2018 Ahmet Inan <inan@aicodix.de> Copyright 2018 Ahmet Inan <inan@aicodix.de>
*/ */
#ifndef SIMD_HH #pragma once
#define SIMD_HH
#include <cstdint> #include <cstdint>
#include <cstdlib> #include <cstdlib>
@ -1402,4 +1401,3 @@ static inline SIMD<int64_t, WIDTH> vsign(SIMD<int64_t, WIDTH> a, SIMD<int64_t, W
#endif #endif
#endif #endif
#endif

View file

@ -4,8 +4,7 @@ Intel SSE4.1 acceleration
Copyright 2018 Ahmet Inan <inan@aicodix.de> Copyright 2018 Ahmet Inan <inan@aicodix.de>
*/ */
#ifndef SSE4_1_HH #pragma once
#define SSE4_1_HH
#include <smmintrin.h> #include <smmintrin.h>
@ -1128,4 +1127,3 @@ inline SIMD<int32_t, 4> vclamp(SIMD<int32_t, 4> x, int32_t a, int32_t b)
return tmp; return tmp;
} }
#endif

View file

@ -4,8 +4,7 @@ Class of pseudorandom number generators, discovered by George Marsaglia
Copyright 2018 Ahmet Inan <inan@aicodix.de> Copyright 2018 Ahmet Inan <inan@aicodix.de>
*/ */
#ifndef XORSHIFT_HH #pragma once
#define XORSHIFT_HH
namespace CODE { namespace CODE {
@ -148,5 +147,3 @@ public:
} }
#endif