tensorflow/compiler/mlir/hlo/python/MlirHloModule.cpp
// Returns a vector containing integers extracted from an attribute using the
// two provided callbacks.
Returns a vector containing integers extracted from an attribute using the
two provided callbacks.
Returns a vector containing integers extracted from an attribute using the two provided callbacks .
std::vector<int64_t> attributePropertyVector(
    MlirAttribute attr, llvm::function_ref<intptr_t(MlirAttribute)> sizeFn,
    llvm::function_ref<int64_t(MlirAttribute, intptr_t)> getFn) {
  std::vector<int64_t> result;
  intptr_t size = sizeFn(attr);
  result.reserve(size);
  for (intptr_t i = 0; i < size; ++i) {
    result.push_back(getFn(attr, i));
  }
  return result;
}
std :: vector < int64_t > attributePropertyVector ( MlirAttribute attr , llvm :: function_ref < intptr_t ( MlirAttribute ) > sizeFn , llvm :: function_ref < int64_t ( MlirAttribute , intptr_t ) > getFn ) { std :: vector < int64_t > result ; intptr_t size = sizeFn ( attr ) ; result . reserve ( size ) ; for ( intptr_t i = 0 ; i < size ; ++ i ) { result . push_back ( getFn ( attr , i ) ) ; } return result ; }
Returns a vector containing integers extracted from an attribute using the
two provided callbacks.
Returns a vector containing integers extracted from an attribute using the two provided callbacks .