diff --git a/src/OpMult.hpp b/src/OpMult.hpp index 51012d937..28251c95b 100644 --- a/src/OpMult.hpp +++ b/src/OpMult.hpp @@ -1,3 +1,5 @@ +// Defining OPMULT_H to ensure cpp class doesn't reimport +#define OPMULT_H #pragma once #include @@ -48,3 +50,7 @@ class OpMult : public OpBase }; } // End namespace kp + +// Including implemenation for template class +#include "OpMult.tpp" + diff --git a/src/OpMult.cpp b/src/OpMult.tpp similarity index 97% rename from src/OpMult.cpp rename to src/OpMult.tpp index 7034f0afc..0980ed809 100644 --- a/src/OpMult.cpp +++ b/src/OpMult.tpp @@ -4,7 +4,13 @@ #include "Tensor.hpp" +// Only defining hpp file for syntax validation in editors +#ifndef OPMULT_H #include "OpMult.hpp" +#endif + +#ifndef OPMULT_CPP +#define OPMULT_CPP namespace kp { @@ -143,3 +149,6 @@ OpMult::postSubmit() } } + +#endif // #ifndef OPMULT_CPP + diff --git a/src/main.cpp b/src/main.cpp index 60c09a02c..07aebc90f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -646,7 +646,7 @@ main() spdlog::info("Tensor output: {}", tensorOutput->data()); spdlog::info("Calling op mult"); - mgr.evalOp({ tensorLHS, tensorRHS, tensorOutput }); + mgr.evalOp>({ tensorLHS, tensorRHS, tensorOutput }); spdlog::info("OpMult call success"); spdlog::info("Tensor output: {}", tensorOutput->data());