ion-kit 1.0.0 allows users to bind vector of buffer as follows:
C++
std::vector< int > buf_size = std::vector < int >{ width, height };
if (pixel_format == "RGB8"){
buf_size.push_back(3);
}
std::vector<Halide::Buffer<T>> output;
for (int i = 0; i < num_device; ++i){
output.push_back(Halide::Buffer<T>(buf_size));
}
n["output"].bind(output);
However, python version does not allow to bind (port-map) from multiple output in a single port to List of Buffers, so we have to do one by one as follows by accessing the index:
Python
# create halide buffer for output port
outputs = []
output_size = (width, height, )
if pixelformat == "RGB8":
output_size += (3,)
outputs.append(Buffer(Type(TypeCode.Uint, depth_of_buffer, 1), output_size))
# set I/O ports
output_p[0].bind(outputs[0])
We want to allow user to bind from multiple output to List of buffer.
bind
1. The type of Param Value along C++
ion-kit 1.0.0 takes
int
/boolean
/double
value for Params of BB, but Python binding takes only stringe.g.
C++
Python
We would like to make Python API look like:
Python
2. Allow Vector/List to
bind
ion-kit 1.0.0 allows users to
bind
vector of buffer as follows:C++
However, python version does not allow to bind (port-map) from multiple output in a single port to List of Buffers, so we have to do one by one as follows by accessing the index:
Python
We want to allow user to
bind
from multiple output to List of buffer.