Skip to content

Commit 2d0869c

Browse files
authored
Fix style issues (#1718)
1 parent af671e2 commit 2d0869c

File tree

1 file changed

+25
-27
lines changed

1 file changed

+25
-27
lines changed

sherpa-onnx/csrc/provider-config.h

+25-27
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77

88
#include <string>
99

10-
#include "sherpa-onnx/csrc/parse-options.h"
11-
#include "sherpa-onnx/csrc/macros.h"
1210
#include "onnxruntime_cxx_api.h" // NOLINT
11+
#include "sherpa-onnx/csrc/macros.h"
12+
#include "sherpa-onnx/csrc/parse-options.h"
1313

1414
namespace sherpa_onnx {
1515

@@ -40,25 +40,23 @@ struct TensorrtConfig {
4040

4141
TensorrtConfig() = default;
4242
TensorrtConfig(int64_t trt_max_workspace_size,
43-
int32_t trt_max_partition_iterations,
44-
int32_t trt_min_subgraph_size,
45-
bool trt_fp16_enable,
46-
bool trt_detailed_build_log,
47-
bool trt_engine_cache_enable,
48-
bool trt_timing_cache_enable,
49-
const std::string &trt_engine_cache_path,
50-
const std::string &trt_timing_cache_path,
51-
bool trt_dump_subgraphs)
43+
int32_t trt_max_partition_iterations,
44+
int32_t trt_min_subgraph_size, bool trt_fp16_enable,
45+
bool trt_detailed_build_log, bool trt_engine_cache_enable,
46+
bool trt_timing_cache_enable,
47+
const std::string &trt_engine_cache_path,
48+
const std::string &trt_timing_cache_path,
49+
bool trt_dump_subgraphs)
5250
: trt_max_workspace_size(trt_max_workspace_size),
53-
trt_max_partition_iterations(trt_max_partition_iterations),
54-
trt_min_subgraph_size(trt_min_subgraph_size),
55-
trt_fp16_enable(trt_fp16_enable),
56-
trt_detailed_build_log(trt_detailed_build_log),
57-
trt_engine_cache_enable(trt_engine_cache_enable),
58-
trt_timing_cache_enable(trt_timing_cache_enable),
59-
trt_engine_cache_path(trt_engine_cache_path),
60-
trt_timing_cache_path(trt_timing_cache_path),
61-
trt_dump_subgraphs(trt_dump_subgraphs) {}
51+
trt_max_partition_iterations(trt_max_partition_iterations),
52+
trt_min_subgraph_size(trt_min_subgraph_size),
53+
trt_fp16_enable(trt_fp16_enable),
54+
trt_detailed_build_log(trt_detailed_build_log),
55+
trt_engine_cache_enable(trt_engine_cache_enable),
56+
trt_timing_cache_enable(trt_timing_cache_enable),
57+
trt_engine_cache_path(trt_engine_cache_path),
58+
trt_timing_cache_path(trt_timing_cache_path),
59+
trt_dump_subgraphs(trt_dump_subgraphs) {}
6260

6361
void Register(ParseOptions *po);
6462
bool Validate() const;
@@ -74,15 +72,15 @@ struct ProviderConfig {
7472
// device only used for cuda and trt
7573

7674
ProviderConfig() = default;
77-
ProviderConfig(const std::string &provider,
78-
int32_t device)
75+
ProviderConfig(const std::string &provider, int32_t device)
7976
: provider(provider), device(device) {}
8077
ProviderConfig(const TensorrtConfig &trt_config,
81-
const CudaConfig &cuda_config,
82-
const std::string &provider,
83-
int32_t device)
84-
: trt_config(trt_config), cuda_config(cuda_config),
85-
provider(provider), device(device) {}
78+
const CudaConfig &cuda_config, const std::string &provider,
79+
int32_t device)
80+
: trt_config(trt_config),
81+
cuda_config(cuda_config),
82+
provider(provider),
83+
device(device) {}
8684

8785
void Register(ParseOptions *po);
8886
bool Validate() const;

0 commit comments

Comments
 (0)