Skip to content

Commit ce9d565

Browse files
committed
Fixing Formatting with Pre-commit
1 parent 5c4c627 commit ce9d565

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+117
-71
lines changed

p-isa_tools/program_mapper/README.md

Lines changed: 0 additions & 3 deletions

p-isa_tools/program_mapper/main.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// Copyright (C) 2023 Intel Corporation
1+
// Copyright (C) 2024 Intel Corporation
2+
// SPDX-License-Identifier: Apache-2.0
23

34
#include <algorithm>
45
#include <filesystem>
@@ -118,7 +119,7 @@ int main(int argc, char **argv)
118119

119120
pisa::ProgramMapper<DATA_TYPE> program_mapper;
120121
program_mapper.setArguments(arguments);
121-
program_mapper.generatePisaProgramFromHEProgam(program_trace);
122+
program_mapper.generatePisaProgramFromHEProgram(program_trace);
122123

123124
return 0;
124125
}

p-isa_tools/program_mapper/p_isa/pisa_graph_optimizer.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// Copyright (C) 2023 Intel Corporation
1+
// Copyright (C) 2024 Intel Corporation
2+
// SPDX-License-Identifier: Apache-2.0
23

34
#include "pisa_graph_optimizer.h"
45

@@ -102,7 +103,7 @@ void PISAGraphOptimizer::isolateGraphVariables(graph::Graph<pisa::PISAInstructio
102103
return;
103104
}
104105

105-
void PISAGraphOptimizer::applyDuplicateInputVariableSeperation(std::vector<pisa::PISAInstruction *> &instr_order)
106+
void PISAGraphOptimizer::applyDuplicateInputVariableSeparation(std::vector<pisa::PISAInstruction *> &instr_order)
106107
{
107108
std::vector<pisa::PISAInstruction *> newOrder;
108109
for (auto instr : instr_order)

p-isa_tools/program_mapper/p_isa/pisa_graph_optimizer.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// Copyright (C) 2023 Intel Corporation
1+
// Copyright (C) 2024 Intel Corporation
2+
// SPDX-License-Identifier: Apache-2.0
23

34
#pragma once
45

@@ -14,7 +15,7 @@ class PISAGraphOptimizer
1415

1516
void isolateGraphVariables(graph::Graph<pisa::PISAInstruction> &p_isa_graph, std::vector<std::vector<graph::NetworkNode<pisa::PISAInstruction>>> &layers);
1617

17-
void applyDuplicateInputVariableSeperation(std::vector<pisa::PISAInstruction *> &instr_order);
18+
void applyDuplicateInputVariableSeparation(std::vector<pisa::PISAInstruction *> &instr_order);
1819

1920
void nodeLocklist(graph::NetworkNode<pisa::PISAInstruction> &node, graph::Graph<pisa::PISAInstruction> &p_isa_graph);
2021
void nodeVariableAdjustment(graph::NetworkNode<pisa::PISAInstruction> &node, graph::Graph<pisa::PISAInstruction> &p_isa_graph);

p-isa_tools/program_mapper/p_isa/pisa_test_generator.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// Copyright (C) 2023 Intel Corporation
1+
// Copyright (C) 2024 Intel Corporation
2+
// SPDX-License-Identifier: Apache-2.0
23

34
#include "pisa_test_generator.h"
45
#include "functional_modeler/data_handlers/json_data_handler.h"

p-isa_tools/program_mapper/p_isa/pisa_test_generator.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// Copyright (C) 2023 Intel Corporation
1+
// Copyright (C) 2024 Intel Corporation
2+
// SPDX-License-Identifier: Apache-2.0
23

34
#pragma once
45

p-isa_tools/program_mapper/p_isa/pisakernel.cpp

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// Copyright (C) 2023 Intel Corporation
1+
// Copyright (C) 2024 Intel Corporation
2+
// SPDX-License-Identifier: Apache-2.0
23

34
#include <algorithm>
45
#include <filesystem>
@@ -36,9 +37,9 @@ inline std::string genKernInput(const pisa::poly::PolyOperation &op)
3637
// CONTEXT
3738
input << "CONTEXT " << toString(op.parentProgram()->scheme())
3839
<< " " << op.parentProgram()->getPolyModulusDegree()
39-
<< " " << op.parentProgram()->getKeyRns()
40+
<< " " << op.parentProgram()->getKeyRns()
4041
<< " " << op.getInputOperand(0).num_of_rns_terms
41-
<< "\n";
42+
<< "\n";
4243

4344
// DATA
4445
// NOTE: CipherDegree is tied to HEOperation not Operand
@@ -465,8 +466,8 @@ void pisa::kernel::PISAKernel::determineVariableNamingViaGraph()
465466
auto outputs = instruction_graph.getOutputNodes();
466467
auto immediates = instruction_graph.getInputNodes(false, true, false);
467468

468-
auto non_repeat_inputs = nonRepeatingRootsNode(inputs);
469-
auto non_repeat_outpus = nonRepeatingRootsNode(outputs);
469+
auto non_repeat_inputs = nonRepeatingRootsNode(inputs);
470+
auto non_repeat_outputs = nonRepeatingRootsNode(outputs);
470471
for (auto &input : non_repeat_inputs)
471472
{
472473
input_names.push_back(input);
@@ -482,15 +483,15 @@ void pisa::kernel::PISAKernel::determineVariableNamingViaGraph()
482483
// Attempt #2, just sort inputs if the label contains "input"
483484
// Leave the rest of the list alone
484485
// TODO: Generalize Function
485-
auto comp = [] (const std::string &a, const std::string &b) {
486+
auto comp = [](const std::string &a, const std::string &b) {
486487
if (containsString(a, "input") && containsString(b, "input"))
487-
return a < b;
488+
return a < b;
488489
else
489-
return false;
490+
return false;
490491
};
491492
std::sort(input_names.begin(), input_names.end(), comp);
492493

493-
for (auto &output : non_repeat_outpus)
494+
for (auto &output : non_repeat_outputs)
494495
{
495496
output_names.push_back(output);
496497
naming_map[output] = output;

p-isa_tools/program_mapper/p_isa/pisakernel.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
// Copyright (C) 2023 Intel Corporation
1+
// Copyright (C) 2024 Intel Corporation
2+
// SPDX-License-Identifier: Apache-2.0
23

34
#pragma once
45

56
#include <filesystem>
7+
#include <iostream>
68
#include <map>
79
#include <memory>
8-
#include <iostream>
910
#include <unordered_set>
1011

1112
#include <common/graph/graph.h>

p-isa_tools/program_mapper/p_isa/tests/pisa_instruction_tests.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// Copyright (C) 2023 Intel Corporation
1+
// Copyright (C) 2024 Intel Corporation
2+
// SPDX-License-Identifier: Apache-2.0
23

34
#pragma once
45

p-isa_tools/program_mapper/p_isa/tests/pisa_instruction_tests/add_instruction_test.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// Copyright (C) 2023 Intel Corporation
1+
// Copyright (C) 2024 Intel Corporation
2+
// SPDX-License-Identifier: Apache-2.0
23

34
#pragma once
45

0 commit comments

Comments
 (0)