.\" Copyright (c) 2015-2026, The matio contributors
.\" Copyright (c) 2012-2014, Christopher C. Hulbert
.\" All rights reserved.
.\"
.\" SPDX-License-Identifier: BSD-2-Clause
.\"
.Dd April 23, 2026
.Dt MAT_SIZEOF 3
.Os
.Sh NAME
.Nm Mat_SizeOf
.Nd Returns the size in bytes of a matio data type.
.Sh SYNOPSIS
.Fd #include <matio.h>
.Ft size_t
.Fo Mat_SizeOf
.Fa "enum matio_types data_type"
.Fc
.Sh DESCRIPTION
The
.Fn Mat_SizeOf
function returns the size in bytes associated with the matio data type
enumerator
.Fa data_type .
For example, it can be used to size buffers for values described by
.Dv MAT_T_DOUBLE
or
.Dv MAT_T_UINT16 .
.Sh RETURN VALUES
On success, the size in bytes for
.Fa data_type
is returned.
If the type is not recognized, 0 is returned.
.Sh SEE ALSO
.Xr Mat_SizeOfClass 3
