tensorflow/compiler/aot/codegen.cc
// Returns a list of C++ expressions that, when executed, will construct the
// BufferInfo instances in `buffer_infos`.
Returns a list of C++ expressions that, when executed, will construct the
BufferInfo instances in `buffer_infos`.
Returns a list of C ++ expressions that when executed will construct the BufferInfo instances in ` buffer_infos ` .
std::vector<string> BufferInfosToCppExpression(
    const std::vector<BufferInfo>& buffer_infos) {
  std::vector<string> buffer_infos_as_strings;
  std::transform(buffer_infos.begin(), buffer_infos.end(),
                 std::back_inserter(buffer_infos_as_strings),
                 [](const BufferInfo& buffer_info) {
                   std::pair<uint64, uint64> encoded = buffer_info.Encode();
                   string encoded_second_as_str =
                       encoded.second == ~0ULL
                           ? "~0ULL"
                           : absl::StrCat(encoded.second, "ULL");
                   return absl::StrCat(
                       "::xla::cpu_function_runtime::BufferInfo({",
                       encoded.first, "ULL, ", encoded_second_as_str, "})");
                 });
  return buffer_infos_as_strings;
}
std :: vector < string > BufferInfosToCppExpression ( const std :: vector < BufferInfo > & buffer_infos ) { std :: vector < string > buffer_infos_as_strings ; std :: transform ( buffer_infos . begin ( ) , buffer_infos . end ( ) , std :: back_inserter ( buffer_infos_as_strings ) , [ ] ( const BufferInfo & buffer_info ) { std :: pair < uint64 , uint64 > encoded = buffer_info . Encode ( ) ; string encoded_second_as_str = encoded . second == ~ 0ULL ? " " : absl :: StrCat ( encoded . second , " " ) ; return absl :: StrCat ( " " , encoded . first , " " , encoded_second_as_str , " " ) ; } ) ; return buffer_infos_as_strings ; }
Returns a list of C++ expressions that, when executed, will construct the
BufferInfo instances in `buffer_infos`.
Returns a list of C ++ expressions that when executed will construct the BufferInfo instances in ` buffer_infos ` .