Skip to content

Commit

Permalink
Add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-PLACET committed Sep 5, 2024
1 parent 38bca9c commit f283e68
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/sparrow/arrow_interface/arrow_flag_utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

namespace sparrow
{
/// Check that the given value is a valid ArrowFlag value.
constexpr bool is_valid_ArrowFlag_value(int64_t value) noexcept
{
constexpr std::array<ArrowFlag, 3> valid_values = {
Expand All @@ -32,6 +33,7 @@ namespace sparrow
);
}

/// Convert a bitfield of ArrowFlag values to a vector of ArrowFlag values.
constexpr std::vector<ArrowFlag> to_vector_of_ArrowFlags(int64_t flag_values)
{
constexpr size_t n_bits = sizeof(flag_values) * 8;
Expand All @@ -52,6 +54,7 @@ namespace sparrow
return flags;
}

/// Convert a vector of ArrowFlag values to a bitfield of ArrowFlag values.
constexpr int64_t to_ArrowFlag_value(const std::vector<ArrowFlag>& flags)
{
int64_t flag_values = 0;
Expand Down

0 comments on commit f283e68

Please sign in to comment.