Fix the cpp-format
This commit is contained in:
parent
161cafddfc
commit
b2f5b493c2
|
@ -5,6 +5,7 @@
|
||||||
|
|
||||||
/* Headers from vtrutil library */
|
/* Headers from vtrutil library */
|
||||||
#include "openfpga_decode.h"
|
#include "openfpga_decode.h"
|
||||||
|
|
||||||
#include "vtr_assert.h"
|
#include "vtr_assert.h"
|
||||||
|
|
||||||
/* begin namespace openfpga */
|
/* begin namespace openfpga */
|
||||||
|
@ -123,9 +124,10 @@ std::vector<size_t> itobin_vec(const size_t& in_int, const size_t& bin_len) {
|
||||||
std::vector<size_t> ret(bin_len, 0);
|
std::vector<size_t> ret(bin_len, 0);
|
||||||
|
|
||||||
/* Make sure we do not have any overflow! */
|
/* Make sure we do not have any overflow! */
|
||||||
/* If the length is 64 bits, in_int can be any number since this is the max bit length, and BTW pow(2, 64)
|
/* If the length is 64 bits, in_int can be any number since this is the max
|
||||||
itself should be zero (from 64bits size_t perspective). Once we fix the bintoi_charvec() bug, without
|
bit length, and BTW pow(2, 64) itself should be zero (from 64bits size_t
|
||||||
this change, it will cause assertion */
|
perspective). Once we fix the bintoi_charvec() bug, without this change, it
|
||||||
|
will cause assertion */
|
||||||
if (bin_len < 64) {
|
if (bin_len < 64) {
|
||||||
VTR_ASSERT(in_int < (size_t(1) << bin_len));
|
VTR_ASSERT(in_int < (size_t(1) << bin_len));
|
||||||
}
|
}
|
||||||
|
@ -159,9 +161,10 @@ std::vector<char> itobin_charvec(const size_t& in_int, const size_t& bin_len) {
|
||||||
std::vector<char> ret(bin_len, '0');
|
std::vector<char> ret(bin_len, '0');
|
||||||
|
|
||||||
/* Make sure we do not have any overflow! */
|
/* Make sure we do not have any overflow! */
|
||||||
/* If the length is 64 bits, in_int can be any number since this is the max bit length, and BTW pow(2, 64)
|
/* If the length is 64 bits, in_int can be any number since this is the max
|
||||||
itself should be zero (from 64bits size_t perspective). Once we fix the bintoi_charvec() bug, without
|
bit length, and BTW pow(2, 64) itself should be zero (from 64bits size_t
|
||||||
this change, it will cause assertion */
|
perspective). Once we fix the bintoi_charvec() bug, without this change, it
|
||||||
|
will cause assertion */
|
||||||
if (bin_len < 64) {
|
if (bin_len < 64) {
|
||||||
VTR_ASSERT(in_int < (size_t(1) << bin_len));
|
VTR_ASSERT(in_int < (size_t(1) << bin_len));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue