Skip to content

Commit

Permalink
Adding correct #ifdef EXEC_ENV_OLS blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
gopal-msr committed Jun 20, 2024
1 parent e94b9a8 commit 07f21f3
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
4 changes: 3 additions & 1 deletion include/abstract_data_store.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ template <typename data_t> class AbstractDataStore

// Return number of points returned
virtual location_t load(const std::string &filename, size_t offset) = 0;
//virtual location_t load(AlignedFileReader &reader, size_t offset) = 0;
#ifdef EXEC_ENV_OLS
virtual location_t load(AlignedFileReader &reader, size_t offset) = 0;
#endif

// Why does store take num_pts? Since store only has capacity, but we allow
// resizing we can end up in a situation where the store has spare capacity.
Expand Down
4 changes: 3 additions & 1 deletion include/in_mem_data_store.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ template <typename data_t> class InMemDataStore : public AbstractDataStore<data_
virtual ~InMemDataStore();

virtual location_t load(const std::string &filename, size_t offset = 0) override;
//virtual location_t load(AlignedFileReader &reader, size_t offset = 0) override;
#ifdef EXEC_ENV_OLS
virtual location_t load(AlignedFileReader &reader, size_t offset = 0) override;
#endif
virtual size_t save(const std::string &filename, const location_t num_pts) override;
virtual size_t save(std::ofstream &writer, const location_t num_pts, size_t offset) override;

Expand Down
4 changes: 3 additions & 1 deletion include/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ typedef int FileHandle;

#ifdef EXEC_ENV_OLS
#include "content_buf.h"
#include "memory_mapper.h"
//#include "memory_mapper.h"
//This file is supplied by DLVS team.
#include "memory_mapped_files.h"
#endif

// taken from
Expand Down
10 changes: 5 additions & 5 deletions src/in_mem_data_store.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ template <typename data_t> location_t InMemDataStore<data_t>::load(const std::st
return load_impl(filename, offset);
}

//template <typename data_t> location_t InMemDataStore<data_t>::load(AlignedFileReader &reader, size_t offset)
//{
// return load_impl(reader, offset);
//}

#ifdef EXEC_ENV_OLS
template <typename data_t> location_t InMemDataStore<data_t>::load(AlignedFileReader &reader, size_t offset)
{
return load_impl(reader, offset);
}

template <typename data_t> location_t InMemDataStore<data_t>::load_impl(AlignedFileReader &reader, size_t offset)
{
size_t file_dim, file_num_points;
Expand Down

0 comments on commit 07f21f3

Please sign in to comment.