Skip to content

Commit e580498

Browse files
committed
sync to latest code
2 parents 1b39df9 + c764c33 commit e580498

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

include/utils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -986,7 +986,7 @@ inline void copy_aligned_data_from_file(const char *bin_file, T *&data, size_t &
986986
npts = (unsigned)npts_i32;
987987
dim = (unsigned)dim_i32;
988988

989-
if (dim != rounded_dim)
989+
if (rounded_dim != dim)
990990
{
991991
for (size_t i = 0; i < npts; i++)
992992
{

src/in_mem_static_graph_reformat.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@ std::tuple<uint32_t, uint32_t, size_t> InMemStaticGraphReformatStore::load_impl(
1212
size_t num_points;
1313
size_t file_offset = 0; // will need this for single file format support
1414

15-
size_t check_file_size = get_file_size(filename);
16-
1715
std::ifstream in;
1816
in.exceptions(std::ios::badbit | std::ios::failbit);
19-
in.open(filename, std::ios::binary);
17+
in.open(filename, std::ios::binary | std::ios::ate);
18+
// get file size
19+
size_t check_file_size = in.tellg();
20+
2021
in.seekg(file_offset, in.beg);
2122
in.read((char*)&expected_file_size, sizeof(size_t));
2223
in.read((char*)&_max_observed_degree, sizeof(uint32_t));

0 commit comments

Comments
 (0)