Skip to content

Commit 13889d4

Browse files
committed
chCUDA: fix compile error on current glibc
Signed-off-by: Steven Noonan <steven@uplinklabs.net>
1 parent af96228 commit 13889d4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/chCUDA.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,16 @@
5151

5252
#else
5353

54+
// HACK: prevent glibc from redefining rsqrtf -- we want to use ours because it
55+
// will inline and auto-vectorize properly.
56+
#define rsqrtf rsqrtf_disabled
57+
5458
#include <stddef.h>
5559
#include <math.h>
5660
#include <memory.h>
5761

62+
#undef rsqrtf
63+
5864
#define __global__
5965
#define __host__
6066
#define __device__

0 commit comments

Comments
 (0)