Shuffling kernel/.

This commit is contained in:
Ben Vanik
2015-09-06 18:07:52 -07:00
parent 494cba7131
commit e5fbf840d2
118 changed files with 749 additions and 620 deletions

View File

@@ -15,10 +15,11 @@
#include "xenia/base/byte_order.h"
namespace xe {
BitStream::BitStream(uint8_t* buffer, size_t size_in_bits)
: buffer_(buffer), size_bits_(size_in_bits) {}
BitStream::~BitStream() {}
BitStream::~BitStream() = default;
void BitStream::SetOffset(size_t offset_bits) {
assert_false(offset_bits > size_bits_);
@@ -140,4 +141,4 @@ size_t BitStream::Copy(uint8_t* dest_buffer, size_t num_bits) {
void BitStream::Advance(size_t num_bits) { SetOffset(offset_bits_ + num_bits); }
} // namespace xe
} // namespace xe

View File

@@ -13,6 +13,7 @@
#include <cstdint>
namespace xe {
class BitStream {
public:
BitStream(uint8_t* buffer, size_t size_in_bits);
@@ -30,7 +31,7 @@ class BitStream {
// Note: num_bits MUST be in the range 0-57 (inclusive)
uint64_t Peek(size_t num_bits);
uint64_t Read(size_t num_bits);
bool Write(uint64_t val, size_t num_bits); // TODO: Not tested!
bool Write(uint64_t val, size_t num_bits); // TODO(DrChat): Not tested!
size_t Copy(uint8_t* dest_buffer, size_t num_bits);
@@ -39,6 +40,7 @@ class BitStream {
size_t offset_bits_ = 0;
size_t size_bits_ = 0;
};
} // namespace xe
#endif // XENIA_BASE_BIT_STREAM_H_
#endif // XENIA_BASE_BIT_STREAM_H_

View File

@@ -42,7 +42,7 @@ thread_local std::vector<char> log_format_buffer_(64 * 1024);
class Logger {
public:
Logger(const std::wstring& app_name)
explicit Logger(const std::wstring& app_name)
: ring_buffer_(buffer_, kBufferSize), running_(true) {
if (!FLAGS_log_file.empty()) {
auto file_path = xe::to_wstring(FLAGS_log_file.c_str());