Skip to content

Commit

Permalink
style: remove trailing blanks, keep final new line
Browse files Browse the repository at this point in the history
  • Loading branch information
kuron99 committed Jun 26, 2024
1 parent c849840 commit 9942140
Show file tree
Hide file tree
Showing 59 changed files with 159 additions and 159 deletions.
2 changes: 1 addition & 1 deletion bench/yakushima.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -439,4 +439,4 @@ int main(int argc, char* argv[]) {
invoke_leader();

return 0;
}
}
2 changes: 1 addition & 1 deletion build_tools/ubuntu.deps
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ libgflags-dev
libgoogle-glog-dev
libspdlog-dev
libtbb-dev
ninja-build
ninja-build
2 changes: 1 addition & 1 deletion cmake/FindTBB.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ if (TBB_FOUND)
endif ()
endif ()
unset(TBB_LIBRARY_FILE CACHE)
unset(TBB_INCLUDE_DIR CACHE)
unset(TBB_INCLUDE_DIR CACHE)
4 changes: 2 additions & 2 deletions include/base_node.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class base_node { // NOLINT

/**
* @brief Collect the memory usage of this partial tree.
*
*
* @param level the level of this node in the tree.
* @param mem_stat the stack of memory usage for each level.
*/
Expand Down Expand Up @@ -304,4 +304,4 @@ class base_node { // NOLINT
std::array<key_length_type, key_slice_length> key_length_{};
};

} // namespace yakushima
} // namespace yakushima
4 changes: 2 additions & 2 deletions include/border_node.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class alignas(CACHE_LINE_SIZE) border_node final : public base_node { // NOLINT
ti->get_gc_info().push_value_container(
{ti->get_begin_epoch(), v_ptr, v_len, v_align});
/**
* clear for preventing heap use after free by reference of
* clear for preventing heap use after free by reference of
* need_delete
*/
lv_.at(pos).init_lv();
Expand Down Expand Up @@ -221,7 +221,7 @@ class alignas(CACHE_LINE_SIZE) border_node final : public base_node { // NOLINT

/**
* @brief Collect the memory usage of this partial tree.
*
*
* @param level the level of this node in the tree.
* @param mem_stat the stack of memory usage for each level.
*/
Expand Down
2 changes: 1 addition & 1 deletion include/common_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,4 @@ find_border(base_node* const root, const key_slice_type key_slice,
return std::make_tuple(dynamic_cast<border_node*>(n), v);
}

} // namespace yakushima
} // namespace yakushima
2 changes: 1 addition & 1 deletion include/concurrent_queue.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ class concurrent_queue { // NOLINT : about constructor
// End : intel tbb
};

} // namespace yakushima
} // namespace yakushima
2 changes: 1 addition & 1 deletion include/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ namespace yakushima {

#endif

} // namespace yakushima
} // namespace yakushima
2 changes: 1 addition & 1 deletion include/destroy_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ class destroy_manager {
static inline std::atomic<std::size_t> destroy_threads_num_{0}; // NOLINT
};

} // namespace yakushima
} // namespace yakushima
2 changes: 1 addition & 1 deletion include/epoch.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ class epoch_management {
static inline std::atomic<Epoch> epoch_{1}; // NOLINT
};

} // namespace yakushima
} // namespace yakushima
2 changes: 1 addition & 1 deletion include/interface_destroy.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ namespace yakushima {
return status::OK_DESTROY_ALL;
}

} // namespace yakushima
} // namespace yakushima
2 changes: 1 addition & 1 deletion include/interface_display.h
Original file line number Diff line number Diff line change
Expand Up @@ -164,4 +164,4 @@ static void display_tree_instance(std::stringstream& ss, tree_instance* ti) {
yakushima_log_exit << "display";
}

} // namespace yakushima
} // namespace yakushima
2 changes: 1 addition & 1 deletion include/interface_get.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,4 @@ get(std::string_view storage_name, std::string_view key_view,
return get<ValueType>(ti, key_view, out, checked_version);
}

} // namespace yakushima
} // namespace yakushima
2 changes: 1 addition & 1 deletion include/interface_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ mem_usage(std::string_view storage_name) {
return mem_stat;
}

} // namespace yakushima
} // namespace yakushima
2 changes: 1 addition & 1 deletion include/interface_put.h
Original file line number Diff line number Diff line change
Expand Up @@ -275,4 +275,4 @@ put(Token token, std::string_view storage_name, // NOLINT
arg_value_length, created_value_ptr, value_align,
inserted_node_version_ptr);
}
} // namespace yakushima
} // namespace yakushima
8 changes: 4 additions & 4 deletions include/interface_remove.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ namespace yakushima {
if (target_border == nullptr) {
// TODO
/**
* This code path is not expected to be reached. However, sometimes
* this code path is reached. You may need to make appropriate use of
* This code path is not expected to be reached. However, sometimes
* this code path is reached. You may need to make appropriate use of
* compiler fences.
*/
goto retry_from_root; // NOLINT
Expand All @@ -95,7 +95,7 @@ namespace yakushima {
if (v_at_fetch_lv.get_vsplit() != v_at_fb.get_vsplit() ||
(v_at_fetch_lv.get_deleted() && !v_at_fetch_lv.get_root())) {
/**
* It may be change the correct border between atomically fetching border node
* It may be change the correct border between atomically fetching border node
* and atomically fetching lv.
*/
goto retry_from_root; // NOLINT
Expand Down Expand Up @@ -175,4 +175,4 @@ namespace yakushima {
return remove(token, ti, key_view);
}

} // namespace yakushima
} // namespace yakushima
2 changes: 1 addition & 1 deletion include/interface_scan.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,4 @@ scan(std::string_view storage_name, std::string_view l_key, // NOLINT
max_size);
}

} // namespace yakushima
} // namespace yakushima
2 changes: 1 addition & 1 deletion include/interior_node.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ class alignas(CACHE_LINE_SIZE) interior_node final // NOLINT

/**
* @brief Collect the memory usage of this partial tree.
*
*
* @param level the level of this node in the tree.
* @param mem_stat the stack of memory usage for each level.
*/
Expand Down
64 changes: 32 additions & 32 deletions include/kvs.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,15 +143,15 @@ list_storages(std::vector<std::pair<std::string, tree_instance*>>& out) {
* @param[in] key_view The key_view of key-value.
* @param[out] out The result about pointer to value and value size.
* The address obtained here can be accessed safely until the Token entered at the time of address acquisition leaves.
* @param[out] checked_version The version information at Status::WARN_NOT_EXIST.
* If you set non-nullptr, yakushima write there. If not, yakushima write nothing.
* This is for phantom avoidance. If transaction engine did point read and dind't find entry,
* @param[out] checked_version The version information at Status::WARN_NOT_EXIST.
* If you set non-nullptr, yakushima write there. If not, yakushima write nothing.
* This is for phantom avoidance. If transaction engine did point read and dind't find entry,
* it can't read verify but if there is a masstree node, it can do node verify.
* The address obtained here can be accessed safely until the Token entered at the time of address acquisition leaves.
* @return std::status::OK success
* @return status::WARN_NOT_EXIST The target storage of this operation exists,
* @return status::WARN_NOT_EXIST The target storage of this operation exists,
* but the target entry of the storage does not exist.
* @return status::WARN_STORAGE_NOT_EXIST The target storage of this operation
* @return status::WARN_STORAGE_NOT_EXIST The target storage of this operation
* does not exist.
*/
template<class ValueType>
Expand Down Expand Up @@ -183,15 +183,15 @@ get(std::string_view storage_name, // NOLINT
* static_cast<value_align_type>(alignof(ValueType)).
* @param[in] unique_restriction If this is true, you can't put same key. If you
* update key, you should execute remove and put.
* @param[out] inserted_node_version_ptr The pointer to version of the inserted
* node. It may be used to find out difference of the version between some
* @param[out] inserted_node_version_ptr The pointer to version of the inserted
* node. It may be used to find out difference of the version between some
* operations. Default is @a nullptr. If split occurs due to this insert, this
* point to old border node.
* The address obtained here can be accessed safely until the Token entered at the time of address acquisition leaves.
* @return status::OK success.
* @return status::WARN_UNIQUE_RESTRICTION The key-value whose key is same to given key
* already exists.
* @return status::WARN_STORAGE_NOT_EXIST The target storage of this operation
* @return status::WARN_STORAGE_NOT_EXIST The target storage of this operation
* does not exist.
*/
template<class ValueType>
Expand All @@ -209,9 +209,9 @@ put(Token token, std::string_view storage_name, // NOLINT
* @param[in] key_view The key_view of key-value.
* @return status::OK success
* @return status::OK_ROOT_IS_NULL No existing tree.
* @return status::OK_NOT_FOUND The target storage exists, but the target
* @return status::OK_NOT_FOUND The target storage exists, but the target
* entry does not exist.
* @return status::WARN_STORAGE_NOT_EXIST The target storage of this operation
* @return status::WARN_STORAGE_NOT_EXIST The target storage of this operation
* does not exist.
*/
[[maybe_unused]] static status remove(Token token, // NOLINT
Expand All @@ -224,45 +224,45 @@ put(Token token, std::string_view storage_name, // NOLINT
*/
/**
* @brief scan range between @a l_key and @a r_key.
* @tparam ValueType The returned pointer is cast to the given type information
* @tparam ValueType The returned pointer is cast to the given type information
* before it is returned.
* @param[in] l_key An argument that specifies the left endpoint.
* @param[in] l_end If this argument is scan_endpoint::EXCLUSIVE, the interval
* does not include the endpoint. If this argument is scan_endpoint::INCLUSIVE,
* the interval contains the endpoint. If this is scan_endpoint::INF, there is
* @param[in] l_end If this argument is scan_endpoint::EXCLUSIVE, the interval
* does not include the endpoint. If this argument is scan_endpoint::INCLUSIVE,
* the interval contains the endpoint. If this is scan_endpoint::INF, there is
* no limit on the interval in left direction. And ignore @a l_key.
* @param[in] r_key An argument that specifies the right endpoint.
* @note If r_key <l_key is specified in dictionary order, nothing will be hit.
* @param[in] r_end If this argument is scan_endpoint :: EXCLUSIVE, the
* interval does not include the endpoint. If this argument is
* scan_endpoint::INCLUSIVE, the interval contains the endpoint. If this is
* scan_endpoint::INF, there is no limit on the interval in right direction.
* @param[in] r_end If this argument is scan_endpoint :: EXCLUSIVE, the
* interval does not include the endpoint. If this argument is
* scan_endpoint::INCLUSIVE, the interval contains the endpoint. If this is
* scan_endpoint::INF, there is no limit on the interval in right direction.
* And ignore @a r_key.
* @param[out] tuple_list A set with a key, a pointer to value, and size of
* @param[out] tuple_list A set with a key, a pointer to value, and size of
* value as a result of this function.
* The address obtained here can be accessed safely until the Token entered at the time of address acquisition leaves.
* @param[out] node_version_vec Default is nullptr. The set of node_version for
* transaction processing (protection of phantom problems). If you don't use
* yakushima for transaction processing, you don't have to use this argument.
* If you want high performance and don't have to use this argument, you should
* specify nullptr. If this argument is nullptr, it will not collect
* transaction processing (protection of phantom problems). If you don't use
* yakushima for transaction processing, you don't have to use this argument.
* If you want high performance and don't have to use this argument, you should
* specify nullptr. If this argument is nullptr, it will not collect
* node_version.
* The address obtained here can be accessed safely until the Token entered at the time of address acquisition leaves.
* @param [out] max_size Default is 0. If this argument is 0, it will not use
* this argument. This argument limits the number of results. If you later use
* node_version_vec to guarantee atomicity, you can split the atomic scan.
* Suppose you want to scan with A: C, assuming the order A <B <C. You can
* perform an atomic scan by scanning the range A: B, B: C and using
* node_version_vec to make sure the values ​​are not overwritten. This advantage
* is effective when the right end point is unknown but you want to scan to a
* @param [out] max_size Default is 0. If this argument is 0, it will not use
* this argument. This argument limits the number of results. If you later use
* node_version_vec to guarantee atomicity, you can split the atomic scan.
* Suppose you want to scan with A: C, assuming the order A <B <C. You can
* perform an atomic scan by scanning the range A: B, B: C and using
* node_version_vec to make sure the values ​​are not overwritten. This advantage
* is effective when the right end point is unknown but you want to scan to a
* specific value.
* @return Status::ERR_BAD_USAGE The arguments is invalid. In the case1: you use
* same l_key and r_key and one of the endpoint is exclusive. case2: one of the
* endpoint use null key but the string size is not zero like
* endpoint use null key but the string size is not zero like
* std::string_view{nullptr, non-zero-value}.
* @return status::OK success.
* @return Status::OK_ROOT_IS_NULL success and root is null.
* @return status::WARN_STORAGE_NOT_EXIST The target storage of this operation
* @return status::WARN_STORAGE_NOT_EXIST The target storage of this operation
* does not exist.
*/
template<class ValueType>
Expand Down
20 changes: 10 additions & 10 deletions include/link_or_value.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class link_or_value {

/**
* @brief Collect the memory usage of this record.
*
*
* @param[in] level The level of this node in the tree.
* @param[in,out] mem_stat The stack of memory usage for each level.
*/
Expand All @@ -91,10 +91,10 @@ class link_or_value {

/**
* @brief Get the root node of the next layer.
*
*
* Note that this function uses the atomic operation (i.e., load) for dealing with
* concurrent modifications.
*
*
* @retval The root node of the next layer if exists.
* @retval nullptr otherwise.
*/
Expand All @@ -106,10 +106,10 @@ class link_or_value {

/**
* @brief Get the value pointer.
*
*
* Note that this function uses the atomic operation (i.e., load) for dealing with
* concurrent modifications.
*
*
* @retval The pointer of the contained value if exists.
* @retval nullptr otherwise.
*/
Expand All @@ -121,11 +121,11 @@ class link_or_value {

/**
* @brief Initialize the payload to zero.
*
*
*/
void init_lv() { child_or_v_ = kValPtrFlag; }

/**
/**
* @details This is move process.
* @param nlv
*/
Expand Down Expand Up @@ -174,13 +174,13 @@ class link_or_value {
private:
/**
* @brief A flag for indicating that the next layer exists.
*
*
*/
static constexpr uintptr_t kChildFlag = 0b10UL << 62UL;

/**
* @brief A flag for indicating that the next layer exists.
*
*
*/
static constexpr uintptr_t kValPtrFlag = 0b01UL << 62UL;

Expand All @@ -194,4 +194,4 @@ class link_or_value {
uintptr_t child_or_v_{kValPtrFlag};
};

} // namespace yakushima
} // namespace yakushima
2 changes: 1 addition & 1 deletion include/log.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ static constexpr std::int32_t log_trace = 50;
#define yakushima_log_exit \
VLOG(log_trace) << std::boolalpha << log_location_prefix << "<--" // NOLINT

} // namespace yakushima
} // namespace yakushima
2 changes: 1 addition & 1 deletion include/manager_thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,4 @@ class epoch_manager {
static inline std::thread kGCThread; // NOLINT : can't become constexpr
};

} // namespace yakushima
} // namespace yakushima
2 changes: 1 addition & 1 deletion include/permutation.h
Original file line number Diff line number Diff line change
Expand Up @@ -237,4 +237,4 @@ class permutation {
std::atomic<std::uint64_t> body_;
};

} // namespace yakushima
} // namespace yakushima
Loading

0 comments on commit 9942140

Please sign in to comment.