Dnia 2009-10-07, śro o godzinie 10:41 +0200, Roberto Vidmar pisze: > Hello Andreas, > > I have (many) millions of point coordinated (X, y, z) in 3D space > (easting, westing, height) like these: > > import numpy as np > > x = np.random.random(10000) > y = np.random.random(10000) > z = x * np.exp(-x**2-y**2) > > So the points are: > p = (x, y, z) >
Do you know function that has been used to calculate those points?
So is there some f(x, y) -> z, or (similar to your example above):
z = np.random(10000)?
> I need to interpolate them to a regular grid (n x m).
> Any help will be appreciated.
The easiest way will be to use one thread to calculate value
of one point:
function = pycuda.compiler.SourceModule("""
__global__ void Call(float *dest)
{
const int x = threadIdx.x;
const int x = threadIdx.y;
dest[y*15+x] = x * exp(-x*x-y*y) ;
}
""").get_function("Call")
function.call(pycuda.driver.Out(array), block=(15, 15, 1))
for calculating for [15 x 15]
If this is not what are you asking, please be more specific
with your problem.
>
> Roberto
>
> Andreas Klöckner wrote:
>
> ...snip
> > As usual, if something is possible with CUDA in general, it's also possible
> > with PyCUDA. In this specific case, I'm not sure what you mean by gridding--
> > making a grid-based histogram, binning, or perhaps something entirely
> > different? Nonetheless, it seems likely that what you want can be (and
> > likely
> > has been) done with CUDA.
> >
> > Andreas
> >
> >
> >
> > Email secured by **CeSIT** Check Point gateway
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > PyCUDA mailing list
> > [email protected]
> > http://tiker.net/mailman/listinfo/pycuda_tiker.net
> >
>
>
--
Tomasz Rybak <[email protected]> GPG key ID: F22C D870
Fingerprint 93BC FEEC A426 3765 799F 10EE FAC1 9A2C F22C D870
http://member.acm.org/~tomaszrybak
signature.asc
Description: To jest część wiadomości podpisana cyfrowo
_______________________________________________ PyCUDA mailing list [email protected] http://tiker.net/mailman/listinfo/pycuda_tiker.net
