1 #pragma once 2 3 #include <ostream> 4 #include <string> 5 6 #include <c10/core/Scalar.h> 7 #include <ATen/core/Tensor.h> 8 9 namespace c10 { 10 TORCH_API std::ostream& operator<<(std::ostream& out, Backend b); 11 TORCH_API std::ostream& operator<<(std::ostream & out, const Scalar& s); 12 TORCH_API std::string toString(const Scalar& s); 13 } 14 namespace at { 15 16 TORCH_API std::ostream& operator<<(std::ostream& out, const DeprecatedTypeProperties& t); 17 TORCH_API std::ostream& print( 18 std::ostream& stream, 19 const Tensor& tensor, 20 int64_t linesize); 21 inline std::ostream& operator<<(std::ostream & out, const Tensor & t) { 22 return print(out,t,80); 23 } 24 TORCH_API void print(const Tensor & t, int64_t linesize=80); 25 } 26