cgGetTypeSizes
Keywords: cgGetTypeSizes, NVIDIA, NVIDIA Cg Toolkit, Cg Toolkit, Shader, Shader Programming, GPU Shader Programming, GPU Program

> ## Name

> cgGetTypeSizes - get the row and/or column size of a type enumerant

> ## Synopsis

>     #include <Cg/cg.h>

>     CGbool cgGetTypeSizes( CGtype type,
>                            int * nrows,
>                            int * ncols );

> ## Parameters

> type
>   The type enumerant.
> nrows
>   The location where the number of rows will be written.
> ncols
>   The location where the number of columns will be written.

> ## Return Values

> Returns CG_TRUE if the type enumerant is for a matrix.

> Returns CG_FALSE otherwise.

> ## Description

> cgGetTypeSizes returns the number of rows and columns for enumerant type in the locations specified by nrows and ncols respectively.

> When the type enumerant is not a matrix type then 1 is returned in nrows, in contrast to cgGetMatrixSize where the number of rows and columns will be 0 if the type enumerant is not a matrix.

> For a numeric types, ncols will be the vector length for vectors and 1 for scalars. For non-numeric types, ncols will be 0.

> ## Examples

> to-be-written

> ## Errors

> None.

> ## History

> cgGetTypeSizes was introduced in Cg 1.5.

> ## See Also

> cgGetArrayTotalSize, cgGetArrayDimension, cgGetArrayParameter, cgGetMatrixSize