Replies: 4 comments 4 replies
-
|
@pcanal, @gemmeren, @wwuoneway, @aolivier23, and @knoepfel met on April 9, 2026 to discuss next steps in preparation for Phlex v0.3.0 (and beyond). My summary of the meeting is below. A. For Phlex v0.3.0
B. After Phlex v0.3.0
|
Beta Was this translation helpful? Give feedback.
-
|
@pcanal, @marcpaterno, and @knoepfel met on May 6 to discuss what Phlex needs to provide. Summary of the meeting: Action items
Decisions
Side notes:
Questions:
|
Beta Was this translation helpful? Give feedback.
-
|
Here are my notes from the May 6 meeting.
|
Beta Was this translation helpful? Give feedback.
-
Preamble
Phlex source base class#include <memory>
#include <functional>
namespace phlex {
class source {
public:
// Each product_selector can correspond to one or more product families
virtual provider_bundles create_providers(product_selector const&) = 0;
virtual index_generator indices() = 0;
};
}Registering the FORM sourcenamespace {
class form_source : public phlex::source {
public:
explicit form_source(phlex::configuration const& config);
phlex::provider_bundles create_providers(phlex::product_selector const&) override;
phlex::index_generator indices() override;
private:
// ...
};
}
PHLEX_REGISTER_SOURCE(g, config)
{
return g.source<form_source>(config);
}The phlex::index_generator form_source::indices()
{
auto job_index = data_cell_index::job();
co_yield job_index;
// Only go over the runs in the file
for (unsigned int r : runs_in_my_file()) {
auto run_id = job_id->make_child("run", r);
co_yield run_id;
...
}
}We'll have to explore what that function should look like for more general cases. Registering the FORM driverThe FORM driver is registered by creating a driver function (e.g., void cells_to_process(phlex::data_cell_yielder const yield,
form_source const& form)
{
for (phlex::data_cell_index_ptr const& index : form.indices()) {
yield(index);
}
}
PHLEX_REGISTER_DRIVER(d)
{
return d.driver(cells_to_process);
}Registering the FORM driver with configuration optionsConfiguration parameters can be passed to the driver function by using a lambda expression (e.g.): void cells_to_process(phlex::data_cell_yielder const yield,
form_source const& form,
int const skip_every)
{
for (phlex::data_cell_index_ptr const& index : form.indices()) {
if (index.number() % skip_every == 0) {
continue;
}
yield(index);
}
}
PHLEX_REGISTER_DRIVER(d, config)
{
// By default, skip every 10th data-cell index
int const skip_every = config.get<int>("skip_every", 10);
return d.driver(
[skip_every](phlex::data_cell_yielder const yield, form_source const& form) {
cells_to_process(yield, form, skip_every);
});
} |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
This discussion serves as the central hub for discussing Phlex/FORM integration issues in preparation for Phlex v0.3.0.
Beta Was this translation helpful? Give feedback.
All reactions