diff options
author | ReinUsesLisp <[email protected]> | 2019-03-11 03:26:21 -0300 |
---|---|---|
committer | ReinUsesLisp <[email protected]> | 2019-03-11 03:26:21 -0300 |
commit | 73595f45889f7bb7adfa6bd946eadc7348f31f4b (patch) | |
tree | 8968bb36befafed14ccf9079f48ba5dfc3077198 /src/sirit.cpp | |
parent | 38838c9a9df4e5b4bbf420bbe511cddbc5c5a2f4 (diff) | |
download | sirit-73595f45889f7bb7adfa6bd946eadc7348f31f4b.tar.gz sirit-73595f45889f7bb7adfa6bd946eadc7348f31f4b.zip |
Change clang-format settings
Diffstat (limited to 'src/sirit.cpp')
-rw-r--r-- | src/sirit.cpp | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/src/sirit.cpp b/src/sirit.cpp index 9112a80..84e752b 100644 --- a/src/sirit.cpp +++ b/src/sirit.cpp @@ -4,16 +4,17 @@ * Lesser General Public License version 3 or any later version. */ -#include "sirit/sirit.h" +#include <algorithm> +#include <cassert> #include "common_types.h" #include "op.h" +#include "sirit/sirit.h" #include "stream.h" -#include <algorithm> -#include <cassert> namespace Sirit { -template <typename T> static void WriteSet(Stream& stream, const T& set) { +template <typename T> +static void WriteSet(Stream& stream, const T& set) { for (const auto& item : set) { item->Write(stream); } @@ -73,15 +74,13 @@ void Module::AddCapability(spv::Capability capability) { capabilities.insert(capability); } -void Module::SetMemoryModel(spv::AddressingModel addressing_model, - spv::MemoryModel memory_model) { +void Module::SetMemoryModel(spv::AddressingModel addressing_model, spv::MemoryModel memory_model) { this->addressing_model = addressing_model; this->memory_model = memory_model; } void Module::AddEntryPoint(spv::ExecutionModel execution_model, Id entry_point, - const std::string& name, - const std::vector<Id>& interfaces) { + const std::string& name, const std::vector<Id>& interfaces) { auto op{std::make_unique<Op>(spv::Op::OpEntryPoint)}; op->Add(static_cast<u32>(execution_model)); op->Add(entry_point); @@ -91,7 +90,7 @@ void Module::AddEntryPoint(spv::ExecutionModel execution_model, Id entry_point, } void Module::AddExecutionMode(Id entry_point, spv::ExecutionMode mode, - const std::vector<Literal>& literals) { + const std::vector<Literal>& literals) { auto op{std::make_unique<Op>(spv::Op::OpExecutionMode)}; op->Add(entry_point); op->Add(static_cast<u32>(mode)); @@ -121,9 +120,8 @@ Id Module::AddCode(spv::Op opcode, std::optional<u32> id) { } Id Module::AddDeclaration(std::unique_ptr<Op> op) { - const auto& found{ - std::find_if(declarations.begin(), declarations.end(), - [&op](const auto& other) { return *other == *op; })}; + const auto& found{std::find_if(declarations.begin(), declarations.end(), + [&op](const auto& other) { return *other == *op; })}; if (found != declarations.end()) { return found->get(); } |