GPULib 1.6.2 API

Tech-X Corporation

single page | use frames     summary     class     fields     routine details     file attributes

lib/

gpuvariable__define.pro


Represents a GPU variable.

Class description for gpuvariable

Inheritance

Subclasses: gpuvariableview

Properties

Properties in gpuvariable

COMPLEX init type=boolean

set to specify a complex GPU variable

DCOMPLEX init type=boolean

set to specify a double complex GPU variable

DIMENSIONS get init type=lonarr(8)

size of each dimension

DOUBLE init type=boolean

set to specify a double GPU variable

ERROR init type=long

error code from last CUDA operation

FLOAT init type=boolean

set to specify a float GPU variable

INDEX init type=boolean

set to set the elements of the array to 0., 1., 2., etc.

NOZERO init type=boolean

set to not zero out the elements of the array on creation

N_DIMENSIONS get type=long

number of dimensions: 0 - 8

N_ELEMENTS get type=long

total number of elements in the variable

TEMPORARY init type=boolean

set to specify this variable as a temporary variable

TYPE get init type=long

IDL type code for variable

VALUE init type=scalar numeric

scalar to fill in the array with

Routines

Methods inherited from idl_object

Routines from gpuvariable__define.pro

result = gpuvariable::_overloadPlus(left, right)

Handle adding GPU variables.

result = gpuvariable::_overloadMinus(left, right)

Handle subtracting GPU variables.

result = gpuvariable::_overloadAsterisk(left, right)

Handle multiplying GPU variables.

result = gpuvariable::_overloadSlash(left, right)

Handle dividing GPU variables.

result = gpuvariable::_overloadMOD(left, right)

Handle MOD for GPU variables.

result = gpuvariable::_overloadCaret(left, right)

Handle raising GPU variables to powers.

result = gpuvariable::_overloadPound(left, right)

Handle matrix multiplication with GPU variables.

result = gpuvariable::_overloadPoundPound(left, right)

Handle matrix multiplication with GPU variables.

result = gpuvariable::_overloadLT(left, right)

Handle LT operator for GPU variables.

result = gpuvariable::_overloadLE(left, right)

Handle LE operator for GPU variables.

result = gpuvariable::_overloadGT(left, right)

Handle GT operator for GPU variables.

result = gpuvariable::_overloadGE(left, right)

Handle GE operator for GPU variables.

result = gpuvariable::_overloadEQ(left, right)

Handle EQ operator for GPU variables.

result = gpuvariable::_overloadNE(left, right)

Handle NE operator for GPU variables.

result = gpuvariable::_overloadMinusUnary()

Handle unary minus (-) operator for GPU variables.

result = gpuvariable::_overloadLessThan(left, right)

Handle < operator for GPU variables.

result = gpuvariable::_overloadGreaterThan(left, right)

Handle > operator for GPU variables.

gpuvariable::_overloadBracketsLeftSide, objref, value, isRange, ss1, ss2, ss3, ss4, ss5, ss6, ss7, ss8

Handle assignment to slices of GPU variables.

result = gpuvariable::_overloadBracketsRightSide(isRange, ss1, ss2, ss3, ss4, ss5, ss6, ss7, ss8)

Handle indexing GPU variables.

result = gpuvariable::_overloadForeach(value, key)

Handle GPU variables in FOREACH statements.

result = gpuvariable::_overloadHelp(varname)

Overload output for HELP routine.

result = gpuvariable::_overloadPrint()

Overload output for PRINT routine.

result = gpuvariable::_overloadSize()

Overload output for SIZE routine.

gpuvariable::getProperty, type=long, n_elements=long, n_dimensions=long, dimensions=lonarr(8), views=views, _is_temporary=_is_temporary, _handle=_handle, _data=_data

Get properties of the variable.

result = gpuvariable::getType()

Returns the SIZE type code for the data type for the GPU variable.

result = gpuvariable::getNElements()

Get the total numbers of element in the GPU array.

result = gpuvariable::getNDimensions()

Get the number of dimensions of the GPU array.

result = gpuvariable::getDimensions()

Return an array of the dimension sizes of the GPU variable.

gpuvariable::cleanup

Free GPU variable resources.

result = gpuvariable::init(TYPE=long, DIMENSIONS=lonarr(8), /FLOAT, /DOUBLE, /COMPLEX, /DCOMPLEX, /INDEX, /NOZERO, VALUE=scalar numeric, ERROR=long, /TEMPORARY)

Create a GPUVariable object.

gpuvariable__define

Define GPU variable's fields.

Routine details

top gpuvariable::_overloadPlus

result = gpuvariable::_overloadPlus(left, right)

Handle adding GPU variables. This method should not be called directly, but instead is called automatically by IDL when adding GPU variables with +.

Return value

GPU variable object

Parameters

left in required type=GPUVariable object or numeric array

left side of + operator

right in required type=GPUVariable object or numeric array

right side of + operator

top gpuvariable::_overloadMinus

result = gpuvariable::_overloadMinus(left, right)

Handle subtracting GPU variables. This method should not be called directly, but instead is called automatically by IDL when subtracting GPU variables with -.

Return value

GPU variable object

Parameters

left in required type=GPUVariable object or numeric array

left side of - operator

right in required type=GPUVariable object or numeric array

right side of - operator

top gpuvariable::_overloadAsterisk

result = gpuvariable::_overloadAsterisk(left, right)

Handle multiplying GPU variables. This method should not be called directly, but instead is called automatically by IDL when multiplying GPU variables with *.

Return value

GPU variable object

Parameters

left in required type=GPUVariable object or numeric array

left side of * operator

right in required type=GPUVariable object or numeric array

right side of * operator

top gpuvariable::_overloadSlash

result = gpuvariable::_overloadSlash(left, right)

Handle dividing GPU variables. This method should not be called directly, but instead is called automatically by IDL when dividing GPU variables with /.

Return value

GPU variable object

Parameters

left in required type=GPUVariable object or numeric array

left side of / operator

right in required type=GPUVariable object or numeric array

right side of / operator

top gpuvariable::_overloadMOD

result = gpuvariable::_overloadMOD(left, right)

Handle MOD for GPU variables. This method should not be called directly, but instead is called automatically by IDL when calculating the modulus of GPU variables with MOD.

Return value

GPU variable object

Parameters

left in required type=GPUVariable object or numeric array

left side of MOD operator

right in required type=GPUVariable object or numeric array

right side of MOD operator

top gpuvariable::_overloadCaret

result = gpuvariable::_overloadCaret(left, right)

Handle raising GPU variables to powers. This method should not be called directly, but instead is called automatically by IDL when exponentiating GPU variables with ^.

Return value

GPU variable object

Parameters

left in required type=GPUVariable object or numeric array

left side of ^ operator

right in required type=GPUVariable object or numeric array

right side of ^ operator

top gpuvariable::_overloadPound

result = gpuvariable::_overloadPound(left, right)

Handle matrix multiplication with GPU variables. This method should not be called directly, but instead is called automatically by IDL when performaing matrix multiplication on GPU variables with #.

Return value

GPU variable object

Parameters

left in required type=GPUVariable object or numeric array

left side of # operator

right in required type=GPUVariable object or numeric array

right side of # operator

top gpuvariable::_overloadPoundPound

result = gpuvariable::_overloadPoundPound(left, right)

Handle matrix multiplication with GPU variables. This method should not be called directly, but instead is called automatically by IDL when performing matrix multiplication on GPU variables with ##.

Return value

GPU variable object

Parameters

left in required type=GPUVariable object or numeric array

left side of ## operator

right in required type=GPUVariable object or numeric array

right side of ## operator

top gpuvariable::_overloadLT

result = gpuvariable::_overloadLT(left, right)

Handle LT operator for GPU variables. This method should not be called directly, but instead is called automatically by IDL when comparing GPU variables with LT.

Return value

GPU variable object

Parameters

left in required type=GPUVariable object or numeric array

left side of LT operator

right in required type=GPUVariable object or numeric array

right side of LT operator

top gpuvariable::_overloadLE

result = gpuvariable::_overloadLE(left, right)

Handle LE operator for GPU variables. This method should not be called directly, but instead is called automatically by IDL when comparing GPU variables with LE.

Return value

GPU variable object

Parameters

left in required type=GPUVariable object or numeric array

left side of LE operator

right in required type=GPUVariable object or numeric array

right side of LE operator

top gpuvariable::_overloadGT

result = gpuvariable::_overloadGT(left, right)

Handle GT operator for GPU variables. This method should not be called directly, but instead is called automatically by IDL when comparing GPU variables with GT.

Return value

GPU variable object

Parameters

left in required type=GPUVariable object or numeric array

left side of GT operator

right in required type=GPUVariable object or numeric array

right side of GT operator

top gpuvariable::_overloadGE

result = gpuvariable::_overloadGE(left, right)

Handle GE operator for GPU variables. This method should not be called directly, but instead is called automatically by IDL when comparing GPU variables with GE.

Return value

GPU variable object

Parameters

left in required type=GPUVariable object or numeric array

left side of GE operator

right in required type=GPUVariable object or numeric array

right side of GE operator

top gpuvariable::_overloadEQ

result = gpuvariable::_overloadEQ(left, right)

Handle EQ operator for GPU variables. This method should not be called directly, but instead is called automatically by IDL when comparing GPU variables with EQ.

Return value

GPU variable object

Parameters

left in required type=GPUVariable object or numeric array

left side of EQ operator

right in required type=GPUVariable object or numeric array

right side of EQ operator

top gpuvariable::_overloadNE

result = gpuvariable::_overloadNE(left, right)

Handle NE operator for GPU variables. This method should not be called directly, but instead is called automatically by IDL when comparing GPU variables with NE.

Return value

GPU variable object

Parameters

left in required type=GPUVariable object or numeric array

left side of NE operator

right in required type=GPUVariable object or numeric array

right side of NE operator

top gpuvariable::_overloadMinusUnary

result = gpuvariable::_overloadMinusUnary()

Handle unary minus (-) operator for GPU variables. This method should not be called directly, but instead is called automatically by IDL when negating a GPU variable with -.

Return value

GPU variable object

top gpuvariable::_overloadLessThan

result = gpuvariable::_overloadLessThan(left, right)

Handle < operator for GPU variables. This method should not be called directly, but instead is called automatically by IDL when using the minimum operator < on GPU variables.

Return value

GPU variable object

Parameters

left in required type=GPUVariable object or numeric array

left side of < operator

right in required type=GPUVariable object or numeric array

right side of < operator

top gpuvariable::_overloadGreaterThan

result = gpuvariable::_overloadGreaterThan(left, right)

Handle > operator for GPU variables. This method should not be called directly, but instead is called automatically by IDL when using the minimum operator > on GPU variables.

Return value

GPU variable object

Parameters

left in required type=GPUVariable object or numeric array

left side of > operator

right in required type=GPUVariable object or numeric array

right side of > operator

top gpuvariable::_overloadBracketsLeftSide

gpuvariable::_overloadBracketsLeftSide, objref, value, isRange, ss1, ss2, ss3, ss4, ss5, ss6, ss7, ss8

Handle assignment to slices of GPU variables. This method should not be called directly, but instead is called automatically by IDL when accessing GPU variables when assigning to them.

Parameters

objref in required type=object

equivalent to self

value in required type=any

right-hande side of an assignment

isRange in required type=bytarr

boolean array indicating whether the corresponding ssi argument is a 3-element range or a list of indices

ss1
ss2
ss3
ss4
ss5
ss6
ss7
ss8

top gpuvariable::_overloadBracketsRightSide

result = gpuvariable::_overloadBracketsRightSide(isRange, ss1, ss2, ss3, ss4, ss5, ss6, ss7, ss8)

Handle indexing GPU variables. This method should not be called directly, but instead is called automatically by IDL when using accessing GPU variables when indexing.

Return value

GPU variable object

Parameters

isRange in required type=bytarr

boolean array indicating whether the corresponding ssi argument is a 3-element range or a list of indices

ss1
ss2
ss3
ss4
ss5
ss6
ss7
ss8

Other attributes

Todo:

handle negative subscripts

top gpuvariable::_overloadForeach

result = gpuvariable::_overloadForeach(value, key)

Handle GPU variables in FOREACH statements. For 1-dimensional arrays, each iteration will yield a view of a single element array. For 2-dimensional arrays, each iteration will yield a view of a row of the array. The key for each is a long integer index, either the element index in the 1-dimensional case or the row index in the 2-dimensional case. This method should not be called directly, but instead is called automatically by IDL when looping over the elements or rows of a GPU variable with the FOREACH statement.

Return value

1 if there is a current element to retrieve, 0 if not

Parameters

value in required type=scalar numeric

return value for the iteration

key in required type=undefined or long

undefined on initial item and row index for subsequent calls

top gpuvariable::_overloadHelp

result = gpuvariable::_overloadHelp(varname)

Overload output for HELP routine. This method should not be called directly, but instead is called automatically by IDL when using the HELP routine on a GPU variable.

Parameters

varname in required type=string

variable name

top gpuvariable::_overloadPrint

result = gpuvariable::_overloadPrint()

Overload output for PRINT routine. This method should not be called directly, but instead is called automatically by IDL when using the PRINT routine on a GPU variable.

top gpuvariable::_overloadSize

result = gpuvariable::_overloadSize()

Overload output for SIZE routine. This method should not be called directly, but instead is called automatically by IDL when using the SIZE routine on a GPU variable.

top gpuvariable::getProperty

gpuvariable::getProperty, type=long, n_elements=long, n_dimensions=long, dimensions=lonarr(8), views=views, _is_temporary=_is_temporary, _handle=_handle, _data=_data

Get properties of the variable.

Keywords

type type=long

IDL type code for variable

n_elements type=long

total number of elements in the variable

n_dimensions type=long

number of dimensions: 0 - 8

dimensions type=lonarr(8)

size of each dimension

views
_is_temporary
_handle
_data

top gpuvariable::getType

result = gpuvariable::getType()

Returns the SIZE type code for the data type for the GPU variable.

Return value

SIZE type code

top gpuvariable::getNElements

result = gpuvariable::getNElements()

Get the total numbers of element in the GPU array.

Return value

long

top gpuvariable::getNDimensions

result = gpuvariable::getNDimensions()

Get the number of dimensions of the GPU array.

Return value

long

top gpuvariable::getDimensions

result = gpuvariable::getDimensions()

Return an array of the dimension sizes of the GPU variable.

Return value

lonarr

top gpuvariable::cleanup

gpuvariable::cleanup

Free GPU variable resources.

top gpuvariable::init

result = gpuvariable::init(TYPE=long, DIMENSIONS=lonarr(8), /FLOAT, /DOUBLE, /COMPLEX, /DCOMPLEX, /INDEX, /NOZERO, VALUE=scalar numeric, ERROR=long, /TEMPORARY)

Create a GPUVariable object.

Return value

1 if successfully initialized, 0 if not

Keywords

TYPE type=long

IDL type code for variable

DIMENSIONS type=lonarr(8)

size of each dimension

FLOAT type=boolean

set to specify a float GPU variable

DOUBLE type=boolean

set to specify a double GPU variable

COMPLEX type=boolean

set to specify a complex GPU variable

DCOMPLEX type=boolean

set to specify a double complex GPU variable

INDEX type=boolean

set to set the elements of the array to 0., 1., 2., etc.

NOZERO type=boolean

set to not zero out the elements of the array on creation

VALUE type=scalar numeric

scalar to fill in the array with

ERROR type=long

error code from last CUDA operation

TEMPORARY type=boolean

set to specify this variable as a temporary variable

top gpuvariable__define

gpuvariable__define

Define GPU variable's fields.

File attributes

Modification date: Thu Sep 19 15:01:45 2013
Lines: 1,197
Docformat: rst rst

GPULib and related documentation copyright 2007-2012, Tech-X Corporation, Boulder, CO. Tech-X, is a registered trademark of Tech-X Corporation. GPULib is a trademark of Tech-X Corporation. All other company, product and brand names are the property of their respective owners.