mirror of
https://github.com/revng/revng
synced 2026-06-21 14:07:57 +00:00
7d235f4fd0
Also do some basic cleanup: capitalize first letters, add `.` at the end of the sentences, and so on.
16 lines
455 B
C++
16 lines
455 B
C++
/// \file LayoutConversion.cpp
|
|
|
|
//
|
|
// This file is distributed under the MIT License. See LICENSE.md for details.
|
|
//
|
|
|
|
#include "InternalCompute.h"
|
|
|
|
LayoutContainer convertToLayout(const LayerContainer &Layers) {
|
|
LayoutContainer Result;
|
|
for (size_t Index = 0; Index < Layers.size(); ++Index)
|
|
for (size_t NodeIndex = 0; NodeIndex < Layers[Index].size(); ++NodeIndex)
|
|
Result[Layers[Index][NodeIndex]] = { Index, NodeIndex };
|
|
return Result;
|
|
}
|