__constant and const are totally different things. In case of __constant, the data is in constant memory which may be physically separated from global memory on device and accessing one type of memory using another address qualifier is illegal. Where as "const" is a compiler level thing, and you can actually cast it away.
For example, you create a buffer with read-only mode and pass it to a kernel having argument type as constant for that argument. In this case, data will be loaded into constant memory transparently by the run-time and the accessing will be faster. You can also directly access the read only buffer via "global const *" from another kernel but the access path will be different.
You can cast pointer of a scalar data type to a pointer of vector data type as long as they agree with the data type alignment rule (for details see
Chapter 6.2 Conversions and Type Casting in The OpenCL Specification1.2)
Hi, well I am aware of the hardware-related issues between __global and __constant. Indeed that hardware difference is part of my problem because the data for which same-address reads occur may by no means fit into __constant memory (so practically speaking that's out of scope); so that's why my kernel-parameter is __global qualified, yet I can declare the elements themselves to be const and can make the buffer (or a copy-instance of it, see above) CL_MEM_READ_ONLY.
The prime question however yet remains: Waht counts as read-only in 184.108.40.206? I can come up with three reasonable candidates:
1) memory is __constant qualified
2) elements memory points to are const-qualified
3) buffer is declared CL_MEM_READ_ONLY.
Does only the first of them avoid channel conflicts as different hardware resources are used, or is it also any of the latter two?
4) can a buffer be considered RO by the compiler after static analisys?
The read-only memory being referred in this context is constant memory so, 1st option is the right one.