mirror of
https://github.com/aicodix/code.git
synced 2026-04-27 14:30:36 +00:00
time to embrace #pragma once
This commit is contained in:
parent
d196187187
commit
2944a44b28
17 changed files with 17 additions and 55 deletions
4
avx2.hh
4
avx2.hh
|
|
@ -4,8 +4,7 @@ Intel AVX2 acceleration
|
|||
Copyright 2018 Ahmet Inan <inan@aicodix.de>
|
||||
*/
|
||||
|
||||
#ifndef AVX2_HH
|
||||
#define AVX2_HH
|
||||
#pragma once
|
||||
|
||||
#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;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -4,8 +4,7 @@ Bit manipulation of byte arrays
|
|||
Copyright 2018 Ahmet Inan <inan@aicodix.de>
|
||||
*/
|
||||
|
||||
#ifndef BITMAN_HH
|
||||
#define BITMAN_HH
|
||||
#pragma once
|
||||
|
||||
namespace CODE {
|
||||
|
||||
|
|
@ -41,5 +40,3 @@ bool get_le_bit(const uint8_t *buf, int pos)
|
|||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -4,8 +4,7 @@ Bitwise stream container
|
|||
Copyright 2018 Ahmet Inan <inan@aicodix.de>
|
||||
*/
|
||||
|
||||
#ifndef BITSTREAM_HH
|
||||
#define BITSTREAM_HH
|
||||
#pragma once
|
||||
|
||||
namespace CODE {
|
||||
|
||||
|
|
@ -151,4 +150,3 @@ public:
|
|||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -4,8 +4,7 @@ Bose Chaudhuri Hocquenghem Decoder
|
|||
Copyright 2018 Ahmet Inan <inan@aicodix.de>
|
||||
*/
|
||||
|
||||
#ifndef BOSE_CHAUDHURI_HOCQUENGHEM_DECODER_HH
|
||||
#define BOSE_CHAUDHURI_HOCQUENGHEM_DECODER_HH
|
||||
#pragma once
|
||||
|
||||
#include "reed_solomon_error_correction.hh"
|
||||
#include "bitman.hh"
|
||||
|
|
@ -183,4 +182,3 @@ public:
|
|||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -4,8 +4,7 @@ Bose Chaudhuri Hocquenghem Encoder
|
|||
Copyright 2018 Ahmet Inan <inan@aicodix.de>
|
||||
*/
|
||||
|
||||
#ifndef BOSE_CHAUDHURI_HOCQUENGHEM_ENCODER_HH
|
||||
#define BOSE_CHAUDHURI_HOCQUENGHEM_ENCODER_HH
|
||||
#pragma once
|
||||
|
||||
#include <initializer_list>
|
||||
#include "bitman.hh"
|
||||
|
|
@ -151,4 +150,3 @@ public:
|
|||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
5
crc.hh
5
crc.hh
|
|
@ -4,8 +4,7 @@ Cyclic redundancy check
|
|||
Copyright 2018 Ahmet Inan <inan@aicodix.de>
|
||||
*/
|
||||
|
||||
#ifndef CRC_HH
|
||||
#define CRC_HH
|
||||
#pragma once
|
||||
|
||||
namespace CODE {
|
||||
|
||||
|
|
@ -84,5 +83,3 @@ uint8_t CRC<uint8_t>::operator()(uint8_t data)
|
|||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -4,8 +4,7 @@ Reduce N times while excluding ith input element
|
|||
Copyright 2018 Ahmet Inan <inan@aicodix.de>
|
||||
*/
|
||||
|
||||
#ifndef EXCLUSIVE_REDUCE_HH
|
||||
#define EXCLUSIVE_REDUCE_HH
|
||||
#pragma once
|
||||
|
||||
namespace CODE {
|
||||
|
||||
|
|
@ -28,5 +27,3 @@ void exclusive_reduce(const TYPE *in, TYPE *out, int N, OPERATOR op)
|
|||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -4,8 +4,7 @@ Galois field arithmetic
|
|||
Copyright 2018 Ahmet Inan <inan@aicodix.de>
|
||||
*/
|
||||
|
||||
#ifndef GALOIS_FIELD_HH
|
||||
#define GALOIS_FIELD_HH
|
||||
#pragma once
|
||||
|
||||
#include <cassert>
|
||||
|
||||
|
|
@ -301,4 +300,3 @@ private:
|
|||
};
|
||||
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -4,8 +4,7 @@ LDPC SISO layered decoder
|
|||
Copyright 2018 Ahmet Inan <inan@aicodix.de>
|
||||
*/
|
||||
|
||||
#ifndef LDPC_DECODER_HH
|
||||
#define LDPC_DECODER_HH
|
||||
#pragma once
|
||||
|
||||
#include <algorithm>
|
||||
#include "simd.hh"
|
||||
|
|
@ -287,4 +286,3 @@ public:
|
|||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -4,8 +4,7 @@ LDPC SISO encoder
|
|||
Copyright 2018 Ahmet Inan <inan@aicodix.de>
|
||||
*/
|
||||
|
||||
#ifndef LDPC_ENCODER_HH
|
||||
#define LDPC_ENCODER_HH
|
||||
#pragma once
|
||||
|
||||
namespace CODE {
|
||||
|
||||
|
|
@ -71,4 +70,3 @@ public:
|
|||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
4
neon.hh
4
neon.hh
|
|
@ -4,8 +4,7 @@ ARM NEON acceleration
|
|||
Copyright 2018 Ahmet Inan <inan@aicodix.de>
|
||||
*/
|
||||
|
||||
#ifndef NEON_HH
|
||||
#define NEON_HH
|
||||
#pragma once
|
||||
|
||||
#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;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -4,8 +4,7 @@ Reed Solomon Decoder
|
|||
Copyright 2018 Ahmet Inan <inan@aicodix.de>
|
||||
*/
|
||||
|
||||
#ifndef REED_SOLOMON_DECODER_HH
|
||||
#define REED_SOLOMON_DECODER_HH
|
||||
#pragma once
|
||||
|
||||
#include "reed_solomon_error_correction.hh"
|
||||
|
||||
|
|
@ -100,4 +99,3 @@ public:
|
|||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -4,8 +4,7 @@ Reed Solomon Encoder
|
|||
Copyright 2018 Ahmet Inan <inan@aicodix.de>
|
||||
*/
|
||||
|
||||
#ifndef REED_SOLOMON_ENCODER_HH
|
||||
#define REED_SOLOMON_ENCODER_HH
|
||||
#pragma once
|
||||
|
||||
namespace CODE {
|
||||
|
||||
|
|
@ -79,4 +78,3 @@ public:
|
|||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -4,8 +4,7 @@ Reed Solomon Error Correction
|
|||
Copyright 2018 Ahmet Inan <inan@aicodix.de>
|
||||
*/
|
||||
|
||||
#ifndef REED_SOLOMON_ERROR_CORRECTION_HH
|
||||
#define REED_SOLOMON_ERROR_CORRECTION_HH
|
||||
#pragma once
|
||||
|
||||
namespace CODE {
|
||||
namespace RS {
|
||||
|
|
@ -267,4 +266,3 @@ struct ReedSolomonErrorCorrection
|
|||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
4
simd.hh
4
simd.hh
|
|
@ -4,8 +4,7 @@ Single instruction, multiple data
|
|||
Copyright 2018 Ahmet Inan <inan@aicodix.de>
|
||||
*/
|
||||
|
||||
#ifndef SIMD_HH
|
||||
#define SIMD_HH
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#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
|
||||
|
|
|
|||
|
|
@ -4,8 +4,7 @@ Intel SSE4.1 acceleration
|
|||
Copyright 2018 Ahmet Inan <inan@aicodix.de>
|
||||
*/
|
||||
|
||||
#ifndef SSE4_1_HH
|
||||
#define SSE4_1_HH
|
||||
#pragma once
|
||||
|
||||
#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;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -4,8 +4,7 @@ Class of pseudorandom number generators, discovered by George Marsaglia
|
|||
Copyright 2018 Ahmet Inan <inan@aicodix.de>
|
||||
*/
|
||||
|
||||
#ifndef XORSHIFT_HH
|
||||
#define XORSHIFT_HH
|
||||
#pragma once
|
||||
|
||||
namespace CODE {
|
||||
|
||||
|
|
@ -148,5 +147,3 @@ public:
|
|||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue