Skip to content

Commit

Permalink
make old port binding a wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
richardfixstars committed Aug 1, 2024
1 parent cd907b3 commit 4477056
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions include/ion/port.h
Original file line number Diff line number Diff line change
Expand Up @@ -181,16 +181,7 @@ class Port {

template<typename T>
void bind(T *v) {
auto i = index_ == -1 ? 0 : index_;

if (has_pred()) {
impl_->params[i] = Halide::Parameter{Halide::type_of<T>(), false, 0, argument_name(pred_id(), id(), pred_name(), i, graph_id())};
} else {
impl_->params[i] = Halide::Parameter{type(), false, dimensions(), argument_name(pred_id(), id(), pred_name(), i, graph_id())};
}

impl_->instances[i] = v;
impl_->bound_address[i] = std::make_tuple(v, false);
bind(Halide::type_of<T>(),v);
}

void bind(Halide::Type typ,void *v) {
Expand Down

0 comments on commit 4477056

Please sign in to comment.