@@ -94,7 +94,8 @@ bool SemaSYCL::isSyclType(QualType Ty, SYCLTypeAttr::SYCLType TypeName) {
94
94
95
95
static bool isSyclAccessorType (QualType Ty) {
96
96
return SemaSYCL::isSyclType (Ty, SYCLTypeAttr::accessor) ||
97
- SemaSYCL::isSyclType (Ty, SYCLTypeAttr::local_accessor);
97
+ SemaSYCL::isSyclType (Ty, SYCLTypeAttr::local_accessor) ||
98
+ SemaSYCL::isSyclType (Ty, SYCLTypeAttr::dynamic_local_accessor);
98
99
}
99
100
100
101
// FIXME: Accessor property lists should be modified to use compile-time
@@ -1152,7 +1153,8 @@ static QualType GetSYCLKernelObjectType(const FunctionDecl *KernelCaller) {
1152
1153
// / \return the target of given SYCL accessor type
1153
1154
static target getAccessTarget (QualType FieldTy,
1154
1155
const ClassTemplateSpecializationDecl *AccTy) {
1155
- if (SemaSYCL::isSyclType (FieldTy, SYCLTypeAttr::local_accessor))
1156
+ if (SemaSYCL::isSyclType (FieldTy, SYCLTypeAttr::local_accessor) ||
1157
+ SemaSYCL::isSyclType (FieldTy, SYCLTypeAttr::dynamic_local_accessor))
1156
1158
return local;
1157
1159
1158
1160
return static_cast <target>(
@@ -4815,7 +4817,15 @@ class SyclKernelIntHeaderCreator : public SyclKernelFieldHandler {
4815
4817
int Dims = static_cast <int >(
4816
4818
AccTy->getTemplateArgs ()[1 ].getAsIntegral ().getExtValue ());
4817
4819
int Info = getAccessTarget (FieldTy, AccTy) | (Dims << 11 );
4818
- Header.addParamDesc (SYCLIntegrationHeader::kind_accessor, Info,
4820
+
4821
+ SYCLIntegrationHeader::kernel_param_kind_t ParamKind =
4822
+ SYCLIntegrationHeader::kind_accessor;
4823
+
4824
+ if (SemaSYCL::isSyclType (FieldTy, SYCLTypeAttr::dynamic_local_accessor)) {
4825
+ ParamKind = SYCLIntegrationHeader::kind_dynamic_accessor;
4826
+ }
4827
+
4828
+ Header.addParamDesc (ParamKind, Info,
4819
4829
CurOffset +
4820
4830
offsetOf (RD, BC.getType ()->getAsCXXRecordDecl ()));
4821
4831
} else if (SemaSYCL::isSyclType (FieldTy, SYCLTypeAttr::work_group_memory)) {
@@ -4841,8 +4851,14 @@ class SyclKernelIntHeaderCreator : public SyclKernelFieldHandler {
4841
4851
AccTy->getTemplateArgs ()[1 ].getAsIntegral ().getExtValue ());
4842
4852
int Info = getAccessTarget (FieldTy, AccTy) | (Dims << 11 );
4843
4853
4844
- Header.addParamDesc (SYCLIntegrationHeader::kind_accessor, Info,
4845
- CurOffset + offsetOf (FD, FieldTy));
4854
+ SYCLIntegrationHeader::kernel_param_kind_t ParamKind =
4855
+ SYCLIntegrationHeader::kind_accessor;
4856
+
4857
+ if (SemaSYCL::isSyclType (FieldTy, SYCLTypeAttr::dynamic_local_accessor)) {
4858
+ ParamKind = SYCLIntegrationHeader::kind_dynamic_accessor;
4859
+ }
4860
+
4861
+ Header.addParamDesc (ParamKind, Info, CurOffset + offsetOf (FD, FieldTy));
4846
4862
} else if (SemaSYCL::isSyclType (FieldTy, SYCLTypeAttr::stream)) {
4847
4863
addParam (FD, FieldTy, SYCLIntegrationHeader::kind_stream);
4848
4864
} else if (SemaSYCL::isSyclType (FieldTy, SYCLTypeAttr::work_group_memory)) {
@@ -6025,6 +6041,7 @@ static const char *paramKind2Str(KernelParamKind K) {
6025
6041
CASE (pointer);
6026
6042
CASE (work_group_memory);
6027
6043
CASE (dynamic_work_group_memory);
6044
+ CASE (dynamic_accessor);
6028
6045
}
6029
6046
return " <ERROR>" ;
6030
6047
0 commit comments