Skip to content

Commit

Permalink
Rename MAYBE_UNUSED_ON_CLANG -> MAYBE_UNUSED_PRIVATE_FIELD
Browse files Browse the repository at this point in the history
  • Loading branch information
p-senichenkov committed Jan 9, 2025
1 parent 59c29b5 commit 59b43ea
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
20 changes: 10 additions & 10 deletions src/core/algorithms/fd/pyrocommon/model/pli_cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class ProfilingContext;
#include "cache_eviction_method.h"
#include "caching_method.h"
#include "model/table/column_layout_relation_data.h"
#include "util/maybe_unused_on_clang.h"
#include "util/maybe_unused_private_field.h"

namespace model {

Expand All @@ -30,23 +30,23 @@ class PLICache {
std::unique_ptr<VerticalMap<PositionListIndex>> index_;
// usageCounter - for parallelism

// All these MAYBE_UNUSED_ON_CLANG variables are required to support Pyro's caching strategies
// All these MAYBE_UNUSED_PRIVATE_FIELD variables are required to support Pyro's caching strategies
// from our ADBIS paper: https://link.springer.com/chapter/10.1007/978-3-030-30278-8_7

MAYBE_UNUSED_ON_CLANG int saved_intersections_ = 0;
MAYBE_UNUSED_PRIVATE_FIELD int saved_intersections_ = 0;

mutable std::mutex getting_pli_mutex_;

CachingMethod caching_method_;
MAYBE_UNUSED_ON_CLANG CacheEvictionMethod eviction_method_;
MAYBE_UNUSED_ON_CLANG double caching_method_value_;
MAYBE_UNUSED_PRIVATE_FIELD CacheEvictionMethod eviction_method_;
MAYBE_UNUSED_PRIVATE_FIELD double caching_method_value_;
// long long maximumAvailableMemory_ = 0;
double maximum_entropy_;
MAYBE_UNUSED_ON_CLANG double mean_entropy_;
MAYBE_UNUSED_ON_CLANG double min_entropy_;
MAYBE_UNUSED_ON_CLANG double median_entropy_;
MAYBE_UNUSED_ON_CLANG double median_gini_;
MAYBE_UNUSED_ON_CLANG double median_inverted_entropy_;
MAYBE_UNUSED_PRIVATE_FIELD double mean_entropy_;
MAYBE_UNUSED_PRIVATE_FIELD double min_entropy_;
MAYBE_UNUSED_PRIVATE_FIELD double median_entropy_;
MAYBE_UNUSED_PRIVATE_FIELD double median_gini_;
MAYBE_UNUSED_PRIVATE_FIELD double median_inverted_entropy_;

std::variant<PositionListIndex*, std::unique_ptr<PositionListIndex>> CachingProcess(
Vertical const& vertical, std::unique_ptr<PositionListIndex> pli,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// https://stackoverflow.com/questions/50646334/maybe-unused-on-member-variable-gcc-warns-incorrectly-that-attribute-is
// and https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72789)
#ifdef __clang__
#define MAYBE_UNUSED_ON_CLANG [[maybe_unused]]
#define MAYBE_UNUSED_PRIVATE_FIELD [[maybe_unused]]
#else
#define MAYBE_UNUSED_ON_CLANG /* Ignore */
#define MAYBE_UNUSED_PRIVATE_FIELD /* Ignore */
#endif

0 comments on commit 59b43ea

Please sign in to comment.