I would like to ask if it is possible to clarify a point. What is possible to
refer to in a @CUDA kernel in X10?
"As in normal X10 programs, the code in '...' can access variables from the
enclosing scope, i.e. the host. Such captured variables will be automatically
copied to the GPU"
I am having a bunch of problems, and error messages do not help in clarifying
them. Is it possible to refer variables in the current scope or only variables
in the block (and not all the names in the scope)?
For example if I try to refer to a formal parameter of a function (input
parameter) within @CUDA kernel which is inside the function itself and I get a
compile error. Something like this:
public static def cellwise_bi (A: Vector, B: Vector(A.M), C: Vector(A.M),
op:(Double, Double) => Double ):cuVector(C) {
val g = gpu;
val threads:Int = 64N;
val blocks:Int = 32N;
...
finish async at (g) @CUDA @CUDADirectParams{
finish for (block in 0n..(blocks-1n)) async {
clocked finish for (thread in 0n..(threads-1n)) clocked async {
val idx = block * blocks + thread;
...
----> val num = A(idx)
...
}
}
}
}
Is it coherent with the semantic and I am doing wrong OR is it a bug?
Moreover can I refer only to primitive types within a @CUDA kernel or can I
refer also struct and objects?
If you clarify these points it would be of great help!
Thanks a lot,
Luca Salucci
------------------------------------------------------------------------------
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience. Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
_______________________________________________
X10-users mailing list
X10-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/x10-users