<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 15, 2015 at 9:42 AM, Jan Vesely <span dir="ltr"><<a href="mailto:jan.vesely@rutgers.edu" target="_blank">jan.vesely@rutgers.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Tue, Sep 15, 2015 at 7:28 AM, Jan Vesely <span dir="ltr"><<a href="mailto:jan.vesely@rutgers.edu" target="_blank">jan.vesely@rutgers.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On Thu, 2015-09-10 at 10:12 -0500, Aaron Watry wrote:<br>
> The char/short return buffers were declared as ints.<br>
><br>
> Signed-off-by: Aaron Watry <<a href="mailto:awatry@gmail.com" target="_blank">awatry@gmail.com</a>><br>
<br>
</span>Reviewed-by: Jan Vesely <<a href="mailto:jan.vesely@rutgers.edu" target="_blank">jan.vesely@rutgers.edu</a>><br>
For both patches.<br>
<br>
though, I agree with Serge that a spec reference would be nice.<br></blockquote><div><br></div></span><div>PS: don't we need to test this for *_MAX too? I'd expect at least char and short to have the same problem.</div></div></div></div></blockquote><div><br><br></div><div>Yes, it seems that the _MAX values are also broken because the values are upgraded to ints by llvm.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span><font color="#888888"><br>
Jan<br>
</font></span><div><div><br>
> ---<br>
> tests/cl/program/execute/<a href="http://int-definitions.cl" rel="noreferrer" target="_blank">int-definitions.cl</a> | 8 ++++----<br>
> 1 file changed, 4 insertions(+), 4 deletions(-)<br>
><br>
> diff --git a/tests/cl/program/execute/<a href="http://int-definitions.cl" rel="noreferrer" target="_blank">int-definitions.cl</a><br>
> b/tests/cl/program/execute/<a href="http://int-definitions.cl" rel="noreferrer" target="_blank">int-definitions.cl</a><br>
> index 3d8ee63..a438fe4 100644<br>
> --- a/tests/cl/program/execute/<a href="http://int-definitions.cl" rel="noreferrer" target="_blank">int-definitions.cl</a><br>
> +++ b/tests/cl/program/execute/<a href="http://int-definitions.cl" rel="noreferrer" target="_blank">int-definitions.cl</a><br>
> @@ -12,12 +12,12 @@ global_size: 1 0 0<br>
> [test]<br>
> name: Char Definitions<br>
> kernel_name: test_char<br>
> -arg_out: 0 buffer int[6] 8 127 -128 127 -128 255<br>
> +arg_out: 0 buffer char[6] 8 127 -128 127 -128 255<br>
><br>
> [test]<br>
> name: Short Definitions<br>
> kernel_name: test_short<br>
> -arg_out: 0 buffer int[3] 32767 -32768 65535<br>
> +arg_out: 0 buffer short[3] 32767 -32768 65535<br>
><br>
> [test]<br>
> name: Int Definitions<br>
> @@ -32,7 +32,7 @@ arg_out: 0 buffer long[3] 9223372036854775807 \<br>
> 18446744073709551615<br>
> !*/<br>
><br>
> -kernel void test_char(global int* out) {<br>
> +kernel void test_char(global char* out) {<br>
> int i = 0;<br>
> out[i++] = CHAR_BIT;<br>
> out[i++] = CHAR_MAX;<br>
> @@ -42,7 +42,7 @@ kernel void test_char(global int* out) {<br>
> out[i++] = UCHAR_MAX;<br>
> }<br>
><br>
> -kernel void test_short(global int* out) {<br>
> +kernel void test_short(global short* out) {<br>
> int i = 0;<br>
> out[i++] = SHRT_MAX;<br>
> out[i++] = (SHRT_MIN - (short2)(0)).s0;<br>
</div></div></blockquote></div></div></div><br></div></div>
</blockquote></div><br></div></div>