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 );
出力 0 と出力 1 の違いについて、Halide からエラーが発生しました。
複数のオブジェクト ファイルではなく、1 つのコンパイル (compile_to_file) のみが必要であると想定しています。
ジェイ