[PATCH]OpenCL event_t overloading

Benyei, Guy guy.benyei at intel.com
Wed Feb 6 12:09:59 PST 2013


Hi Joey,
You're right, the test should contain a zero event.

--- test/SemaOpenCL/event_t_overload.cl	(revision 0)
+++ test/SemaOpenCL/event_t_overload.cl	(revision 0)
@@ -0,0 +1,11 @@
+// RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only
+
+void __attribute__((overloadable)) foo(event_t, __local char *); // expected-note {{candidate function not viable: no known conversion from '__global int *' to '__local char *' for 2nd argument}}
+void __attribute__((overloadable)) foo(event_t, __local float *); // expected-note {{candidate function not viable: no known conversion from '__global int *' to '__local float *' for 2nd argument}}
+
+void kernel ker(__local char *src1, __local float *src2, __global int *src3) {
+  event_t evt;
+  foo(evt, src1);
+  foo(evt, src2);
+  foo(evt, src3); // expected-error {{no matching function for call to 'foo'}}
+}

should be fixed to

--- test/SemaOpenCL/event_t_overload.cl	(revision 0)
+++ test/SemaOpenCL/event_t_overload.cl	(revision 0)
@@ -0,0 +1,11 @@
+// RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only
+
+void __attribute__((overloadable)) foo(event_t, __local char *); // expected-note {{candidate function not viable: no known conversion from '__global int *' to '__local char *' for 2nd argument}}
+void __attribute__((overloadable)) foo(event_t, __local float *); // expected-note {{candidate function not viable: no known conversion from '__global int *' to '__local float *' for 2nd argument}}
+
+void kernel ker(__local char *src1, __local float *src2, __global int *src3) {
+  event_t evt;
+  foo(evt, src1);
+  foo(0, src2);
+  foo(evt, src3); // expected-error {{no matching function for call to 'foo'}}
+}

I'll change that. Are there any other comments, or should I go on and commit this change?

Thanks
    Guy Benyei

-----Original Message-----
From: Joey Gouly [mailto:joey.gouly at arm.com] 
Sent: Tuesday, February 05, 2013 16:38
To: Benyei, Guy; cfe-commits at cs.uiuc.edu
Subject: RE: [PATCH]OpenCL event_t overloading

Hi Guy,

The test doesn't match the code you've added? You added a test for overloading on event_t, but added code for 0 -> event_t conversion.

Thanks,
Joey 

From: cfe-commits-bounces at cs.uiuc.edu
[mailto:cfe-commits-bounces at cs.uiuc.edu] On Behalf Of Benyei, Guy
Sent: 05 February 2013 13:15
To: cfe-commits at cs.uiuc.edu
Subject: RE: [PATCH]OpenCL event_t overloading

Are there any comments on this patch?

Thanks
    Guy Benyei


From: cfe-commits-bounces at cs.uiuc.edu
[mailto:cfe-commits-bounces at cs.uiuc.edu] On Behalf Of Benyei, Guy
Sent: Tuesday, January 29, 2013 10:48
To: cfe-commits at cs.uiuc.edu
Subject: [PATCH]OpenCL event_t overloading

Hi all,
Attached a patch that enables overloading of functions with OpenCL event_t arguments. This feature is useful for implementing OpenCL built-ins.

Please review.

Thanks
     Guy Benyei





---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.




More information about the cfe-commits mailing list