我想使用Halide生成多个输出缓冲区。
Func output;
std::vector<Expr> argsExpr( 4 );
argsExpr[ 0 ] = aOut( x, y );
argsExpr[ 1 ] = bOut( x, y );
argsExpr[ 2 ] = cOut( x, y );
argsExpr[ 3 ] = dOut( x, y );
output( x, y ) = Tuple( argsExpr );这个示例运行得很好,但我想知道是否可以有多个输出,但大小不同,比如:
std::vector<Expr> argsExpr( 4 );
argsExpr[ 0 ] = aOut( x, y, c );
argsExpr[ 1 ] = bOut( x, y );
argsExpr[ 2 ] = cOut( x, y );
argsExpr[ 3 ] = dOut( x, y );
output( x, y, ? ) = Tuple( argsExpr );我从Halide得到了一个关于输出0和输出1之间的差异的错误。
我假设我只需要一个编译(compile_to_file),而不是多个目标文件。
杰伦
发布于 2014-08-14 04:30:24
目前,所有输出(实现的元素)必须具有相同数量的维度、最小值和范围。只有元素的类型可以改变。Andrew有一个取消这个限制的计划,但我不会在六到九个月内依赖它。
https://stackoverflow.com/questions/25295451
复制相似问题