Skip to content

Commit

Permalink
Allow compilation outside Visual Studio (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
MrPekar98 authored Jun 10, 2022
1 parent 0f3af04 commit 7f4cc98
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/core/alex_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -186,12 +186,12 @@ inline int get_offset(int word_id, uint64_t bit) {
/*** Cost model weights ***/

// Intra-node cost weights
double kExpSearchIterationsWeight = 20;
double kShiftsWeight = 0.5;
constexpr double kExpSearchIterationsWeight = 20;
constexpr double kShiftsWeight = 0.5;

// TraverseToLeaf cost weights
double kNodeLookupsWeight = 20;
double kModelSizeWeight = 5e-7;
constexpr double kNodeLookupsWeight = 20;
constexpr double kModelSizeWeight = 5e-7;

/*** Stat Accumulators ***/

Expand Down Expand Up @@ -385,7 +385,7 @@ class CPUID {
};

// https://en.wikipedia.org/wiki/CPUID#EAX=7,_ECX=0:_Extended_Features
bool cpu_supports_bmi() {
inline bool cpu_supports_bmi() {
return static_cast<bool>(CPUID(7, 0).EBX() & (1 << 3));
}
}
2 changes: 1 addition & 1 deletion src/core/alex_fanout_tree.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ struct FTNode {
/*** Helpers ***/

// Collect all used fanout tree nodes and sort them
void collect_used_nodes(const std::vector<std::vector<FTNode>>& fanout_tree,
inline void collect_used_nodes(const std::vector<std::vector<FTNode>>& fanout_tree,
int max_level,
std::vector<FTNode>& used_fanout_tree_nodes) {
max_level = std::min(max_level, static_cast<int>(fanout_tree.size()) - 1);
Expand Down

0 comments on commit 7f4cc98

Please sign in to comment.