add .clang-format
reformat all src
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
#include "src/Accelerators/PIM/Conversion/ONNXToSpatial/Utils/WeightSubdivider.hpp"
|
||||
#include <cassert>
|
||||
|
||||
#include "src/Accelerators/PIM/Conversion/ONNXToSpatial/Utils/WeightSubdivider.hpp"
|
||||
|
||||
namespace onnx_mlir {
|
||||
|
||||
WeightSubdivider::WeightSubdivider(
|
||||
map<long, map<long, SmallVector<Value>>> weights)
|
||||
: weights(std::move(weights)) {}
|
||||
WeightSubdivider::WeightSubdivider(map<long, map<long, SmallVector<Value>>> weights)
|
||||
: weights(std::move(weights)) {}
|
||||
|
||||
bool WeightSubdivider::isEmpty() const { return weights.empty(); }
|
||||
|
||||
@@ -13,7 +13,7 @@ TaggedWeights WeightSubdivider::popGroup(size_t amount) {
|
||||
assert(!weights.empty() && "No weights to extract.");
|
||||
|
||||
auto it = weights.begin();
|
||||
SmallVector<Value> &values = it->second.begin()->second;
|
||||
SmallVector<Value>& values = it->second.begin()->second;
|
||||
|
||||
long inputTile = it->first;
|
||||
long outputTile = it->second.begin()->first;
|
||||
@@ -26,11 +26,11 @@ TaggedWeights WeightSubdivider::popGroup(size_t amount) {
|
||||
|
||||
if (n < values.size()) {
|
||||
values.erase(values.begin(), values.begin() + n);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
it->second.erase(outputTile);
|
||||
if (it->second.empty()) {
|
||||
if (it->second.empty())
|
||||
weights.erase(inputTile);
|
||||
}
|
||||
}
|
||||
|
||||
return {inputTile, outputTile, crossbarsUsed - n, result};
|
||||
|
||||
Reference in New Issue
Block a user