mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-05-03 13:11:25 +00:00
Add interface GetTypeIdName() and GetTypeIdHashCode() for Device Op (#533)
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
|
||||
#include <cmath>
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
|
||||
#include "ck/stream_config.hpp"
|
||||
|
||||
@@ -46,6 +47,17 @@ struct BaseOperator
|
||||
virtual bool IsSupportedArgument(const BaseArgument*) { return false; }
|
||||
virtual std::string GetTypeString() const { return ""; }
|
||||
|
||||
virtual std::string GetTypeIdName() const { return typeid(*this).name(); }
|
||||
|
||||
virtual std::string GetTypeIdHashCode() const
|
||||
{
|
||||
std::ostringstream oss;
|
||||
|
||||
oss << std::hex << typeid(*this).hash_code();
|
||||
|
||||
return oss.str();
|
||||
};
|
||||
|
||||
virtual size_t GetWorkSpaceSize(const BaseArgument*) const { return 0; }
|
||||
|
||||
virtual void SetWorkSpacePointer(BaseArgument* p_arg, void* p_workspace) const
|
||||
|
||||
Reference in New Issue
Block a user