@@ -140,12 +140,13 @@ Model::Model(const std::string& graph_name,
140140 auto func_template_ptr = std::make_unique<FunctionTemplate>();
141141 func_template_ptr->op_schema_ = std::move (func_schema_ptr);
142142 func_template_ptr->onnx_func_proto_ = &func;
143- model_local_function_templates_maps_.insert_or_assign (function_utils::GetFunctionIdentifier (func.domain (), func.name ()),
143+ model_local_function_templates_maps_.insert_or_assign (function_utils::GetFunctionIdentifier (func.domain (),
144+ func.name ()),
144145 std::move (func_template_ptr));
145146 }
146147
147148 // need to call private ctor so can't use make_shared
148- GSL_SUPPRESS (r.11 )
149+ GSL_SUPPRESS (r .11 )
149150 graph_.reset (new Graph (*this , model_proto_.mutable_graph (), *p_domain_to_version, IrVersion (), schema_registry,
150151 logger, options.strict_shape_type_inference ));
151152}
@@ -269,11 +270,13 @@ Model::Model(ModelProto&& model_proto, const PathString& model_path,
269270 auto func_template_ptr = std::make_unique<FunctionTemplate>();
270271 func_template_ptr->op_schema_ = std::move (func_schema_ptr);
271272 func_template_ptr->onnx_func_proto_ = &func;
272- model_local_function_templates_maps_.insert_or_assign (function_utils::GetFunctionIdentifier (func.domain (), func.name ()), std::move (func_template_ptr));
273+ model_local_function_templates_maps_.insert_or_assign (function_utils::GetFunctionIdentifier (func.domain (),
274+ func.name ()),
275+ std::move (func_template_ptr));
273276 }
274277
275278 // create instance. need to call private ctor so can't use make_unique
276- GSL_SUPPRESS (r.11 )
279+ GSL_SUPPRESS (r .11 )
277280 graph_.reset (new Graph (*this , model_proto_.mutable_graph (), domain_to_version, IrVersion (), schema_registry,
278281 logger, options.strict_shape_type_inference ));
279282}
@@ -425,7 +428,7 @@ Status Model::Load(const ModelProto& model_proto,
425428 }
426429
427430 // need to call private ctor so can't use make_shared
428- GSL_SUPPRESS (r.11 )
431+ GSL_SUPPRESS (r .11 )
429432
430433 auto status = Status::OK ();
431434 ORT_TRY {
@@ -465,7 +468,7 @@ Status Model::Load(ModelProto&& model_proto,
465468 }
466469
467470 // need to call private ctor so can't use make_shared
468- GSL_SUPPRESS (r.11 )
471+ GSL_SUPPRESS (r .11 )
469472 auto status = Status::OK ();
470473 ORT_TRY {
471474 model = std::make_unique<Model>(std::move (model_proto), model_path, local_registries, logger, options);
@@ -512,7 +515,7 @@ static Status LoadModelHelper(const T& file_path, Loader loader) {
512515 }
513516
514517 if (!status.IsOK ()) {
515- GSL_SUPPRESS (es.84 )
518+ GSL_SUPPRESS (es .84 )
516519 ORT_IGNORE_RETURN_VALUE (Env::Default ().FileClose (fd));
517520 return status;
518521 }
@@ -554,7 +557,8 @@ static Status SaveModel(Model& model, const T& file_path) {
554557 const file_path = UTF8ToString ($2 );
555558 const bytes = new Uint8Array (buffer_size);
556559 bytes.set (HEAPU8.subarray (buffer, buffer + buffer_size));
557- if (typeof process == ' object' && typeof process.versions == ' object' && typeof process.versions .node == ' string' ) {
560+ if (typeof process == ' object' && typeof process.versions == ' object' &&
561+ typeof process.versions .node == ' string' ) {
558562 // Node.js
559563 require (' fs' ).writeFileSync (file_path, bytes);
560564 } else {
@@ -585,7 +589,7 @@ static Status SaveModel(Model& model, const T& file_path) {
585589 });
586590 }
587591 if (!status.IsOK ()) {
588- GSL_SUPPRESS (es.84 )
592+ GSL_SUPPRESS (es .84 )
589593 ORT_IGNORE_RETURN_VALUE (Env::Default ().FileClose (fd));
590594 return status;
591595 }
@@ -616,7 +620,7 @@ static Status SaveModelWithExternalInitializers(Model& model,
616620 });
617621 }
618622 if (!status.IsOK ()) {
619- GSL_SUPPRESS (es.84 )
623+ GSL_SUPPRESS (es .84 )
620624 ORT_IGNORE_RETURN_VALUE (Env::Default ().FileClose (fd));
621625 return status;
622626 }
@@ -628,8 +632,8 @@ Status Model::Load(const PathString& file_path,
628632 return LoadModel (file_path, model_proto);
629633}
630634
631- GSL_SUPPRESS (r.30 ) // spurious warnings. p_model is potentially reset in the internal call to Load
632- GSL_SUPPRESS(r.35 )
635+ GSL_SUPPRESS (r .30 ) // spurious warnings. p_model is potentially reset in the internal call to Load
636+ GSL_SUPPRESS(r .35 )
633637Status Model::Load(const PathString& file_path, std::shared_ptr<Model>& p_model,
634638 const IOnnxRuntimeOpSchemaRegistryList* local_registries,
635639 const logging::Logger& logger, const ModelOptions& options) {
@@ -762,7 +766,8 @@ Status Model::SaveWithExternalInitializers(Model& model,
762766
763767 ORT_RETURN_IF_ERROR (model.MainGraph ().Resolve ());
764768
765- auto model_proto = model.ToGraphProtoWithExternalInitializers (external_file_name, file_path, initializer_size_threshold);
769+ auto model_proto = model.ToGraphProtoWithExternalInitializers (external_file_name, file_path,
770+ initializer_size_threshold);
766771 google::protobuf::io::FileOutputStream output (fd);
767772 const bool result = model_proto.SerializeToZeroCopyStream (&output) && output.Flush ();
768773 if (result) {
0 commit comments