GPULib documentation

Tech-X Corporation

summary     class     fields     routine details     file attributes

./

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, p6

gpuReal, 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