NAME

cgGetMatrixSize - get the size of one dimension of an array parameter

SYNOPSIS

  #include <Cg/cg.h>

  int cgGetMatrixSize( CGtype type, int *nrows, int *ncols );

PARAMETERS

type

Specifies the type enumerant.

nrows

Specifies a pointer to the location the routine will write the number of rows the type has.

ncols

Specifies a pointer to the location the routine will write the number of columns the type has.

DESCRIPTION

cgGetMatrixSize writes the number of rows and columns the specified type enumerant has into the specified nrows and ncols locations respectively. If the type enumerant is not a matrix type, zeros are written for both the rows and columns.

Contrast this routine with cgGetTypeSizes where the number of rows and columns will be set to 1 row and 1 column for both scalar and non-numeric types but for vector types, the number of rows and columns will be set to 1 row and N columns where N is the number of components in the vector.

RETURN VALUES

No return value.

ERRORS

No errors are generated.

HISTORY

This function was introduced with Cg 1.5.

SEE ALSO

cgGetArrayTotalSize, cgGetArrayDimension, cgGetArrayParameter, cgGetTypeSizes