Richard Gomes
unread,Nov 22, 2012, 7:07:13 PM11/22/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to copperhe...@googlegroups.com
Hello,
The line commented out below does not compile.
Seems like we cannot call built in functions in lambdas inside kernels.
@cutype("([Float], Float, Long) -> Float")
@cu
def cm2(v, m, n):
# return sum(map(lambda x: pow(x-m, 2), v)) / float32(n)
return sum(map(lambda x: (x-m)*(x-m), v)) / float32(n)
Any ideas?
Thanks