2017-10-03 23:12:45 +00:00
|
|
|
//
|
|
|
|
// BitReverse.hpp
|
|
|
|
// Clock Signal
|
|
|
|
//
|
|
|
|
// Created by Thomas Harte on 03/10/2017.
|
2018-05-13 19:19:52 +00:00
|
|
|
// Copyright 2017 Thomas Harte. All rights reserved.
|
2017-10-03 23:12:45 +00:00
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef BitReverse_hpp
|
|
|
|
#define BitReverse_hpp
|
|
|
|
|
|
|
|
#include <cstdint>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
namespace Storage {
|
|
|
|
namespace Data {
|
|
|
|
namespace BitReverse {
|
|
|
|
|
|
|
|
/*!
|
2018-05-13 19:34:31 +00:00
|
|
|
Reverses the order of the bits in every byte of the vector:
|
2017-10-03 23:12:45 +00:00
|
|
|
bit 7 exchanges with bit 0, bit 6 exchanges with bit 1, 5 with 2,
|
|
|
|
and 4 with 3.
|
|
|
|
*/
|
|
|
|
void reverse(std::vector<uint8_t> &vector);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* BitReverse_hpp */
|