File: dataStructure.tex

package info (click to toggle)
spooles 2.2-9
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 19,012 kB
  • sloc: ansic: 146,834; csh: 3,615; makefile: 2,040; perl: 74
file content (54 lines) | stat: -rw-r--r-- 1,642 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
\par
\section{Data Structure}
\label{section:A2:dataStructure}
\par
\par
The {\tt A2} structure has six fields.
\begin{itemize}
\item
{\tt int type} : type of entries,
{\tt SPOOLES\_REAL} or {\tt SPOOLES\_COMPLEX}
\item
{\tt int n1} : size in first dimension, number of rows
\item
{\tt int n2} : size in second dimension, number of columns
\item
{\tt int inc1} : increment or stride in first dimension
\item
{\tt int inc2} : increment or stride in second dimension
\item
{\tt int nowned} : the number of entries that are ``owned'' by this
object. 
When {\tt nowned > 0}, 
{\tt entries} points to storage for {\tt nowned} entries,
({\tt nowned} {\tt double}'s for the real case,
{\tt 2*nowned} {\tt double}'s for the complex case),
that have been allocated by this object and can be free'd by the object.
When {\tt nowned == 0} but {\tt n1 > 0} and {\tt n2 > 0}, 
this object points to entries that have been allocated elsewhere, 
and these entries will not be free'd by this object.
\item
{\tt double *entries} : 
pointer to the base address of the {\it double} vector
\end{itemize}
One can query the properties of the front matrix object 
using these simple macros.
\begin{itemize}
\item
{\tt A2\_IS\_REAL(mtx)} is {\tt 1} if {\tt mtx} 
has real entries and {\tt 0} otherwise.
\item
{\tt A2\_IS\_COMPLEX(mtx)} is {\tt 1} if {\tt mtx} 
has complex entries and {\tt 0} otherwise.
\end{itemize}
The {\tt A2\_copyEntriesToVector()} method
uses the following constants: 
{\tt A2\_STRICT\_LOWER},
{\tt A2\_LOWER},
{\tt A2\_DIAGONAL},
{\tt A2\_UPPER},
{\tt A2\_STRICT\_UPPER},
{\tt A2\_ALL\_ENTRIES},
{\tt A2\_BY\_ROWS} and
{\tt A2\_BY\_COLUMNS}.