Beispiel #1
0
	VertexFormatDescr::Element::Element( uint16 _stream, DataType::type _type, UsageType::type _usage, uint8 _index ) 
		: stream(_stream)
		, size(data_type_to_size(_type))
		, offset(0)
		, index(_index)
		, type(_type)
		, usage(_usage)
	{

	}
Beispiel #2
0
/**
 * Infer the chunk size from the supplied size information
 *
 * @param dims    Size information to base the guessing on
 * @param dtype   The type of the data to guess the chunks for
 *
 * Internally uses guessChunking(NDSize, size_t) for calculations.
 *
 * @return An (maybe not at all optimal) guess for chunk size
 */
NDSize DataSet::guessChunking(NDSize dims, DataType dtype)
{
    const size_t type_size = data_type_to_size(dtype);
    NDSize chunks = guessChunking(dims, type_size);
    return chunks;
}