You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 26, 2024. It is now read-only.
Vector component const conversion operators should return references
This is necessary for consistency between the representation of vector types
between host and device, as well as for consistency with the way vector types
behave when defined as structures (as is the case for code ported from CUDA).
Without this patch, this simple test case:
````
const float& pick(float4 const& v)
{ return v.x; }
const volatile float& pick(float4 const volatile& v)
{ return v.x; }
int main() {
const float4 c = make_float4(0, 1, 2, 3);
volatile float4 v = make_float4(1, 2, 3, 0);
std::cout << pick(c) << std::endl;
std::cout << pick(v) << std::endl;
}
````
will fail to compile when built with the host compiler.
Closes hipamd issue #3
0 commit comments