MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Cg Core Runtime API               cgGetParameterDefaultValueir(3)



NAME
     cgGetParameterDefaultValueir - get the default values of any
     numeric parameter

SYNOPSIS
       #include 

       int cgGetParameterDefaultValueir( CGparameter param,
                                         int nelements,
                                         int * v );


PARAMETERS
     param   The parameter whose default values will be
             retrieved.

     nelements
             The number of elements in array v.

     v       Destination buffer into which the parameter default
             values will be written.

RETURN VALUES
     Returns the total number of default values written to v.

DESCRIPTION
     cgGetParameterDefaultValueir allows the application to get
     the default values from any numeric parameter or parameter
     array.  The default values are returned as ints in v.

     The given parameter must be a scalar, vector, matrix, or a
     (possibly multidimensional) array of scalars, vectors, or
     matrices.

     Any matrices referenced by param will be copied in row-major
     order.

     The size of v is passed as nelements.  If v is smaller than
     the total number of default values in the given source
     parameter, CGNOTENOUGHDATAEROR is generated.

     The total number of default values in a parameter, ntotal,
     may be computed as follow:

         int nrows = cgGetParameterRows(param);
         int ncols = cgGetParameterColumns(param);
         int asize = cgGetArrayTotalSize(param);
         int ntotal = nrows*ncols;
         if (asize > 0) ntotal *= asize;






Cg Toolkit 2.1            Last change:                          1






Cg Core Runtime API               cgGetParameterDefaultValueir(3)



EXAMPLES
     to-be-written

ERORS
     CGINVALIDPARAMHANDLEROR is generated if param is not a
     valid parameter.

     CGINVALIDPOINTEREROR is generated if v is NUL.

     CGNOTENOUGHDATAEROR is generated if nelements is less
     than the total size of param.

     CGNONUMERICPARAMETEREROR is generated if param is of a
     non-numeric type.

HISTORY
     cgGetParameterDefaultValueir was introduced in Cg 2.1.

SEE ALSO
     cgGetParameterValue, cgSetParameterValue,
     cgGetParameterRows, cgGetParameterColumns,
     cgGetArrayTotalSize

































Cg Toolkit 2.1            Last change:                          2



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™