Skip to content

Commit

Permalink
Test.
Browse files Browse the repository at this point in the history
  • Loading branch information
abellgithub committed Mar 5, 2019
1 parent 17c7b73 commit 92cd199
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plugins/python/filters/PythonFilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@ PointViewSet PythonFilter::run(PointViewPtr view)
log()->get(LogLevel::Debug5) << "filters.python " << *m_script <<
" processing " << view->size() << " points." << std::endl;
m_pythonMethod->resetArguments();
std::cerr << "Reset arguments!\n";
m_pythonMethod->begin(*view, m_totalMetadata);
std::cerr << "Begin method!\n";

std::cerr << "Checking args!\n";
if (!m_pdalargs.empty())
Expand Down
5 changes: 5 additions & 0 deletions plugins/python/plang/Invocation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -363,18 +363,23 @@ void Invocation::begin(PointView& view, MetadataNode m)
PointLayoutPtr layout(view.m_pointTable.layout());
Dimension::IdList const& dims = layout->dims();

std::cerr << "About to loop dims!\n";
for (auto di = dims.begin(); di != dims.end(); ++di)
{
std::cerr << "Looping dim = " << layout->dimName(*di) << "!\n";
Dimension::Id d = *di;
const Dimension::Detail *dd = layout->dimDetail(d);
std::cerr << "Before malloc!\n";
void *data = malloc(dd->size() * view.size());
std::cerr << "After malloc!\n";
m_buffers.push_back(data); // Hold pointer for deallocation
char *p = (char *)data;
for (PointId idx = 0; idx < view.size(); ++idx)
{
view.getFieldInternal(d, idx, (void *)p);
p += dd->size();
}
std::cerr << "Done data fetch!\n";
std::string name = layout->dimName(*di);
insertArgument(name, (uint8_t *)data, dd->type(), view.size());
}
Expand Down

0 comments on commit 92cd199

Please sign in to comment.