Hiya folks! [Mac OS 10.6.6, Xcode 3.2]
The current error: “kernel referenced an external function __sind, that could not be found.”
Compiling my first kernel; I had trouble with calling sin(x). Kept getting “more than one matching function found in __builtin_overload”. [btw, that complaint occured in those places where I was calling sin(x+PIx2)].
Attempted using native_sin(x). Forget what the error combo was there.
In any case, there are NO DOUBLES anywhere in my kernel, nor its header file. There should be no attempt to call __sind, which I think is a double-precision sine (I am on a MacBook Pro with the 330M, so I don’t have double precision on my gpu).
I even replace all calls to “sin” with calls to “syn”, which I #defined to redirect to a quadratic sine approximation function – so, NO calls to sine anywhere in my code. Still get the same error as at the top.
Thought, “perhaps the cosines are getting translated into sine calls”, and whacked all my calls to “cos”, replacing them with an approximation function.
There are NO DOUBLES ANYWHERE in my code. The OpenCL specification itself tells me to use sin(x) for floats!!! It tells me also that native_sin(x) works on floats!!!
Hellllllppppppp…
(I don’t understand why searching for this error didn’t turn up hundreds of hits with a simple fix. there must be one, or else the whole thing’s broken, or else nobody out there has tried using a sine under this circumstance?..)
OH!, p.s. a bonus one which is likely to be related:
I’ve also seen at times that the external function fabs can’t be found.
However, if I add my own macro for fabs, it complains that I’m redefining a macro…