From: Aart Bik Date: Wed, 18 Dec 2019 21:23:56 +0000 (-0800) Subject: [VectorOps] Replace iostream with stdio in support lib for vector.print X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a1e84db66ee1dea2d7c1d57113a715c6856e4a1a;p=platform%2Fupstream%2Fllvm.git [VectorOps] Replace iostream with stdio in support lib for vector.print PiperOrigin-RevId: 286252829 --- diff --git a/mlir/test/mlir-cpu-runner/mlir_runner_utils.cpp b/mlir/test/mlir-cpu-runner/mlir_runner_utils.cpp index c2a4cf4..9ff97cf 100644 --- a/mlir/test/mlir-cpu-runner/mlir_runner_utils.cpp +++ b/mlir/test/mlir-cpu-runner/mlir_runner_utils.cpp @@ -22,6 +22,8 @@ #include "include/mlir_runner_utils.h" +#include + extern "C" void print_memref_vector_4x4xf32(StridedMemRefType, 2> *M) { impl::printMemRef(*M); @@ -68,9 +70,9 @@ extern "C" void print_memref_4d_f32(StridedMemRefType *M) { // By providing elementary printing methods only, this // library can remain fully unaware of low-level implementation // details of our vectors. -extern "C" void print_f32(float f) { std::cout << f; } -extern "C" void print_f64(double d) { std::cout << d; } -extern "C" void print_open() { std::cout << "( "; } -extern "C" void print_close() { std::cout << " )"; } -extern "C" void print_comma() { std::cout << ", "; } -extern "C" void print_newline() { std::cout << "\n"; } +extern "C" void print_f32(float f) { fprintf(stdout, "%g", f); } +extern "C" void print_f64(double d) { fprintf(stdout, "%lg", d); } +extern "C" void print_open() { fputs("( ", stdout); } +extern "C" void print_close() { fputs(" )", stdout); } +extern "C" void print_comma() { fputs(", ", stdout); } +extern "C" void print_newline() { fputc('\n', stdout); }