Skip to content

Commit

Permalink
[onert] Apply nested namespace in loader and odc directory (#14645)
Browse files Browse the repository at this point in the history
This commit applies nested namespace in loader and odc directory.

ONE-DCO-1.0-Signed-off-by: ragmani <[email protected]>
  • Loading branch information
ragmani authored Feb 13, 2025
1 parent 7497df9 commit 91df419
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 35 deletions.
7 changes: 2 additions & 5 deletions runtime/onert/loader/trix/TrixLoader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@
#include <npubinfmt.h>
#include <typedef.h>

namespace onert
{
namespace trix_loader
namespace onert::trix_loader
{

/**
Expand Down Expand Up @@ -253,8 +251,7 @@ std::unique_ptr<ir::Model> TrixLoader::loadFromFile(const std::string &file_path
return model;
}

} // namespace trix_loader
} // namespace onert
} // namespace onert::trix_loader

extern "C" {

Expand Down
7 changes: 2 additions & 5 deletions runtime/onert/odc/Embedder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,7 @@ float getNthPercentile(std::vector<float> &vector, float percentile)

} // namespace

namespace onert
{
namespace odc
namespace onert::odc
{

void Embedder::embed(luci::Module *module, const std::string &minmax_path,
Expand Down Expand Up @@ -126,5 +124,4 @@ void Embedder::embed(luci::Module *module, const std::string &minmax_path,
}
}

} // namespace odc
} // namespace onert
} // namespace onert::odc
7 changes: 2 additions & 5 deletions runtime/onert/odc/Embedder.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@

#include <string>

namespace onert
{
namespace odc
namespace onert::odc
{
struct EmbedderOptions
{
Expand All @@ -36,7 +34,6 @@ class Embedder
public:
void embed(luci::Module *module, const std::string &minmax_path, const EmbedderOptions &opt);
};
} // namespace odc
} // namespace onert
} // namespace onert::odc

#endif // __MINMAX_EMBEDDER_EMBEDDER_H__
7 changes: 2 additions & 5 deletions runtime/onert/odc/MinMaxReader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,7 @@ void checkHeader(FILE *file)

} // namespace

namespace onert
{
namespace odc
namespace onert::odc
{

MinMaxReader::MinMaxReader(const std::string &filepath) : _filepath(filepath)
Expand Down Expand Up @@ -254,5 +252,4 @@ uint32_t MinMaxReader::readNumRuns() const
return num_run;
}

} // namespace odc
} // namespace onert
} // namespace onert::odc
7 changes: 2 additions & 5 deletions runtime/onert/odc/MinMaxReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@
#include <string>
#include <vector>

namespace onert
{
namespace odc
namespace onert::odc
{

// File structure
Expand Down Expand Up @@ -83,7 +81,6 @@ class MinMaxReader
std::string _filepath;
};

} // namespace odc
} // namespace onert
} // namespace onert::odc

#endif // __ONERT_ODC_MINMAX_READER_H__
7 changes: 2 additions & 5 deletions runtime/onert/odc/Quantizer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@
extern "C" onert::odc::IQuantizer *create_quantizer() { return new onert::odc::Quantizer(); }
extern "C" void destroy_quantizer(onert::odc::IQuantizer *quantizer) { delete quantizer; }

namespace onert
{
namespace odc
namespace onert::odc
{

using QuantizerOptions = luci::CircleQuantizer::Options;
Expand Down Expand Up @@ -186,5 +184,4 @@ bool Quantizer::deleteMinMaxFile()
return false;
}

} // namespace odc
} // namespace onert
} // namespace onert::odc
7 changes: 2 additions & 5 deletions runtime/onert/odc/Quantizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@

#include "odc/IQuantizer.h"

namespace onert
{
namespace odc
namespace onert::odc
{

class Quantizer : public IQuantizer
Expand Down Expand Up @@ -56,7 +54,6 @@ class Quantizer : public IQuantizer
uint32_t _minmax_threshold = 0;
};

} // namespace odc
} // namespace onert
} // namespace onert::odc

#endif // __ONERT_ODC_QUANTIZE_H__

0 comments on commit 91df419

Please sign in to comment.