<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/62397>62397</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Declaring the same structure in anonymous spaces in two different files will result in an error in the link
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
4465464
</td>
</tr>
</table>
<pre>
The anonymous space in the first file has a structure valid_ table_ filter:
namespace {
// Returns true if the mask is true for index i in at least keep_threshold
// columns
struct valid_table_filter {
__device__ inline bool operator()(cudf::size_type i)
{
auto valid = [i](auto column_device_view) { return column_device_view.is_valid(i); };
auto count =
thrust::count_if(thrust::seq, keys_device_view.begin(), keys_device_view.end(), valid);
return (count >= keep_threshold);
}
valid_table_filter() = delete;
~valid_table_filter() = default;
valid_table_filter(cudf::table_device_view const& keys_device_view,
cudf::size_type keep_threshold)
: keep_threshold(keep_threshold), keys_device_view(keys_device_view)
{
}
protected:
cudf::size_type keep_threshold;
cudf::size_type num_columns;
cudf::table_device_view keys_device_view;
};
} // namespace
The anonymous space in the second file also has a struct valid_table_ filter:
namespace {
struct valid_table_filter {
__device__ inline bool operator()(cudf::size_type i)
{
auto valid = [i](auto col_device_view) {
return cudf::type_dispatcher(
col_device_view.type(), dispatch_is_not_nan{}, col_device_view, i);
};
auto count =
thrust::count_if(thrust::seq, keys_device_view.begin(), keys_device_view.end(), valid);
return (count >= keep_threshold);
}
valid_table_filter() = delete;
~valid_table_filter() = default;
valid_table_filter(cudf::table_device_view const& keys_device_view,
cudf::size_type keep_threshold)
: keep_threshold(keep_threshold), keys_device_view(keys_device_view)
{
}
protected:
cudf::size_type keep_threshold;
cudf::size_type num_columns;
cudf::table_device_view keys_device_view;
};
} // namespace
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzsVsuSqzYQ_Rp503VdjHgYFizs8fUHpLKnBGqMMkIieszEWeTb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