SWDEV-484188 - Moving std::maps into struct const and into amd::Kernel class.
Change-Id: Ie4d5a64511412fdb498b045aaffb52c3a1286de6
This commit is contained in:
committed by
Karthik Jayaprakash
parent
4d0b815d06
commit
4ecd77df5e
@@ -334,7 +334,87 @@ class Kernel : public RuntimeObject {
|
||||
const std::string& name() const { return name_; }
|
||||
|
||||
virtual ObjectType objectType() const { return ObjectTypeKernel; }
|
||||
};
|
||||
|
||||
#if defined(USE_COMGR_LIBRARY)
|
||||
// Templated find function to retrieve the right value based on string
|
||||
template <typename V, typename T, size_t N>
|
||||
static V FindValue(const T (&structure)[N], const std::string& name);
|
||||
|
||||
// Templated find function to retrieve cl_int values.
|
||||
template <typename T, size_t N>
|
||||
static cl_int FindValue(const T (&structure)[N], const std::string& name);
|
||||
|
||||
struct ArgFieldMapType {
|
||||
const char* name;
|
||||
ArgField value;
|
||||
};
|
||||
|
||||
struct ArgValueKindType {
|
||||
const char* name;
|
||||
amd::KernelParameterDescriptor::Desc value;
|
||||
};
|
||||
|
||||
struct ArgAccQualType {
|
||||
const char* name;
|
||||
cl_kernel_arg_access_qualifier value;
|
||||
};
|
||||
|
||||
struct ArgAddrSpaceQualType {
|
||||
const char* name;
|
||||
cl_kernel_arg_address_qualifier value;
|
||||
};
|
||||
|
||||
struct AttrFieldMapType {
|
||||
const char* name;
|
||||
AttrField value;
|
||||
};
|
||||
|
||||
struct CodePropFieldMapType {
|
||||
const char* name;
|
||||
CodePropField value;
|
||||
};
|
||||
|
||||
struct ArgAccQualV3Type {
|
||||
const char* name;
|
||||
cl_kernel_arg_access_qualifier value;
|
||||
};
|
||||
|
||||
struct ArgAddrSpaceQualV3Type {
|
||||
const char* name;
|
||||
cl_kernel_arg_address_qualifier value;
|
||||
};
|
||||
|
||||
struct KernelFieldMapV3Type {
|
||||
const char* name;
|
||||
KernelField value;
|
||||
};
|
||||
|
||||
struct ArgValueKindV3Type {
|
||||
const char* name;
|
||||
amd::KernelParameterDescriptor::Desc value;
|
||||
};
|
||||
|
||||
struct ArgFieldMapV3Type {
|
||||
const char* name;
|
||||
ArgField value;
|
||||
};
|
||||
|
||||
// Static const structure initialization.
|
||||
static const ArgFieldMapType kArgFieldMap[];
|
||||
static const ArgValueKindType kArgValueKind[];
|
||||
static const ArgAccQualType kArgAccQual[];
|
||||
static const ArgAddrSpaceQualType kArgAddrSpaceQual[];
|
||||
static const AttrFieldMapType kAttrFieldMap[];
|
||||
static const CodePropFieldMapType kCodePropFieldMap[];
|
||||
|
||||
static const ArgAccQualV3Type kArgAccQualV3[];
|
||||
static const ArgAddrSpaceQualV3Type kArgAddrSpaceQualV3[];
|
||||
static const KernelFieldMapV3Type kKernelFieldMapV3[];
|
||||
static const ArgValueKindV3Type kArgValueKindV3[];
|
||||
static const ArgFieldMapV3Type kArgFieldMapV3[];
|
||||
#endif
|
||||
}; // defined(USE_COMGR_LIBRARY)
|
||||
|
||||
|
||||
/*! @}
|
||||
* @}
|
||||
|
||||
Reference in New Issue
Block a user