Moved opmult to use tpp file

This commit is contained in:
Alejandro Saucedo 2020-08-22 15:02:47 +01:00
parent 7f38c1a519
commit 18fba90ec0
3 changed files with 16 additions and 1 deletions

View file

@ -1,3 +1,5 @@
// Defining OPMULT_H to ensure cpp class doesn't reimport
#define OPMULT_H
#pragma once
#include <vulkan/vulkan.h>
@ -48,3 +50,7 @@ class OpMult : public OpBase
};
} // End namespace kp
// Including implemenation for template class
#include "OpMult.tpp"

View file

@ -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<tX, tY, tZ>::postSubmit()
}
}
#endif // #ifndef OPMULT_CPP

View file

@ -646,7 +646,7 @@ main()
spdlog::info("Tensor output: {}", tensorOutput->data());
spdlog::info("Calling op mult");
mgr.evalOp<kp::OpMult>({ tensorLHS, tensorRHS, tensorOutput });
mgr.evalOp<kp::OpMult<>>({ tensorLHS, tensorRHS, tensorOutput });
spdlog::info("OpMult call success");
spdlog::info("Tensor output: {}", tensorOutput->data());