aboutsummaryrefslogtreecommitdiff
path: root/compute_kernel_writer/prototype/src/Kernel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'compute_kernel_writer/prototype/src/Kernel.cpp')
-rw-r--r--compute_kernel_writer/prototype/src/Kernel.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/compute_kernel_writer/prototype/src/Kernel.cpp b/compute_kernel_writer/prototype/src/Kernel.cpp
index 884b69afc6..095ac879f1 100644
--- a/compute_kernel_writer/prototype/src/Kernel.cpp
+++ b/compute_kernel_writer/prototype/src/Kernel.cpp
@@ -30,11 +30,17 @@
namespace ckw
{
+Kernel::Kernel(GpuTargetLanguage language)
+ : Kernel{"unnamed", language}
+{
+}
+
Kernel::Kernel(const char *name, GpuTargetLanguage language)
: _name(name), _kernel(std::make_unique<prototype::GpuKernelWriterDataHolder>(language)), _operands{}, _tensor_id_operands{}
{
}
+
Kernel::~Kernel()
{
}
@@ -44,6 +50,10 @@ const std::string &Kernel::name() const
return _name;
}
+void Kernel::name(const std::string& name)
+{
+ _name = name;
+}
std::vector<KernelArgument> Kernel::arguments() const
{
std::vector<KernelArgument> arguments;