Skip to content

Commit a6cc8c1

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent e954537 commit a6cc8c1

File tree

4 files changed

+25
-25
lines changed

4 files changed

+25
-25
lines changed

include/openPMD/IO/ADIOS/ADIOS2Auxiliary.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,13 +263,13 @@ namespace detail
263263
};
264264

265265
template <typename T>
266-
struct ToDatatypeHelper<std::vector<T> >
266+
struct ToDatatypeHelper<std::vector<T>>
267267
{
268268
static std::string type();
269269
};
270270

271271
template <typename T, size_t n>
272-
struct ToDatatypeHelper<std::array<T, n> >
272+
struct ToDatatypeHelper<std::array<T, n>>
273273
{
274274
static std::string type();
275275
};

src/IO/ADIOS/ADIOS2Auxiliary.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,15 @@ std::string ToDatatypeHelper<T>::type()
5151
}
5252

5353
template <typename T>
54-
std::string ToDatatypeHelper<std::vector<T> >::type()
54+
std::string ToDatatypeHelper<std::vector<T>>::type()
5555
{
5656
return
5757

5858
adios2::GetType<T>();
5959
}
6060

6161
template <typename T, size_t n>
62-
std::string ToDatatypeHelper<std::array<T, n> >::type()
62+
std::string ToDatatypeHelper<std::array<T, n>>::type()
6363
{
6464
return
6565

src/IO/ADIOS/ADIOS2IOHandler.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,10 @@ void ADIOS2IOHandlerImpl::init(json::TracingJSON cfg)
181181
m_schema = auxiliary::getEnvNum("OPENPMD2_ADIOS2_SCHEMA", m_schema);
182182
}
183183

184-
std::optional<std::vector<ADIOS2IOHandlerImpl::ParameterizedOperator> >
184+
std::optional<std::vector<ADIOS2IOHandlerImpl::ParameterizedOperator>>
185185
ADIOS2IOHandlerImpl::getOperators(json::TracingJSON cfg)
186186
{
187-
using ret_t = std::optional<std::vector<ParameterizedOperator> >;
187+
using ret_t = std::optional<std::vector<ParameterizedOperator>>;
188188
std::vector<ParameterizedOperator> res;
189189
if (!cfg.json().contains("dataset"))
190190
{
@@ -237,7 +237,7 @@ ADIOS2IOHandlerImpl::getOperators(json::TracingJSON cfg)
237237
return std::make_optional(std::move(res));
238238
}
239239

240-
std::optional<std::vector<ADIOS2IOHandlerImpl::ParameterizedOperator> >
240+
std::optional<std::vector<ADIOS2IOHandlerImpl::ParameterizedOperator>>
241241
ADIOS2IOHandlerImpl::getOperators()
242242
{
243243
return getOperators(m_config);
@@ -1875,7 +1875,7 @@ namespace detail
18751875
}
18761876

18771877
template <typename T>
1878-
void AttributeTypes<std::vector<T> >::createAttribute(
1878+
void AttributeTypes<std::vector<T>>::createAttribute(
18791879
adios2::IO &IO,
18801880
adios2::Engine &engine,
18811881
detail::BufferedAttributeWrite &params,
@@ -1898,7 +1898,7 @@ namespace detail
18981898
}
18991899

19001900
template <typename T>
1901-
void AttributeTypes<std::vector<T> >::readAttribute(
1901+
void AttributeTypes<std::vector<T>>::readAttribute(
19021902
detail::PreloadAdiosAttributes const &preloadedAttributes,
19031903
std::string name,
19041904
std::shared_ptr<Attribute::resource> resource)
@@ -1924,7 +1924,7 @@ namespace detail
19241924
}
19251925
}
19261926

1927-
void AttributeTypes<std::vector<std::string> >::createAttribute(
1927+
void AttributeTypes<std::vector<std::string>>::createAttribute(
19281928
adios2::IO &IO,
19291929
adios2::Engine &engine,
19301930
detail::BufferedAttributeWrite &params,
@@ -1969,7 +1969,7 @@ namespace detail
19691969
attr, params.bufferForVecString.data(), adios2::Mode::Deferred);
19701970
}
19711971

1972-
void AttributeTypes<std::vector<std::string> >::readAttribute(
1972+
void AttributeTypes<std::vector<std::string>>::readAttribute(
19731973
detail::PreloadAdiosAttributes const &preloadedAttributes,
19741974
std::string name,
19751975
std::shared_ptr<Attribute::resource> resource)
@@ -2082,7 +2082,7 @@ namespace detail
20822082
}
20832083

20842084
template <typename T, size_t n>
2085-
void AttributeTypes<std::array<T, n> >::createAttribute(
2085+
void AttributeTypes<std::array<T, n>>::createAttribute(
20862086
adios2::IO &IO,
20872087
adios2::Engine &engine,
20882088
detail::BufferedAttributeWrite &params,
@@ -2104,7 +2104,7 @@ namespace detail
21042104
}
21052105

21062106
template <typename T, size_t n>
2107-
void AttributeTypes<std::array<T, n> >::readAttribute(
2107+
void AttributeTypes<std::array<T, n>>::readAttribute(
21082108
detail::PreloadAdiosAttributes const &preloadedAttributes,
21092109
std::string name,
21102110
std::shared_ptr<Attribute::resource> resource)

src/IO/ADIOS/ADIOS2PreloadAttributes.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -200,18 +200,18 @@ void PreloadAdiosAttributes::preloadAttributes(
200200
{
201201
m_offsets.clear();
202202
std::map<ADIOS2Datatype, std::vector<std::string> > attributesByType;
203-
auto addAttribute = [&attributesByType](
204-
ADIOS2Datatype dt, std::string name) {
205-
constexpr size_t reserve = 10;
206-
auto it = attributesByType.find(dt);
207-
if (it == attributesByType.end())
208-
{
209-
it = attributesByType.emplace_hint(
210-
it, dt, std::vector<std::string>());
211-
it->second.reserve(reserve);
212-
}
213-
it->second.push_back(std::move(name));
214-
};
203+
auto addAttribute =
204+
[&attributesByType](ADIOS2Datatype dt, std::string name) {
205+
constexpr size_t reserve = 10;
206+
auto it = attributesByType.find(dt);
207+
if (it == attributesByType.end())
208+
{
209+
it = attributesByType.emplace_hint(
210+
it, dt, std::vector<std::string>());
211+
it->second.reserve(reserve);
212+
}
213+
it->second.push_back(std::move(name));
214+
};
215215
// PHASE 1: collect names of available attributes by ADIOS datatype
216216
for (auto &variable : IO.AvailableVariables())
217217
{

0 commit comments

Comments
 (0)