./
gpuinit.pro
GPULib IDL library routines.
Examples
For a simple use of the routines, create some IDL variables::
x = 2 * findgen(10)
y = findgen(10) + 5
Now transfer these IDL variables to the GPU::
result_gpu = gpuFltarr(10)
gpuPutArr, x, x_gpu
gpuPutArr, y, y_gpu
Do an operation::
gpuAdd, x_gpu, y_gpu, result_gpu
Finally get the results back from the GPU and print the result::
gpuGetArr, result_gpu, result
print, result
Routines
result = gpuGetHandle()Creates a variable on the GPU that can be manipulated by the GPULib library routines.
gpuFree, x_gpu [, ERROR=integer]Free resource on GPU held by given variable(s).
result = gpuMake_Array(nx [, ny] [, /NOZERO] [, VALUE=float] [, /INDEX] [, ERROR=integer])This routine creates an IDL structure representing an array on the GPU that other GPULib library routines can use.
result = gpuFltarr(nx [, ny] [, /NOZERO] [, ERROR=integer])This routine creates an IDL structure representing a float array on the GPU that other GPULib library routines can use.
result = gpuFindgen(nx [, ny] [, ERROR=integer])This routine creates an IDL structure representing a float array on the GPU that other GPULib library routines can use and initializes its elements to the array index.
gpuPutArr, x [, x_gpu] [, ERROR=integer]Transfer IDL variables to the GPU.
gpuGetArr [, x_gpu], x [, ERROR=integer]Transfer GPU variables to IDL.
gpuAdd, p1, p2, p3 [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]Add two vectors.
gpuSub, p1, p2, p3 [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]Subtracts two vectors.
gpuMult, p1, p2, p3 [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]Multiplies two vectors.
gpuDiv, p1, p2, p3 [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]Divides two vectors.
gpuSqrt, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]Takes the square root of the argument.
gpuExp, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]Takes the exponential of the argument.
gpuExp2, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]Raise 2.0 to the power of the argument.
gpuExp10, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]Raise 10.0 to the power of the argument.
gpuLog, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]Take the natural logarithm of the argument.
gpuLog2, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]Take the base 2 logarithm of the argument.
gpuLog10, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]Take the base 10 logarithm of the argument.
gpuLog1p, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]Take the natural logarithm of the argument plus 1.0.
gpuSin, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]Takes the sine of the argument.
gpuCos, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]Takes the cosine of the argument.
gpuTan, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]Takes the tangent of the argument.
gpuAsin, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]Takes the arc sine of the argument.
gpuAcos, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]Takes the arc cosine of the argument.
gpuAtan, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]Takes the arc tangent of the argument.
gpuErf, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]Takes the error function of the argument.
gpuLgamma, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]Takes the natural log of the gamma function of the argument.
gpuTgamma, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]Takes the gamma function of the argument.
gpuLogb, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]Take the base r logarithm of the argument, where r is the radix of the machine's floating point arithmetic.
gpuTrunc, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]Truncates (rounds to zero) the argument.
gpuRound, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]Rounds the argument.
gpuRint, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]Rounds the argument.
gpuNearbyint, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]Rounds the argument.
gpuCeil, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]Takes the ceil of the argument.
gpuFloor, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]Takes the floor of the argument.
gpuLrint, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]Rounds the argument.
gpuLround, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]Rounds the argument.
gpuSignbit, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]Indicates whether the argument is negative.
gpuIsinf, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]Indicates the infinite elements of the argument.
gpuIsnan, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]Indicates the elements of the argument which are NaNs.
gpuIsfinite, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]Indicates the finite elements of the argument.
gpuFabs, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]Calculates the absolute value of the argument.
gpuInterpolate, p_gpu, x_gpu, arg3_gpu [, arg4_gpu] [, ERROR=integer]Calculates the linear or bilinear interpolates of the given input p_gpu, depending on the number of arguments presented.
result = gpuTotal(x_gpu [, ERROR=integer])Calculates the total of the elements of the GPU vector.
result = gpuMax(x_gpu [, max_subscript] [, ERROR=integer])Calculates the maximum of the elements of the GPU vector.
result = gpuMin(x_gpu [, min_subscript] [, ERROR=integer])Calculates the minimum of the elements of the GPU vector.
gpuCopy, x_gpu [, res_gpu] [, ERROR=integer]Copies a GPU vector
gpuReform, arr_gpu [, xsize] [, ysize]Change the dimensions of a GPU variable without changing the total number of elements.
gpuCongrid, x_gpu, nx, ny, res_gpu [, INTERP=integer] [, ERROR=integer]Changes the resolution of an array, either using interpolation or nearest grid point sampling.
gpuSubArr, p1, p2, p3, p4, p5, p6gpuReal, x_gpu, res_gpu [, ERROR=integer]Extracts the real part of a complex data object on the GPU
gpuImaginary, x_gpu, res_gpu [, ERROR=integer]Extracts the imaginary part of a complex data object on the GPU
gpuComplex, re_gpu, im_gpu, res_gpu [, ERROR=integer]Combines two GPU arrays, re_gpu and im_gpu into a single, complex GPU array res_gpu.
gpufft, x_gpu, res_gpu [, PLAN=long] [, /REAL2COMPLEX] [, /COMPLEX2REAL] [, /COMPLEX2COMPLEX] [, /INVERSE] [, /DIM2D] [, /DEMORMALIZED] [, DESTROYPLAN=boolen]Perform FFT on the GPU
result = gpuDetectDevice()Detects the installed GPU device.
gpuinit [, /HARDWARE] [, /EMULATOR] [, /IDL] [, ERROR=integer]Start up the IDL CUDA interface in either: hardware, emulator, or IDL mode.
Routine details
topgpuGetHandle
result = gpuGetHandle()
Creates a variable on the GPU that can be manipulated by the GPULib library routines.
Return value
a blank { GPUHANDLE } structure
topgpuFree
gpuFree, x_gpu [, ERROR=integer]
Free resource on GPU held by given variable(s).
Parameters
- x_gpu in required type=scalar or array of { GPUHANDLE }
GPU variable(s) to free
Keywords
- ERROR out optional type=integer
error status
topgpuMake_Array
result = gpuMake_Array(nx [, ny] [, /NOZERO] [, VALUE=float] [, /INDEX] [, ERROR=integer])
This routine creates an IDL structure representing an array on the GPU that other GPULib library routines can use.
Return value
structure
Parameters
- nx in required type=integer
size of first dimenion
- ny in optional type=integer
size of second dimenion, if present
Keywords
- NOZERO in optional type=boolean
Normally, gpuFltarr setts every element of the allocated array to zero. If set, this keyword prevents zeroing the elements, running slightly faster.
- VALUE in optional type=float
initialization value for array.
- INDEX in optional type=boolean
initialize array elements to their indices
- ERROR out optional type=integer
error status
topgpuFltarr
result = gpuFltarr(nx [, ny] [, /NOZERO] [, ERROR=integer])
This routine creates an IDL structure representing a float array on the GPU that other GPULib library routines can use.
Return value
structure
Parameters
- nx in required type=integer
size of first dimenion
- ny in optional type=integer
size of second dimenion, if present
Keywords
- NOZERO in optional type=boolean
Normally, gpuFltarr setts every element of the allocated array to zero. If set, this keyword prevents zeroing the elements, running slightly faster.
- ERROR out optional type=integer
error status
topgpuFindgen
result = gpuFindgen(nx [, ny] [, ERROR=integer])
This routine creates an IDL structure representing a float array on the GPU that other GPULib library routines can use and initializes its elements to the array index.
Return value
structure
Parameters
- nx in required type=integer
size of first dimenion
- ny in optional type=integer
size of second dimenion, if present
Keywords
- ERROR out optional type=integer
error status
topgpuPutArr
gpuPutArr, x [, x_gpu] [, ERROR=integer]
Transfer IDL variables to the GPU.
Parameters
- x in required type=any
normal IDL variable to send to the GPU
- x_gpu in out optional type={ GPUHANDLE }
GPU variable to fill of the same size/type as x
Keywords
- ERROR out optional type=integer
error status
topgpuGetArr
gpuGetArr [, x_gpu], x [, ERROR=integer]
Transfer GPU variables to IDL.
Parameters
- x_gpu in optional type={ GPUHANDLE }
GPU variable
- x in out required type=any
pre-allocated normal IDL variable of the same type/size as x_gpu
Keywords
- ERROR out optional type=integer
error status
topgpuAdd
gpuAdd, p1, p2, p3 [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]
Add two vectors. There are two forms for the arguments to this
routine::
p3 = p1 + p2
where p1, p2 are { GPUHANDLE } or float and p3 is { GPUHANDLE }.
Or::
p6 = p1 * p2 + p3 * p4 + p5
where p2, p4 are { GPUHANDLE } or float , p6 is { GPUHANDLE }
and p1, p3, and p5 are scalar floats.
Parameters
- p1 in required type=float or { GPUHANDLE }
- p2 in required type={ GPUHANDLE }
- p3 in out required type=float or { GPUHANDLE }
- p4 in optional type={ GPUHANDLE }
- p5 in optional type=float
- p6 out optional type={ GPUHANDLE }
-
Keywords
- NONBLOCKING in optional type=boolean
unless this keyword is set, this will block until the device has completed all preceding requested tasks
- ERROR out optional type=integer
error status
topgpuSub
gpuSub, p1, p2, p3 [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]
Subtracts two vectors. There are two forms for the arguments to this
routine::
p3 = p1 - p2
where p1, p2 are { GPUHANDLE } or float and p3 is { GPUHANDLE }.
Or::
p6 = p1 * p2 - p3 * p4 + p5
where p2, p4 are { GPUHANDLE } or float , p6 is { GPUHANDLE }
and p1, p3, and p5 are scalar floats.
Parameters
- p1 in required type=float or { GPUHANDLE }
- p2 in required type={ GPUHANDLE }
- p3 in out required type=float or { GPUHANDLE }
- p4 in optional type={ GPUHANDLE }
- p5 in optional type=float
- p6 out optional type={ GPUHANDLE }
-
Keywords
- NONBLOCKING in optional type=boolean
unless this keyword is set, this will block until the device has completed all preceding requested tasks
- ERROR out optional type=integer
error status
topgpuMult
gpuMult, p1, p2, p3 [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]
Multiplies two vectors. There are two forms for the arguments to this
routine::
p3 = p1 * p2
where p1, p2 are { GPUHANDLE } or float and p3 is { GPUHANDLE }.
Or::
p6 = p1 * p2 * p3 * p4 + p5
where p2, p4 are { GPUHANDLE } or float , p6 is { GPUHANDLE }
and p1, p3, and p5 are scalar floats.
Parameters
- p1 in required type=float or { GPUHANDLE }
- p2 in required type={ GPUHANDLE }
- p3 in out required type=float or { GPUHANDLE }
- p4 in optional type={ GPUHANDLE }
- p5 in optional type=float
- p6 out optional type={ GPUHANDLE }
-
Keywords
- NONBLOCKING in optional type=boolean
unless this keyword is set, this will block until the device has completed all preceding requested tasks
- ERROR out optional type=integer
error status
topgpuDiv
gpuDiv, p1, p2, p3 [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]
Divides two vectors. There are two forms for the arguments to this
routine::
p3 = p1 / p2
where p1, p2 are { GPUHANDLE } or float and p3 is { GPUHANDLE }.
Or::
p6 = p1 * p2 / p3 * p4 + p5
where p2, p4 are { GPUHANDLE } or float , p6 is { GPUHANDLE }
and p1, p3, and p5 are scalar floats.
Parameters
- p1 in required type=float or { GPUHANDLE }
- p2 in required type={ GPUHANDLE }
- p3 in out required type=float or { GPUHANDLE }
- p4 in optional type={ GPUHANDLE }
- p5 in optional type=float
- p6 out optional type={ GPUHANDLE }
-
Keywords
- NONBLOCKING in optional type=boolean
unless this keyword is set, this will block until the device has completed all preceding requested tasks
- ERROR out optional type=integer
error status
topgpuSqrt
gpuSqrt, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]
Takes the square root of the argument. There are two forms for the
arguments to this routine::
p2 = sqrt(p1)
where p1 is { GPUHANDLE } or float and p2 is { GPUHANDLE }. Or::
p6 = p1 * sqrt(p2 * p3 + p4) + p5
where p2 is { GPUHANDLE } or float and p6 is { GPUHANDLE } and
p1, p2, p4, and p5 are scalar floats.
Parameters
- p1 in required type=float or { GPUHANDLE }
- p2 in out required type=float or { GPUHANDLE }
- p3 in optional type={ GPUHANDLE }
- p4 in optional type=float
- p5 in optional type=float
- p6 out optional type={ GPUHANDLE }
-
Keywords
- NONBLOCKING in optional type=boolean
unless this keyword is set, this will block until the device has completed all preceding requested tasks
- ERROR out optional type=integer
error status
topgpuExp
gpuExp, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]
Takes the exponential of the argument. There are two forms for the arguments
to this routine::
p2 = exp(p1)
where p1 is { GPUHANDLE } or float and p2 is { GPUHANDLE }. Or::
p6 = p1 * exp(p2 * p3 + p4) + p5
where p2 is { GPUHANDLE } or float and p6 is { GPUHANDLE } and
p1, p2, p4, and p5 are scalar floats.
Parameters
- p1 in required type=float or { GPUHANDLE }
- p2 in out required type=float or { GPUHANDLE }
- p3 in optional type={ GPUHANDLE }
- p4 in optional type=float
- p5 in optional type=float
- p6 out optional type={ GPUHANDLE }
-
Keywords
- NONBLOCKING in optional type=boolean
unless this keyword is set, this will block until the device has completed all preceding requested tasks
- ERROR out optional type=integer
error status
topgpuExp2
gpuExp2, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]
Raise 2.0 to the power of the argument. There are two forms for the
arguments to this routine::
p2 = 2.0 ^ p1
where p1 is { GPUHANDLE } or float and p2 is { GPUHANDLE }. Or::
p6 = p1 * 2.0 ^ (p2 * p3 + p4) + p5
where p2 is { GPUHANDLE } or float and p6 is { GPUHANDLE } and
p1, p2, p4, and p5 are scalar floats.
Parameters
- p1 in required type=float or { GPUHANDLE }
- p2 in out required type=float or { GPUHANDLE }
- p3 in optional type={ GPUHANDLE }
- p4 in optional type=float
- p5 in optional type=float
- p6 out optional type={ GPUHANDLE }
-
Keywords
- NONBLOCKING in optional type=boolean
unless this keyword is set, this will block until the device has completed all preceding requested tasks
- ERROR out optional type=integer
error status
topgpuExp10
gpuExp10, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]
Raise 10.0 to the power of the argument. There are two forms for the
arguments to this routine::
p2 = 10.0 ^ p1
where p1 is { GPUHANDLE } or float and p2 is { GPUHANDLE }. Or::
p6 = p1 * 10.0 ^ (p2 * p3 + p4) + p5
where p2 is { GPUHANDLE } or float and p6 is { GPUHANDLE } and
p1, p2, p4, and p5 are scalar floats.
Parameters
- p1 in required type=float or { GPUHANDLE }
- p2 in out required type=float or { GPUHANDLE }
- p3 in optional type={ GPUHANDLE }
- p4 in optional type=float
- p5 in optional type=float
- p6 out optional type={ GPUHANDLE }
-
Keywords
- NONBLOCKING in optional type=boolean
unless this keyword is set, this will block until the device has completed all preceding requested tasks
- ERROR out optional type=integer
error status
topgpuLog
gpuLog, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]
Take the natural logarithm of the argument. There are two forms for the
arguments to this routine::
p2 = alog(p1)
where p1 is { GPUHANDLE } or float and p2 is { GPUHANDLE }. Or::
p6 = p1 * alog(p2 * p3 + p4) + p5
where p2 is { GPUHANDLE } or float and p6 is { GPUHANDLE } and
p1, p2, p4, and p5 are scalar floats.
Parameters
- p1 in required type=float or { GPUHANDLE }
- p2 in out required type=float or { GPUHANDLE }
- p3 in optional type={ GPUHANDLE }
- p4 in optional type=float
- p5 in optional type=float
- p6 out optional type={ GPUHANDLE }
-
Keywords
- NONBLOCKING in optional type=boolean
unless this keyword is set, this will block until the device has completed all preceding requested tasks
- ERROR out optional type=integer
error status
topgpuLog2
gpuLog2, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]
Take the base 2 logarithm of the argument. There are two forms for the
arguments to this routine::
p2 = alog(p1) / alog(2)
where p1 is { GPUHANDLE } or float and p2 is { GPUHANDLE }. Or::
p6 = p1 * alog(p2 * p3 + p4) / alog(2) + p5
where p2 is { GPUHANDLE } or float and p6 is { GPUHANDLE } and
p1, p2, p4, and p5 are scalar floats.
Parameters
- p1 in required type=float or { GPUHANDLE }
- p2 in out required type=float or { GPUHANDLE }
- p3 in optional type={ GPUHANDLE }
- p4 in optional type=float
- p5 in optional type=float
- p6 out optional type={ GPUHANDLE }
-
Keywords
- NONBLOCKING in optional type=boolean
unless this keyword is set, this will block until the device has completed all preceding requested tasks
- ERROR out optional type=integer
error status
topgpuLog10
gpuLog10, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]
Take the base 10 logarithm of the argument. There are two forms for the
arguments to this routine::
p2 = alog10(p1)
where p1 is { GPUHANDLE } or float and p2 is { GPUHANDLE }. Or::
p6 = p1 * alog10(p2 * p3 + p4) + p5
where p2 is { GPUHANDLE } or float and p6 is { GPUHANDLE } and
p1, p2, p4, and p5 are scalar floats.
Parameters
- p1 in required type=float or { GPUHANDLE }
- p2 in out required type=float or { GPUHANDLE }
- p3 in optional type={ GPUHANDLE }
- p4 in optional type=float
- p5 in optional type=float
- p6 out optional type={ GPUHANDLE }
-
Keywords
- NONBLOCKING in optional type=boolean
unless this keyword is set, this will block until the device has completed all preceding requested tasks
- ERROR out optional type=integer
error status
topgpuLog1p
gpuLog1p, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]
Take the natural logarithm of the argument plus 1.0. There are two forms for
the arguments to this routine::
p2 = alog(1.0 + p1)
where p1 is { GPUHANDLE } or float and p2 is { GPUHANDLE }. Or::
p6 = p1 * alog(p2 * (1.0 + p3) + p4) + p5
where p2 is { GPUHANDLE } or float and p6 is { GPUHANDLE } and
p1, p2, p4, and p5 are scalar floats.
Parameters
- p1 in required type=float or { GPUHANDLE }
- p2 in out required type=float or { GPUHANDLE }
- p3 in optional type={ GPUHANDLE }
- p4 in optional type=float
- p5 in optional type=float
- p6 out optional type={ GPUHANDLE }
-
Keywords
- NONBLOCKING in optional type=boolean
unless this keyword is set, this will block until the device has completed all preceding requested tasks
- ERROR out optional type=integer
error status
topgpuSin
gpuSin, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]
Takes the sine of the argument. There are two forms for the arguments to this
routine::
p2 = sin(p1)
where p1 is { GPUHANDLE } or float and p2 is { GPUHANDLE }. Or::
p6 = p1 * sin(p2 * p3 + p4) + p5
where p2 is { GPUHANDLE } or float and p6 is { GPUHANDLE } and
p1, p2, p4, and p5 are scalar floats.
Parameters
- p1 in required type=float or { GPUHANDLE }
- p2 in out required type=float or { GPUHANDLE }
- p3 in optional type={ GPUHANDLE }
- p4 in optional type=float
- p5 in optional type=float
- p6 out optional type={ GPUHANDLE }
-
Keywords
- NONBLOCKING in optional type=boolean
unless this keyword is set, this will block until the device has completed all preceding requested tasks
- ERROR out optional type=integer
error status
topgpuCos
gpuCos, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]
Takes the cosine of the argument. There are two forms for the arguments to
this routine::
p2 = cos(p1)
where p1 is { GPUHANDLE } or float and p2 is { GPUHANDLE }. Or::
p6 = p1 * cos(p2 * p3 + p4) + p5
where p2 is { GPUHANDLE } or float and p6 is { GPUHANDLE } and
p1, p2, p4, and p5 are scalar floats.
Parameters
- p1 in required type=float or { GPUHANDLE }
- p2 in out required type=float or { GPUHANDLE }
- p3 in optional type={ GPUHANDLE }
- p4 in optional type=float
- p5 in optional type=float
- p6 out optional type={ GPUHANDLE }
-
Keywords
- NONBLOCKING in optional type=boolean
unless this keyword is set, this will block until the device has completed all preceding requested tasks
- ERROR out optional type=integer
error status
topgpuTan
gpuTan, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]
Takes the tangent of the argument. There are two forms for the arguments to
this routine::
p2 = tan(p1)
where p1 is { GPUHANDLE } or float and p2 is { GPUHANDLE }. Or::
p6 = p1 * tan(p2 * p3 + p4) + p5
where p2 is { GPUHANDLE } or float and p6 is { GPUHANDLE } and
p1, p2, p4, and p5 are scalar floats.
Parameters
- p1 in required type=float or { GPUHANDLE }
- p2 in out required type=float or { GPUHANDLE }
- p3 in optional type={ GPUHANDLE }
- p4 in optional type=float
- p5 in optional type=float
- p6 out optional type={ GPUHANDLE }
-
Keywords
- NONBLOCKING in optional type=boolean
unless this keyword is set, this will block until the device has completed all preceding requested tasks
- ERROR out optional type=integer
error status
topgpuAsin
gpuAsin, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]
Takes the arc sine of the argument. There are two forms for the arguments to
this routine::
p2 = asin(p1)
where p1 is { GPUHANDLE } or float and p2 is { GPUHANDLE }. Or::
p6 = p1 * asin(p2 * p3 + p4) + p5
where p2 is { GPUHANDLE } or float and p6 is { GPUHANDLE } and
p1, p2, p4, and p5 are scalar floats.
Parameters
- p1 in required type=float or { GPUHANDLE }
- p2 in out required type=float or { GPUHANDLE }
- p3 in optional type={ GPUHANDLE }
- p4 in optional type=float
- p5 in optional type=float
- p6 out optional type={ GPUHANDLE }
-
Keywords
- NONBLOCKING in optional type=boolean
unless this keyword is set, this will block until the device has completed all preceding requested tasks
- ERROR out optional type=integer
error status
topgpuAcos
gpuAcos, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]
Takes the arc cosine of the argument. There are two forms for the arguments
to this routine::
p2 = acos(p1)
where p1 is { GPUHANDLE } or float and p2 is { GPUHANDLE }. Or::
p6 = p1 * acos(p2 * p3 + p4) + p5
where p2 is { GPUHANDLE } or float and p6 is { GPUHANDLE } and
p1, p2, p4, and p5 are scalar floats.
Parameters
- p1 in required type=float or { GPUHANDLE }
- p2 in out required type=float or { GPUHANDLE }
- p3 in optional type={ GPUHANDLE }
- p4 in optional type=float
- p5 in optional type=float
- p6 out optional type={ GPUHANDLE }
-
Keywords
- NONBLOCKING in optional type=boolean
unless this keyword is set, this will block until the device has completed all preceding requested tasks
- ERROR out optional type=integer
error status
topgpuAtan
gpuAtan, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]
Takes the arc tangent of the argument. There are two forms for the arguments
to this routine::
p2 = atan(p1)
where p1 is { GPUHANDLE } or float and p2 is { GPUHANDLE }. Or::
p6 = p1 * atan(p2 * p3 + p4) + p5
where p2 is { GPUHANDLE } or float and p6 is { GPUHANDLE } and
p1, p2, p4, and p5 are scalar floats.
Parameters
- p1 in required type=float or { GPUHANDLE }
- p2 in out required type=float or { GPUHANDLE }
- p3 in optional type={ GPUHANDLE }
- p4 in optional type=float
- p5 in optional type=float
- p6 out optional type={ GPUHANDLE }
-
Keywords
- NONBLOCKING in optional type=boolean
unless this keyword is set, this will block until the device has completed all preceding requested tasks
- ERROR out optional type=integer
error status
Other attributes
| Bugs: |
Not sure if I need PHASE keyword
|
topgpuErf
gpuErf, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]
Takes the error function of the argument. There are two forms for the
arguments to this routine::
p2 = erf(p1)
where p1 is { GPUHANDLE } or float and p2 is { GPUHANDLE }. Or::
p6 = p1 * erf(p2 * p3 + p4) + p5
where p2 is { GPUHANDLE } or float and p6 is { GPUHANDLE } and
p1, p2, p4, and p5 are scalar floats.
Parameters
- p1 in required type=float or { GPUHANDLE }
- p2 in out required type=float or { GPUHANDLE }
- p3 in optional type={ GPUHANDLE }
- p4 in optional type=float
- p5 in optional type=float
- p6 out optional type={ GPUHANDLE }
-
Keywords
- NONBLOCKING in optional type=boolean
unless this keyword is set, this will block until the device has completed all preceding requested tasks
- ERROR out optional type=integer
error status
topgpuLgamma
gpuLgamma, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]
Takes the natural log of the gamma function of the argument. There are two
forms for the arguments to this routine::
p2 = LNGAMMA(p1)
where p1 is { GPUHANDLE } or float and p2 is { GPUHANDLE }. Or::
p6 = p1 * LNGAMMA(p2 * p3 + p4) + p5
where p2 is { GPUHANDLE } or float and p6 is { GPUHANDLE } and
p1, p2, p4, and p5 are scalar floats.
Parameters
- p1 in required type=float or { GPUHANDLE }
- p2 in out required type=float or { GPUHANDLE }
- p3 in optional type={ GPUHANDLE }
- p4 in optional type=float
- p5 in optional type=float
- p6 out optional type={ GPUHANDLE }
-
Keywords
- NONBLOCKING in optional type=boolean
unless this keyword is set, this will block until the device has completed all preceding requested tasks
- ERROR out optional type=integer
error status
topgpuTgamma
gpuTgamma, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]
Takes the gamma function of the argument. There are two forms for the
arguments to this routine::
p2 = GAMMA(p1)
where p1 is { GPUHANDLE } or float and p2 is { GPUHANDLE }. Or::
p6 = p1 * GAMMA(p2 * p3 + p4) + p5
where p2 is { GPUHANDLE } or float and p6 is { GPUHANDLE } and
p1, p2, p4, and p5 are scalar floats.
Parameters
- p1 in required type=float or { GPUHANDLE }
- p2 in out required type=float or { GPUHANDLE }
- p3 in optional type={ GPUHANDLE }
- p4 in optional type=float
- p5 in optional type=float
- p6 out optional type={ GPUHANDLE }
-
Keywords
- NONBLOCKING in optional type=boolean
unless this keyword is set, this will block until the device has completed all preceding requested tasks
- ERROR out optional type=integer
error status
topgpuLogb
gpuLogb, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]
Take the base r logarithm of the argument, where r is the radix of the
machine's floating point arithmetic. There are two forms for the arguments
to this routine::
p2 = alog(p1) / alog(r)
where p1 is { GPUHANDLE } or float and p2 is { GPUHANDLE }. Or::
p6 = p1 * alog(p2 * p3 + p4) / alog(r) + 5
where p2 is { GPUHANDLE } or float and p6 is { GPUHANDLE } and
p1, p2, p4, and p5 are scalar floats.
Parameters
- p1 in required type=float or { GPUHANDLE }
- p2 in out required type=float or { GPUHANDLE }
- p3 in optional type={ GPUHANDLE }
- p4 in optional type=float
- p5 in optional type=float
- p6 out optional type={ GPUHANDLE }
-
Keywords
- NONBLOCKING in optional type=boolean
unless this keyword is set, this will block until the device has completed all preceding requested tasks
- ERROR out optional type=integer
error status
topgpuTrunc
gpuTrunc, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]
Truncates (rounds to zero) the argument. There are two forms for the
arguments to this routine::
p2 = FLOAT(LONG(p1))
where p1 is { GPUHANDLE } or float and p2 is { GPUHANDLE }. Or::
p6 = p1 * FLOAT(LONG(p2 * p3 + p4)) + p5
where p2 is { GPUHANDLE } or float and p6 is { GPUHANDLE } and
p1, p2, p4, and p5 are scalar floats.
Parameters
- p1 in required type=float or { GPUHANDLE }
- p2 in out required type=float or { GPUHANDLE }
- p3 in optional type={ GPUHANDLE }
- p4 in optional type=float
- p5 in optional type=float
- p6 out optional type={ GPUHANDLE }
-
Keywords
- NONBLOCKING in optional type=boolean
unless this keyword is set, this will block until the device has completed all preceding requested tasks
- ERROR out optional type=integer
error status
topgpuRound
gpuRound, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]
Rounds the argument. There are two forms for the arguments to this routine::
p2 = round(p1)
where p1 is { GPUHANDLE } or float and p2 is { GPUHANDLE }. Or::
p6 = p1 * round(p2 * p3 + p4) + p5
where p2 is { GPUHANDLE } or float and p6 is { GPUHANDLE } and
p1, p2, p4, and p5 are scalar floats.
Parameters
- p1 in required type=float or { GPUHANDLE }
- p2 in out required type=float or { GPUHANDLE }
- p3 in optional type={ GPUHANDLE }
- p4 in optional type=float
- p5 in optional type=float
- p6 out optional type={ GPUHANDLE }
-
Keywords
- NONBLOCKING in optional type=boolean
unless this keyword is set, this will block until the device has completed all preceding requested tasks
- ERROR out optional type=integer
error status
topgpuRint
gpuRint, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]
Rounds the argument. There are two forms for the arguments to this routine::
p2 = round(p1)
where p1 is { GPUHANDLE } or float and p2 is { GPUHANDLE }. Or::
p6 = p1 * round(p2 * p3 + p4) + p5
where p2 is { GPUHANDLE } or float and p6 is { GPUHANDLE } and
p1, p2, p4, and p5 are scalar floats.
Parameters
- p1 in required type=float or { GPUHANDLE }
- p2 in out required type=float or { GPUHANDLE }
- p3 in optional type={ GPUHANDLE }
- p4 in optional type=float
- p5 in optional type=float
- p6 out optional type={ GPUHANDLE }
-
Keywords
- NONBLOCKING in optional type=boolean
unless this keyword is set, this will block until the device has completed all preceding requested tasks
- ERROR out optional type=integer
error status
Other attributes
| Bugs: |
In IDL mode, should round in the "current rounding direction", but this routine just rounds to nearest integer.
|
topgpuNearbyint
gpuNearbyint, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]
Rounds the argument. There are two forms for the arguments to this routine::
p2 = round(p1)
where p1 is { GPUHANDLE } or float and p2 is { GPUHANDLE }. Or::
p6 = p1 * round(p2 * p3 + p4) + p5
where p2 is { GPUHANDLE } or float and p6 is { GPUHANDLE } and
p1, p2, p4, and p5 are scalar floats.
Parameters
- p1 in required type=float or { GPUHANDLE }
- p2 in out required type=float or { GPUHANDLE }
- p3 in optional type={ GPUHANDLE }
- p4 in optional type=float
- p5 in optional type=float
- p6 out optional type={ GPUHANDLE }
-
Keywords
- NONBLOCKING in optional type=boolean
unless this keyword is set, this will block until the device has completed all preceding requested tasks
- ERROR out optional type=integer
error status
Other attributes
| Bugs: |
In IDL mode, should round in the "current rounding direction", but this routine just rounds to nearest integer.
|
topgpuCeil
gpuCeil, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]
Takes the ceil of the argument. There are two forms for the arguments
to this routine::
p2 = ceil(p1)
where p1 is { GPUHANDLE } or float and p2 is { GPUHANDLE }. Or::
p6 = p1 * ceil(p2 * p3 + p4) + p5
where p2 is { GPUHANDLE } or float and p6 is { GPUHANDLE } and
p1, p2, p4, and p5 are scalar floats.
Parameters
- p1 in required type=float or { GPUHANDLE }
- p2 in out required type=float or { GPUHANDLE }
- p3 in optional type={ GPUHANDLE }
- p4 in optional type=float
- p5 in optional type=float
- p6 out optional type={ GPUHANDLE }
-
Keywords
- NONBLOCKING in optional type=boolean
unless this keyword is set, this will block until the device has completed all preceding requested tasks
- ERROR out optional type=integer
error status
topgpuFloor
gpuFloor, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]
Takes the floor of the argument. There are two forms for the arguments
to this routine::
p2 = floor(p1)
where p1 is { GPUHANDLE } or float and p2 is { GPUHANDLE }. Or::
p6 = p1 * floor(p2 * p3 + p4) + p5
where p2 is { GPUHANDLE } or float and p6 is { GPUHANDLE } and
p1, p2, p4, and p5 are scalar floats.
Parameters
- p1 in required type=float or { GPUHANDLE }
- p2 in out required type=float or { GPUHANDLE }
- p3 in optional type={ GPUHANDLE }
- p4 in optional type=float
- p5 in optional type=float
- p6 out optional type={ GPUHANDLE }
-
Keywords
- NONBLOCKING in optional type=boolean
unless this keyword is set, this will block until the device has completed all preceding requested tasks
- ERROR out optional type=integer
error status
topgpuLrint
gpuLrint, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]
Rounds the argument. There are two forms for the arguments to this routine::
p2 = Lrint(p1)
where p1 is { GPUHANDLE } or float and p2 is { GPUHANDLE }. Or::
p6 = p1 * Lrint(p2 * p3 + p4) + p5
where p2 is { GPUHANDLE } or float and p6 is { GPUHANDLE } and
p1, p2, p4, and p5 are scalar floats.
Parameters
- p1 in required type=float or { GPUHANDLE }
- p2 in out required type=float or { GPUHANDLE }
- p3 in optional type={ GPUHANDLE }
- p4 in optional type=float
- p5 in optional type=float
- p6 out optional type={ GPUHANDLE }
-
Keywords
- NONBLOCKING in optional type=boolean
unless this keyword is set, this will block until the device has completed all preceding requested tasks
- ERROR out optional type=integer
error status
Other attributes
| Bugs: |
In IDL mode, should round in the "current rounding direction", but this routine just rounds to nearest integer. This routine returns the same type as the input GPU array instead of a long in order to match the behavoir of gpuLroundF(AT).
|
topgpuLround
gpuLround, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]
Rounds the argument. There are two forms for the arguments to this routine::
p2 = round(p1)
where p1 is { GPUHANDLE } or float and p2 is { GPUHANDLE }. Or::
p6 = p1 * round(p2 * p3 + p4) + p5
where p2 is { GPUHANDLE } or float and p6 is { GPUHANDLE } and
p1, p2, p4, and p5 are scalar floats.
Parameters
- p1 in required type=float or { GPUHANDLE }
- p2 in out required type=float or { GPUHANDLE }
- p3 in optional type={ GPUHANDLE }
- p4 in optional type=float
- p5 in optional type=float
- p6 out optional type={ GPUHANDLE }
-
Keywords
- NONBLOCKING in optional type=boolean
unless this keyword is set, this will block until the device has completed all preceding requested tasks
- ERROR out optional type=integer
error status
Other attributes
| Bugs: |
This routine returns the same type as the input GPU array instead of a long in order to match the behavoir of gpuLroundF(AT).
|
topgpuSignbit
gpuSignbit, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]
Indicates whether the argument is negative. There are two forms for the
arguments to this routine::
p2 = p1 lt 0
where p1 is { GPUHANDLE } or float and p2 is { GPUHANDLE }. Or::
p6 = p1 * ((p2 * p3 + p4) lt 0) + p5
where p2 is { GPUHANDLE } or float and p6 is { GPUHANDLE } and
p1, p2, p4, and p5 are scalar floats.
Note: unlike the IDL lt operator, this test will indicate that -!values.f_infinity is less than zero.
Parameters
- p1 in required type=float or { GPUHANDLE }
- p2 in out required type=float or { GPUHANDLE }
- p3 in optional type={ GPUHANDLE }
- p4 in optional type=float
- p5 in optional type=float
- p6 out optional type={ GPUHANDLE }
-
Keywords
- NONBLOCKING in optional type=boolean
unless this keyword is set, this will block until the device has completed all preceding requested tasks
- ERROR out optional type=integer
error status
topgpuIsinf
gpuIsinf, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]
Indicates the infinite elements of the argument. There are two forms for the
arguments to this routine::
p2 = abs(p1) eq !values.f_infinity
where p1 is { GPUHANDLE } or float and p2 is { GPUHANDLE }. Or::
p6 = p1 * (abs(p2 * p3 + p4) eq !values.f_infinity) + p5
where p2 is { GPUHANDLE } or float and p6 is { GPUHANDLE } and
p1, p2, p4, and p5 are scalar floats.
Parameters
- p1 in required type=float or { GPUHANDLE }
- p2 in out required type=float or { GPUHANDLE }
- p3 in optional type={ GPUHANDLE }
- p4 in optional type=float
- p5 in optional type=float
- p6 out optional type={ GPUHANDLE }
-
Keywords
- NONBLOCKING in optional type=boolean
unless this keyword is set, this will block until the device has completed all preceding requested tasks
- ERROR out optional type=integer
error status
topgpuIsnan
gpuIsnan, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]
Indicates the elements of the argument which are NaNs. There are two forms
for the arguments to this routine::
p2 = gpuIsNaN(p1)
where p1 is { GPUHANDLE } or float and p2 is { GPUHANDLE }. Or::
p6 = p1 * gpuIsNaN(p2 * p3 + p4) + p5
where p2 is { GPUHANDLE } or float and p6 is { GPUHANDLE } and
p1, p2, p4, and p5 are scalar floats.
Note: checking for p1 eq !values.f_nan will not work since::
IDL> print, !values.f_nan eq !values.f_nan
0
so the check involves using FINITE (not NaN or infinite) and removing
the elements that are infinite.
Parameters
- p1 in required type=float or { GPUHANDLE }
- p2 in out required type=float or { GPUHANDLE }
- p3 in optional type={ GPUHANDLE }
- p4 in optional type=float
- p5 in optional type=float
- p6 out optional type={ GPUHANDLE }
-
Keywords
- NONBLOCKING in optional type=boolean
unless this keyword is set, this will block until the device has completed all preceding requested tasks
- ERROR out optional type=integer
error status
topgpuIsfinite
gpuIsfinite, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]
Indicates the finite elements of the argument. There are two forms for the
arguments to this routine::
p2 = finite(p1)
where p1 is { GPUHANDLE } or float and p2 is { GPUHANDLE }. Or::
p6 = p1 * finite(p2 * p3 + p4) + p5
where p2 is { GPUHANDLE } or float and p6 is { GPUHANDLE } and
p1, p2, p4, and p5 are scalar floats.
Parameters
- p1 in required type=float or { GPUHANDLE }
- p2 in out required type=float or { GPUHANDLE }
- p3 in optional type={ GPUHANDLE }
- p4 in optional type=float
- p5 in optional type=float
- p6 out optional type={ GPUHANDLE }
-
Keywords
- NONBLOCKING in optional type=boolean
unless this keyword is set, this will block until the device has completed all preceding requested tasks
- ERROR out optional type=integer
error status
topgpuFabs
gpuFabs, p1, p2 [, p3] [, p4] [, p5] [, p6] [, /NONBLOCKING] [, ERROR=integer]
Calculates the absolute value of the argument. There are two forms for the
arguments to this routine::
p2 = abs(p1)
where p1 is { GPUHANDLE } or float and p2 is { GPUHANDLE }. Or::
p6 = p1 * abs(p2 * p3 + p4) + p5
where p2 is { GPUHANDLE } or float and p6 is { GPUHANDLE } and
p1, p2, p4, and p5 are scalar floats.
Parameters
- p1 in required type=float or { GPUHANDLE }
- p2 in out required type=float or { GPUHANDLE }
- p3 in optional type={ GPUHANDLE }
- p4 in optional type=float
- p5 in optional type=float
- p6 out optional type={ GPUHANDLE }
-
Keywords
- NONBLOCKING in optional type=boolean
unless this keyword is set, this will block until the device has completed all preceding requested tasks
- ERROR out optional type=integer
error status
topgpuInterpolate
gpuInterpolate, p_gpu, x_gpu, arg3_gpu [, arg4_gpu] [, ERROR=integer]
Calculates the linear or bilinear interpolates of the given input p_gpu,
depending on the number of arguments presented. If three arguments are
given::
arg3_gpu = interpolate(p_gpu, x_gpu)
If four arguments are given::
arg4_gpu = interpolate(p_gpu, x_gpu, arg3_gpu)
Parameters
- p_gpu in required type={ GPUHANDLE }
the input array (1D or 2D)
- x_gpu in required type={ GPUHANDLE }
x-values for either form of interpolation
- arg3_gpu in out required type={ GPUHANDLE }
the return value for linear interpolation or the y-values for bilinear interpolation
- arg4_gpu in optional type={ GPUHANDLE }
the return value for bilinear interpolation
Keywords
- ERROR out optional type=integer
error status
topgpuTotal
result = gpuTotal(x_gpu [, ERROR=integer])
Calculates the total of the elements of the GPU vector.
Return value
float
Parameters
- x_gpu in required type={ GPUHANDLE }
GPU array to total
Keywords
- ERROR out optional type=integer
error status
topgpuMax
result = gpuMax(x_gpu [, max_subscript] [, ERROR=integer])
Calculates the maximum of the elements of the GPU vector.
Return value
float
Parameters
- x_gpu in required type={ GPUHANDLE }
GPU array to search for maximum
- max_subscript in optional type= long
position of the first ocurrence of the maximum element
Keywords
- ERROR out optional type=integer
error status
topgpuMin
result = gpuMin(x_gpu [, min_subscript] [, ERROR=integer])
Calculates the minimum of the elements of the GPU vector.
Return value
float
Parameters
- x_gpu in required type={ GPUHANDLE }
GPU array to search for minimum
- min_subscript in optional type=long
position of the first ocurrence of the minimum element
Keywords
- ERROR out optional type=integer
error status
topgpuCopy
gpuCopy, x_gpu [, res_gpu] [, ERROR=integer]
Copies a GPU vector
Parameters
- x_gpu in required type=float or { GPUHANDLE }
GPU array to copy. If and IDL array is provided, it is first copied to the GPU.
- res_gpu in optional type= any
resulting GPU vector. If res_gpu is a {GPUHANDLE} it is used for holding the result, otherwise a new GPU array is created.
Keywords
- ERROR out optional type=integer
error status
topgpuReform
gpuReform, arr_gpu [, xsize] [, ysize]
Change the dimensions of a GPU variable without changing the total number of elements.
Warning: this routine modifies the input GPU variable whereas the REFORM function does not unless the OVERWRITE keyword is set.
Parameters
- arr_gpu in out required type={ GPUHANDLE }
GPU variable to manipulate
- xsize in optional type=long
new xsize of arr_gpu
- ysize in optional type=long
new ysize of arr_gpu
topgpuCongrid
gpuCongrid, x_gpu, nx, ny, res_gpu [, INTERP=integer] [, ERROR=integer]
Changes the resolution of an array, either using interpolation or nearest grid point sampling.
Parameters
- x_gpu in required type={ GPUHANDLE }
GPU array to change resolution of. Currently only supports 2D
- nx in required type=long
X resolution of resulting image
- ny in required type=long
Y resolution of resulting image
- res_gpu out required type={ GPUHANDLE }
resulting array.
Keywords
- INTERP in optional type=integer
if set, use bilinear interpolation. Otherwise use nearest grid point.
- ERROR out optional type=integer
error status
topgpuSubArr
gpuSubArr, p1, p2, p3, p4, p5, p6
Extract a subset of an array and store it in a subset of the result array.
Parameters
- p1 in required type={ GPUHANDLE }
src_gpu: GPU array to extract subarray from.
- p2 in required type=int or intarr
src_x: index[array] of src_gpu x dimension. When src_x is an int, this is the x-index to be extracted. When src_x is a 2-element int-arr, this is array is of the form [lower, upper] and lower and upper index of the x-subrange. src_x, lower or upper can be -1, specifying a the full range (equivalent to IDL's '*'.
- p3 in type=int or intarr
src_y: index[array] of src_gpu y dimension. For more details see src_x; required if x_gpu is 2D
- p4 in required type= { GPUHANDLE }
dest_gpu: GPU array to store subarray into
- p5 in required type=int or intarr
dest_x: index[array] of dest_gpu x dimension. For more details see src_x.
- p6 in type=int or intarr
dest_y: index[array] of dest_gpu y dimension. For more details see src_x; required if dest is 2D
topgpuReal
gpuReal, x_gpu, res_gpu [, ERROR=integer]
Extracts the real part of a complex data object on the GPU
Parameters
- x_gpu in required type={ GPUHANDLE }
GPU array representing a complex array
- res_gpu out required type={ GPUHANDLE }
GPU array conaining the real part of the input
Keywords
- ERROR out optional type=integer
error status
topgpuImaginary
gpuImaginary, x_gpu, res_gpu [, ERROR=integer]
Extracts the imaginary part of a complex data object on the GPU
Parameters
- x_gpu in required type={ GPUHANDLE }
GPU array representing a complex array
- res_gpu out required type={ GPUHANDLE }
GPU array conaining the imaginary part of the input
Keywords
- ERROR out optional type=integer
error status
topgpuComplex
gpuComplex, re_gpu, im_gpu, res_gpu [, ERROR=integer]
Combines two GPU arrays, re_gpu and im_gpu into a single, complex GPU array res_gpu.
Parameters
- re_gpu in required type={ GPUHANDLE }
GPU array representing the real part of the result
- im_gpu in required type={ GPUHANDLE }
GPU array representing the imaginary part of the result
- res_gpu out required type={ GPUHANDLE }
complex GPU array
Keywords
- ERROR out optional type=integer
error status
topgpufft
gpufft, x_gpu, res_gpu [, PLAN=long] [, /REAL2COMPLEX] [, /COMPLEX2REAL] [, /COMPLEX2COMPLEX] [, /INVERSE] [, /DIM2D] [, /DEMORMALIZED] [, DESTROYPLAN=boolen]
Perform FFT on the GPU
The FFT can operate either on real or complex signals, and perform both 1D and 2D transforms. Complex number arrays use an interleaved memory layout and are otherwise treated as regular real arrays. Use the gpuReal and gpuImaginary routines to extract the real and imaginary component.
Parameters
- x_gpu in required type={ GPUHANDLE }
GPU array to perform FFT on
- res_gpu out required type={ GPUHANDLE }
GPU array containing the result
Keywords
- PLAN in out optional type=long
The plan to be used for this transform. If undefined upon entry, a new plan will be created and returned in this variable.
- REAL2COMPLEX in optional type=boolean
Perform a real to complex fft. This transform is implicitly forward.
- COMPLEX2REAL in optional type=boolean
Performa a complex to real fft. This transform is implicitly inverse.
- COMPLEX2COMPLEX in optional type=boolean
Perform a complex to complex fft. By default, this transform is forward, but using can be reversed by using the INVERSE keyword
- INVERSE in optional type=boolean
Perform an inverse complex to complex fft. Only valid in combination with the COMPLEX2COMPLEX keyword.
- DIM2D in optional type=boolean
Perform a 2D fft on the input data set. The dimensionality is extracted from the input object.
- DEMORMALIZED in optional type=boolean
Perform a denormalized transform. By default, the result is normalized by the number of input vector elements. This option allows to skip this normalization step, yielding slightly faster exectution.
- DESTROYPLAN in optional type=boolen
Frees the GPU resoures occupied by the fft plan. This invalidates the plan and requires a new plan to be generated.
topgpuDetectDevice
result = gpuDetectDevice()
Detects the installed GPU device.
Return value
identifier for installed GPU device::
1 for GPU hardware
0 for pure IDL emulation
-1 for GPU hardware emulation
topgpuinit
gpuinit [, /HARDWARE] [, /EMULATOR] [, /IDL] [, ERROR=integer]
Start up the IDL CUDA interface in either: hardware, emulator, or IDL mode. Unless a new mode is specfied, uses the previous mode if the CUDA interface has already been initialized. Defaults to hardware if no mode is specified and CUDA has not already been initialized.
Keywords
- HARDWARE in optional type=boolean
set to run GPU library routine in hardware mode
- EMULATOR in optional type=boolean
set to run GPU library routines in emulator mode
- IDL in optional type=boolean
set to run GPU library routines in native IDL mode
- ERROR out optional type=integer
error status
File attributes
| Modifcation date: | Thu Dec 13 15:16:14 2007 |
| Lines: | 3,892 |
| Docformat: | rst rst |