[PATCH] [OpenCL] Promoting OpenCL image types

Joey Gouly joey.gouly at arm.com
Mon Feb 25 04:03:49 PST 2013


> Ok, so take AddressSpaces for example. These are implemented as qualifiers
and if you changed the read_only/write_only to an address space (and make
them different) you would get an error a> > bout changing address space
pointers when passing dst to that function. Address spaces are also
available at codgen too.

> Using AddressSpaces as my example, to me it seems like its doable with
qualifiers. Maybe take a look at how that works and see if maybe you are
just missing something? I think its cleaner to > use qualifiers.

Thinking about this, the reason image access qualifiers are different to
address space qualifiers is that
you cannot have an image *without* an access qualifier. There isn't an
"image2d_t" type, only "read_only image2d_t" and
"write_only image2d_t" (and read_write, but it's invalid). This is why I
think it's better to have them as actual distinct types.

Joey










More information about the cfe-commits mailing list