Skip to content

Commit

Permalink
Merge pull request #570 from jvesely/half_rte
Browse files Browse the repository at this point in the history
cluda_opencl: Use round to nearest even to match cpu version
  • Loading branch information
abergeron authored Apr 18, 2018
2 parents 04c2892 + ac58a79 commit 5761af1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/cluda_opencl.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ typedef struct _ga_half {
#define ga_half2float(p) vload_half(0, &((p).data))
static inline ga_half ga_float2half(ga_float f) {
ga_half r;
vstore_half_rtn(f, 0, &r.data);
vstore_half_rte(f, 0, &r.data);
return r;
}

Expand Down
2 changes: 1 addition & 1 deletion src/cluda_opencl.h.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ static const char cluda_opencl_h[] = {
0x6f, 0x61, 0x74, 0x20, 0x66, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20,
0x67, 0x61, 0x5f, 0x68, 0x61, 0x6c, 0x66, 0x20, 0x72, 0x3b, 0x0a,
0x20, 0x20, 0x76, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x68, 0x61,
0x6c, 0x66, 0x5f, 0x72, 0x74, 0x6e, 0x28, 0x66, 0x2c, 0x20, 0x30,
0x6c, 0x66, 0x5f, 0x72, 0x74, 0x65, 0x28, 0x66, 0x2c, 0x20, 0x30,
0x2c, 0x20, 0x26, 0x72, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x29, 0x3b,
0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x72,
0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x23, 0x70, 0x72, 0x61, 0x67, 0x6d,
Expand Down

0 comments on commit 5761af1

Please # to comment.