Public Member Functions | List of all members
cudf::test::structs_column_wrapper Class Reference

column_wrapper derived class for wrapping columns of structs. More...

#include <column_wrapper.hpp>

Inheritance diagram for cudf::test::structs_column_wrapper:
cudf::test::detail::column_wrapper

Public Member Functions

 structs_column_wrapper (std::vector< std::unique_ptr< cudf::column >> &&child_columns, std::vector< bool > const &validity={})
 Constructs a struct column from the specified list of pre-constructed child columns. More...
 
 structs_column_wrapper (std::initializer_list< std::reference_wrapper< detail::column_wrapper >> child_column_wrappers, std::vector< bool > const &validity={})
 Constructs a struct column from the list of column wrappers for child columns. More...
 
template<typename V >
 structs_column_wrapper (std::initializer_list< std::reference_wrapper< detail::column_wrapper >> child_column_wrappers, V validity_iter)
 Constructs a struct column from the list of column wrappers for child columns. More...
 
- Public Member Functions inherited from cudf::test::detail::column_wrapper
 operator column_view () const
 Implicit conversion operator to column_view. More...
 
 operator mutable_column_view ()
 Implicit conversion operator to mutable_column_view. More...
 
std::unique_ptr< cudf::columnrelease ()
 Releases internal unique_ptr to wrapped column. More...
 

Additional Inherited Members

- Protected Attributes inherited from cudf::test::detail::column_wrapper
std::unique_ptr< cudf::columnwrapped {}
 The wrapped column.
 

Detailed Description

column_wrapper derived class for wrapping columns of structs.

Definition at line 1821 of file column_wrapper.hpp.

Constructor & Destructor Documentation

◆ structs_column_wrapper() [1/3]

cudf::test::structs_column_wrapper::structs_column_wrapper ( std::vector< std::unique_ptr< cudf::column >> &&  child_columns,
std::vector< bool > const &  validity = {} 
)
inline

Constructs a struct column from the specified list of pre-constructed child columns.

The child columns are "adopted" by the struct column constructed here.

Example usage:

// The following constructs a column for struct< int, string >.
auto child_int_col = fixed_width_column_wrapper<int32_t>{ 1, 2, 3, 4, 5 }.release();
auto child_string_col = string_column_wrapper {"All", "the", "leaves", "are",
"brown"}.release();
std::vector<std::unique_ptr<column>> child_columns;
child_columns.push_back(std::move(child_int_col));
child_columns.push_back(std::move(child_string_col));
child_cols,
{1,0,1,0,1} // Validity.
};
auto struct_col {structs_col.release()};
structs_column_wrapper(std::vector< std::unique_ptr< cudf::column >> &&child_columns, std::vector< bool > const &validity={})
Constructs a struct column from the specified list of pre-constructed child columns.
Parameters
child_columnsThe vector of pre-constructed child columns
validityThe vector of bools representing the column validity values

Definition at line 1850 of file column_wrapper.hpp.

◆ structs_column_wrapper() [2/3]

cudf::test::structs_column_wrapper::structs_column_wrapper ( std::initializer_list< std::reference_wrapper< detail::column_wrapper >>  child_column_wrappers,
std::vector< bool > const &  validity = {} 
)
inline

Constructs a struct column from the list of column wrappers for child columns.

Example usage:

// The following constructs a column for struct< int, string >.
fixed_width_column_wrapper<int32_t> child_int_col_wrapper{ 1, 2, 3, 4, 5 };
string_column_wrapper child_string_col_wrapper {"All", "the", "leaves", "are", "brown"};
{child_int_col_wrapper, child_string_col_wrapper}
{1,0,1,0,1} // Validity.
};
auto struct_col {structs_col.release()};
Parameters
child_column_wrappersThe list of child column wrappers
validityThe vector of bools representing the column validity values

Definition at line 1876 of file column_wrapper.hpp.

◆ structs_column_wrapper() [3/3]

template<typename V >
cudf::test::structs_column_wrapper::structs_column_wrapper ( std::initializer_list< std::reference_wrapper< detail::column_wrapper >>  child_column_wrappers,
validity_iter 
)
inline

Constructs a struct column from the list of column wrappers for child columns.

Example usage:

// The following constructs a column for struct< int, string >.
fixed_width_column_wrapper<int32_t> child_int_col_wrapper{ 1, 2, 3, 4, 5 };
string_column_wrapper child_string_col_wrapper {"All", "the", "leaves", "are", "brown"};
{child_int_col_wrapper, child_string_col_wrapper}
cudf::detail::make_counting_transform_iterator(0, [](auto i){ return i%2; }) // Validity.
};
auto struct_col {structs_col.release()};
Parameters
child_column_wrappersThe list of child column wrappers
validity_iterIterator returning the per-row validity bool

Definition at line 1913 of file column_wrapper.hpp.


The documentation for this class was generated from the following file: