Scopira  20080306
Scopira DIO (DirectIO) Array File Format

This section describes the Scopira DirectIO File Format. This is an easy to use, extensible, XML based data file format.

The file itself is an XML file (with the .xml extension).

Overview

This is an example DirectIO file:

  <scopira_dio>
    <elem_type>float32</elem_type>
    <num_dimen>3</num_dimen>
    <size_0>380</size_0>
    <size_1>294</size_1>
    <size_2>500</size_2>
    <data_file>contraction.xml.data</data_file>
  </scopira_dio>

The fields (all required) are:

  • elem_type: the type of elements, this is either int or float and the number of bits
  • num_dimen: the number of dimensions in the array (2 for example is a matrix)
  • size_0, size_1, etc: the size of each dimension, numbering starts from 0
  • data_file: the actual data file. This (pure binary) datafile contains the elements in Intel byte order. This filename may be a full path or may be a relative filename.

Payload File

This binary file contains the actual elements in Intel byte order. The user never specifies this file (except perhaps in advances dialog boxes), its file name is referenced from the data_file field in the main XML file.

Scopira functions

Scopira provides the following libxml2 based functions for handling DirectIO files.

Basic loading and saving:

Information query:

Memory-mapped driven loading: