public class DoubleAngularSpectrumGPU extends DoublePropagatorGPU
Constructor and Description |
---|
DoubleAngularSpectrumGPU(int M,
int N,
double lambda,
double z,
double dx,
double dy)
Creates a new instance of DoubleAngularSpectrum.
|
Modifier and Type | Method and Description |
---|---|
void |
diffract(jcuda.driver.CUdeviceptr devField)
Performs numerical diffraction of the complex data in
devField , leaving the result in devField . |
void |
diffract(double[] field)
Performs numerical diffraction of the complex data in
field ,
leaving the result in field . |
double |
getDx() |
double |
getDy() |
double |
getLambda() |
int |
getM() |
int |
getN() |
double |
getZ() |
void |
memFree() |
public DoubleAngularSpectrumGPU(int M, int N, double lambda, double z, double dx, double dy) throws java.io.IOException
M
- Number of data points on x direction.N
- Number of data points on y direction.lambda
- Wavelength.z
- Distance.dx
- Sampling pitch on x direction.dy
- Sampling pitch on y direction.java.io.IOException
public void diffract(double[] field)
DoublePropagatorGPU
field
,
leaving the result in field
. The physical layout of the
complex data must be the same as in JTransforms:
field[i * 2 * N + 2 * j] = Re[i][j],
field[i * 2 * N + 2 * j + 1] = Im[i][j]; 0 <= i < M, 0 <= j < N
diffract
in class DoublePropagatorGPU
field
- The complex field to diffract.public void diffract(jcuda.driver.CUdeviceptr devField)
DoublePropagatorGPU
devField
, leaving the result in devField
.
devField
must be a pointer to the data on the GPU memory.
The physical layout of the complex data must be the same as in
JTransforms:
field[i * 2 * N + 2 * j] = Re[i][j],
field[i * 2 * N + 2 * j + 1] = Im[i][j]; 0 <= i < M, 0 <= j < N
diffract
in class DoublePropagatorGPU
devField
- The complex field to diffract.public void memFree()
public int getM()
public int getN()
public double getZ()
public double getLambda()
public double getDx()
public double getDy()