SDSnumElements(3DTM)

NAME
SDSnumElements - Determine the number of elements in a scientific dataset.

SYNOPSIS
#include <sds.h>
int SDSnumElements(int rank, int dimensions[])

DESCRIPTION
SDSnumElements calculates the size of the number of elements that are in a scientific dataset based on the values contained in the dimensions array of the given rank. This is simply a convenience function that follows the following algorithm:

	size = 1;
	for i = 1 to rank dimensions
		size = size * dimension[i]

SEE ALSO
SDSgetRank, SDSgetDimensions

DIAGNOSTICS
When the rank of the array is less than 1, SDSnumElements returns the value DTMERROR, otherwise it returns the product of the dimensions.