\hypertarget{paired_8h}{
\section{libbroadway/include/broadway/paired.h File Reference}
\label{paired_8h}\index{libbroadway/include/broadway/paired.h@{libbroadway/include/broadway/paired.h}}
}
\subsection*{Defines}
\begin{DoxyCompactItemize}
\item 
\#define \hyperlink{paired_8h_a5de3c2c3fe480315925195ed4539417c}{paired\_\-load}(gqr, data, single)
\begin{DoxyCompactList}\small\item\em Loads a Paired Single. \item\end{DoxyCompactList}\item 
\#define \hyperlink{paired_8h_a85b459759c11bb5cb3612c3859cdf035}{paired\_\-store}(gqr, data, single, pair)
\begin{DoxyCompactList}\small\item\em Stores a Paired Single. \item\end{DoxyCompactList}\item 
\#define \hyperlink{paired_8h_a92332078a242bdfb1adc688dc525fdfa}{paired\_\-abs}(pair)
\begin{DoxyCompactList}\small\item\em Absolute value of a Paired Single. \item\end{DoxyCompactList}\item 
\#define \hyperlink{paired_8h_a60b655eff7358c7ce941a7b915936389}{paired\_\-nabs}(pair)
\begin{DoxyCompactList}\small\item\em Negative absolute value of a Paired Single. \item\end{DoxyCompactList}\item 
\#define \hyperlink{paired_8h_addb3aa43711a37f466ce99a90a841760}{paired\_\-neg}(pair)
\begin{DoxyCompactList}\small\item\em Negative value of a Paired Single. \item\end{DoxyCompactList}\item 
\#define \hyperlink{paired_8h_a40aa1aac31a1ee67150efbb3809ba94c}{paired\_\-reciprocal}(pair)
\begin{DoxyCompactList}\small\item\em Estimated reciprocal of a Paired Single. \item\end{DoxyCompactList}\item 
\#define \hyperlink{paired_8h_a593a51b2b50fda0e05f19586c21307ee}{paired\_\-sqrt\_\-reciprocal}(pair)
\begin{DoxyCompactList}\small\item\em Estimated reciprocal of the square root of a Paired Single. \item\end{DoxyCompactList}\item 
\#define \hyperlink{paired_8h_a9bd326138ebcfaab4f4f49bb8bb1a569}{paired\_\-add}(pair0, pair1)
\begin{DoxyCompactList}\small\item\em Add Paired Singles. \item\end{DoxyCompactList}\item 
\#define \hyperlink{paired_8h_a9a955c8261e5941620e1cb7fbefb1508}{paired\_\-div}(dend, sor)
\begin{DoxyCompactList}\small\item\em Divide Paired Singles. \item\end{DoxyCompactList}\item 
\#define \hyperlink{paired_8h_a27e8b92c423156acb40a7021a7e99e66}{paired\_\-mul}(pair0, pair1)
\begin{DoxyCompactList}\small\item\em Multiply Paired Singles. \item\end{DoxyCompactList}\item 
\#define \hyperlink{paired_8h_a94237f7731a4de0b37a9ee71443d987f}{paired\_\-sub}(uend, hend)
\begin{DoxyCompactList}\small\item\em Subtract Paired Singles. \item\end{DoxyCompactList}\item 
\#define \hyperlink{paired_8h_ae343818643c23c58b2c811c25f5e1515}{paired\_\-madd}(mul0, mul1, add)
\begin{DoxyCompactList}\small\item\em Multiply then add Paired Singles. \item\end{DoxyCompactList}\item 
\#define \hyperlink{paired_8h_a5935ace525f1ca2ba5ff87ee6d4411ad}{paired\_\-madds0}(mul0, mul1, add)
\begin{DoxyCompactList}\small\item\em Multiply then add Paired Singles Scalar high. \item\end{DoxyCompactList}\item 
\#define \hyperlink{paired_8h_a294c709c03970cd7e83066f05669e6ac}{paired\_\-madds1}(mul0, mul1, add)
\begin{DoxyCompactList}\small\item\em Multiply then add Paired Singles Scalar low. \item\end{DoxyCompactList}\item 
\#define \hyperlink{paired_8h_a27c105f1c11fdda4daf6262f14250378}{paired\_\-msub}(mul0, mul1, sub)
\begin{DoxyCompactList}\small\item\em Multiply then subtract Paired Singles. \item\end{DoxyCompactList}\item 
\#define \hyperlink{paired_8h_a1e0ce7a7455e4634553367b03d0ce2f3}{paired\_\-muls0}(mul0, mul1)
\begin{DoxyCompactList}\small\item\em Multiply Scalar high. \item\end{DoxyCompactList}\item 
\#define \hyperlink{paired_8h_abb737a904fc04cf89011945caa6b2de1}{paired\_\-muls1}(mul0, mul1)
\begin{DoxyCompactList}\small\item\em Multiply Scalar low. \item\end{DoxyCompactList}\item 
\#define \hyperlink{paired_8h_a8addda4861c13a3739ce28718540bf45}{paired\_\-nmadd}(mul0, mul1, add)
\begin{DoxyCompactList}\small\item\em Negative multiply then add Paired Singles. \item\end{DoxyCompactList}\item 
\#define \hyperlink{paired_8h_acd7ab9ce08d2596d33b983fd57637552}{paired\_\-nmsub}(mul0, mul1, sub)
\begin{DoxyCompactList}\small\item\em Negative multiply then subtract Paired Singles. \item\end{DoxyCompactList}\item 
\#define \hyperlink{paired_8h_a2b2a186244abcc05d6ff1323b23b2bf7}{paired\_\-merge00}(pair0, pair1)
\begin{DoxyCompactList}\small\item\em Merge high. \item\end{DoxyCompactList}\item 
\#define \hyperlink{paired_8h_aedd2db0598b31dfb8791fc35438366d2}{paired\_\-merge01}(pair0, pair1)
\begin{DoxyCompactList}\small\item\em Merge direct. \item\end{DoxyCompactList}\item 
\#define \hyperlink{paired_8h_a81845cc13b444cbadbf980996800b960}{paired\_\-merge10}(pair0, pair1)
\begin{DoxyCompactList}\small\item\em Merge swapped. \item\end{DoxyCompactList}\item 
\#define \hyperlink{paired_8h_aba0c4effb51f54ffc298e9656cd8f9b8}{paired\_\-merge11}(pair0, pair1)
\begin{DoxyCompactList}\small\item\em Merge low. \item\end{DoxyCompactList}\item 
\#define \hyperlink{paired_8h_ae9c7df19dba515bee78b1c19865d2ef2}{paired\_\-select}(sel, pos, neg)
\begin{DoxyCompactList}\small\item\em Select. \item\end{DoxyCompactList}\item 
\#define \hyperlink{paired_8h_a8ac9948aba755765cdcc2d68b6d25b21}{paired\_\-sum0}(pair0, pair1, pair2)
\begin{DoxyCompactList}\small\item\em Vector Sum high. \item\end{DoxyCompactList}\item 
\#define \hyperlink{paired_8h_afad4df0bc3963c71015127fb686fed0e}{paired\_\-sum1}(pair0, pair1, pair2)
\begin{DoxyCompactList}\small\item\em Vector Sum low. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum \hyperlink{paired_8h_ab75676e53da2f419fbfe8d841959959c}{gqr\_\-type\_\-t} \{ \par
\hyperlink{paired_8h_ab75676e53da2f419fbfe8d841959959ca18820c8dd445ccc1ec6c7dc547379b6d}{GQR\_\-TYPE\_\-FLOAT} =  0, 
\hyperlink{paired_8h_ab75676e53da2f419fbfe8d841959959caa81c9600eba7b6aa9bef1407ac85f2ef}{GQR\_\-TYPE\_\-U8} =  4, 
\hyperlink{paired_8h_ab75676e53da2f419fbfe8d841959959cac5e2c62d1d1c67f619e7f9b0964a6e3f}{GQR\_\-TYPE\_\-U16}, 
\hyperlink{paired_8h_ab75676e53da2f419fbfe8d841959959cabc025a12d1506789de315bf3b7a29916}{GQR\_\-TYPE\_\-S8}, 
\par
\hyperlink{paired_8h_ab75676e53da2f419fbfe8d841959959cac4849571089297ae093e54439af2f5df}{GQR\_\-TYPE\_\-S16}
 \}
\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{paired_8h_ad1d8b84d00bf61a250e8e1357a191131}{paired\_\-set\_\-gqr} (int gqr, int mode, \hyperlink{paired_8h_ab75676e53da2f419fbfe8d841959959c}{gqr\_\-type\_\-t} type, int scale)
\begin{DoxyCompactList}\small\item\em Sets up a GQR. \item\end{DoxyCompactList}\item 
void \hyperlink{paired_8h_a450b1eec4bf8ae28822f4b9a00c294b2}{paired\_\-get\_\-gqr} (int gqr, int mode, \hyperlink{paired_8h_ab75676e53da2f419fbfe8d841959959c}{gqr\_\-type\_\-t} $\ast$type, int $\ast$scale)
\begin{DoxyCompactList}\small\item\em Gets information from a GQR. \item\end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
An abstraction of the paired singles instructions. These functions are better documented on \href{http://wiibrew.org/wiki/Paired_single}{\tt http://wiibrew.org/wiki/Paired\_\-single}

\begin{Desc}
\item[\hyperlink{todo__todo000002}{Todo}]Comparison functions \end{Desc}
\begin{Desc}
\item[\hyperlink{bug__bug000001}{Bug}]madds1, muls1, merge10, and merge11 are broken/act oddly. \end{Desc}


\subsection{Define Documentation}
\hypertarget{paired_8h_a92332078a242bdfb1adc688dc525fdfa}{
\index{paired.h@{paired.h}!paired\_\-abs@{paired\_\-abs}}
\index{paired\_\-abs@{paired\_\-abs}!paired.h@{paired.h}}
\subsubsection[{paired\_\-abs}]{\setlength{\rightskip}{0pt plus 5cm}\#define paired\_\-abs(pair)}}
\label{paired_8h_a92332078a242bdfb1adc688dc525fdfa}
{\bfseries Value:}
\begin{DoxyCode}
({                      \
        double out;                             \
        asm volatile                            \
        ("      ps_abs          %0, %1\n"       \
         : "=f"(out)                            \
         : "f"(pair)                            \
        );                                      \
        out;                                    \
})
\end{DoxyCode}


Absolute value of a Paired Single. 


\begin{DoxyParams}{Parameters}
\item[{\em pair}]the pair to get the absolute values of. \end{DoxyParams}
\begin{DoxyReturn}{Returns}
The resulting pair. 
\end{DoxyReturn}
\hypertarget{paired_8h_a9bd326138ebcfaab4f4f49bb8bb1a569}{
\index{paired.h@{paired.h}!paired\_\-add@{paired\_\-add}}
\index{paired\_\-add@{paired\_\-add}!paired.h@{paired.h}}
\subsubsection[{paired\_\-add}]{\setlength{\rightskip}{0pt plus 5cm}\#define paired\_\-add(pair0, \/  pair1)}}
\label{paired_8h_a9bd326138ebcfaab4f4f49bb8bb1a569}
{\bfseries Value:}
\begin{DoxyCode}
({              \
        double out;                             \
        asm volatile                            \
        ("      ps_add          %0, %1, %2\n"   \
         : "=f"(out)                            \
         : "f"(pair0), "f"(pair1)               \
        );                                      \
        out;                                    \
})
\end{DoxyCode}


Add Paired Singles. 


\begin{DoxyParams}{Parameters}
\item[{\em pair0}]the first pair. \item[{\em pair1}]the seconds pair. \end{DoxyParams}
\begin{DoxyReturn}{Returns}
The resulting pair. 
\end{DoxyReturn}
\hypertarget{paired_8h_a9a955c8261e5941620e1cb7fbefb1508}{
\index{paired.h@{paired.h}!paired\_\-div@{paired\_\-div}}
\index{paired\_\-div@{paired\_\-div}!paired.h@{paired.h}}
\subsubsection[{paired\_\-div}]{\setlength{\rightskip}{0pt plus 5cm}\#define paired\_\-div(dend, \/  sor)}}
\label{paired_8h_a9a955c8261e5941620e1cb7fbefb1508}
{\bfseries Value:}
\begin{DoxyCode}
({              \
        double out;                             \
        asm volatile                            \
        ("      ps_div          %0, %1, %2\n"   \
         : "=f"(out)                            \
         : "f"(dend), "f"(sor)                  \
        );                                      \
        out;                                    \
})
\end{DoxyCode}


Divide Paired Singles. 


\begin{DoxyParams}{Parameters}
\item[{\em dend}]the dividend pair. \item[{\em sor}]the divisor pair. \end{DoxyParams}
\begin{DoxyReturn}{Returns}
The quotient pair. 
\end{DoxyReturn}
\hypertarget{paired_8h_a5de3c2c3fe480315925195ed4539417c}{
\index{paired.h@{paired.h}!paired\_\-load@{paired\_\-load}}
\index{paired\_\-load@{paired\_\-load}!paired.h@{paired.h}}
\subsubsection[{paired\_\-load}]{\setlength{\rightskip}{0pt plus 5cm}\#define paired\_\-load(gqr, \/  data, \/  single)}}
\label{paired_8h_a5de3c2c3fe480315925195ed4539417c}
{\bfseries Value:}
\begin{DoxyCode}
({              \
        double pair;                                    \
        asm volatile                                    \
        ("      psq_lx          %0, 0, %1, 0, %3\n"     \
         : "=f"(pair) /* The FPR target */              \
         : "rm"(data), "i"(single), "i"(gqr)            \
        );                                              \
        pair;                                           \
})
\end{DoxyCode}


Loads a Paired Single. 


\begin{DoxyParams}{Parameters}
\item[{\em gqr}]the GQR to use for dequantization of the data. \item[{\em data}]a pointer to the data to dequantize into the paired single. Must be a 2-\/element array. \item[{\em single}]if this is non-\/zero, only one number will be dequantized into PS0. PS1 will be loaded with 1.0. \end{DoxyParams}
\begin{DoxyReturn}{Returns}
A double containing the paired singles. DO NOT MODIFY THIS WITHOUT USING THE paired\_\- FUNCTIONS OR BAD THINGS WILL HAPPEN! 
\end{DoxyReturn}
\hypertarget{paired_8h_ae343818643c23c58b2c811c25f5e1515}{
\index{paired.h@{paired.h}!paired\_\-madd@{paired\_\-madd}}
\index{paired\_\-madd@{paired\_\-madd}!paired.h@{paired.h}}
\subsubsection[{paired\_\-madd}]{\setlength{\rightskip}{0pt plus 5cm}\#define paired\_\-madd(mul0, \/  mul1, \/  add)}}
\label{paired_8h_ae343818643c23c58b2c811c25f5e1515}
{\bfseries Value:}
\begin{DoxyCode}
({                      \
        double out;                                     \
        asm volatile                                    \
        ("      ps_madd         %0, %1, %2, %3\n"       \
         : "=f"(out)                                    \
         : "f"(mul0), "f"(mul1), "f"(add)               \
        );                                              \
        out;                                            \
})
\end{DoxyCode}


Multiply then add Paired Singles. 


\begin{DoxyParams}{Parameters}
\item[{\em mul0}]the first multiply pair. \item[{\em mul1}]the other multiply pair. \item[{\em add}]the addition pair. \end{DoxyParams}
\begin{DoxyReturn}{Returns}
The resulting pair. 
\end{DoxyReturn}
\hypertarget{paired_8h_a5935ace525f1ca2ba5ff87ee6d4411ad}{
\index{paired.h@{paired.h}!paired\_\-madds0@{paired\_\-madds0}}
\index{paired\_\-madds0@{paired\_\-madds0}!paired.h@{paired.h}}
\subsubsection[{paired\_\-madds0}]{\setlength{\rightskip}{0pt plus 5cm}\#define paired\_\-madds0(mul0, \/  mul1, \/  add)}}
\label{paired_8h_a5935ace525f1ca2ba5ff87ee6d4411ad}
{\bfseries Value:}
\begin{DoxyCode}
({              \
        double out;                                     \
        asm volatile                                    \
        ("      ps_madds0       %0, %1, %2, %3\n"       \
         : "=f"(out)                                    \
         : "f"(mul0), "f"(mul1), "f"(add)               \
        );                                              \
        out;                                            \
})
\end{DoxyCode}


Multiply then add Paired Singles Scalar high. 


\begin{DoxyParams}{Parameters}
\item[{\em mul0}]the first multiply pair. \item[{\em mul1}]the other multiply pair. (only PS0 is used) \item[{\em add}]the addition pair. \end{DoxyParams}
\begin{DoxyReturn}{Returns}
The resulting pair. 
\end{DoxyReturn}
\hypertarget{paired_8h_a294c709c03970cd7e83066f05669e6ac}{
\index{paired.h@{paired.h}!paired\_\-madds1@{paired\_\-madds1}}
\index{paired\_\-madds1@{paired\_\-madds1}!paired.h@{paired.h}}
\subsubsection[{paired\_\-madds1}]{\setlength{\rightskip}{0pt plus 5cm}\#define paired\_\-madds1(mul0, \/  mul1, \/  add)}}
\label{paired_8h_a294c709c03970cd7e83066f05669e6ac}
{\bfseries Value:}
\begin{DoxyCode}
({              \
        double out;                                     \
        asm volatile                                    \
        ("      ps_madds1       %0, %1, %2, %3\n"       \
         : "=f"(out)                                    \
         : "f"(mul0), "f"(mul1), "f"(add)               \
        );                                              \
        out;                                            \
})
\end{DoxyCode}


Multiply then add Paired Singles Scalar low. 


\begin{DoxyParams}{Parameters}
\item[{\em mul0}]the first multiply pair. \item[{\em mul1}]the other multiply pair. (only PS1 is used) \item[{\em add}]the addition pair. \end{DoxyParams}
\begin{DoxyReturn}{Returns}
The resulting pair. 
\end{DoxyReturn}
\hypertarget{paired_8h_a2b2a186244abcc05d6ff1323b23b2bf7}{
\index{paired.h@{paired.h}!paired\_\-merge00@{paired\_\-merge00}}
\index{paired\_\-merge00@{paired\_\-merge00}!paired.h@{paired.h}}
\subsubsection[{paired\_\-merge00}]{\setlength{\rightskip}{0pt plus 5cm}\#define paired\_\-merge00(pair0, \/  pair1)}}
\label{paired_8h_a2b2a186244abcc05d6ff1323b23b2bf7}
{\bfseries Value:}
\begin{DoxyCode}
({                      \
        double out;                                     \
        asm volatile                                    \
        ("      ps_merge00      %0, %1, %2\n"           \
         : "=f"(out)                                    \
         : "f"(pair0), "f"(pair1)                       \
        );                                              \
        out;                                            \
})
\end{DoxyCode}


Merge high. 


\begin{DoxyParams}{Parameters}
\item[{\em pair0}]the first pair. (only PS0 is used) \item[{\em pair1}]the other pair. (only PS0 is used) \end{DoxyParams}
\begin{DoxyReturn}{Returns}
The merged pair. 
\end{DoxyReturn}
\hypertarget{paired_8h_aedd2db0598b31dfb8791fc35438366d2}{
\index{paired.h@{paired.h}!paired\_\-merge01@{paired\_\-merge01}}
\index{paired\_\-merge01@{paired\_\-merge01}!paired.h@{paired.h}}
\subsubsection[{paired\_\-merge01}]{\setlength{\rightskip}{0pt plus 5cm}\#define paired\_\-merge01(pair0, \/  pair1)}}
\label{paired_8h_aedd2db0598b31dfb8791fc35438366d2}
{\bfseries Value:}
\begin{DoxyCode}
({                      \
        double out;                                     \
        asm volatile                                    \
        ("      ps_merge01      %0, %1, %2\n"           \
         : "=f"(out)                                    \
         : "f"(pair0), "f"(pair1)                       \
        );                                              \
        out;                                            \
})
\end{DoxyCode}


Merge direct. 


\begin{DoxyParams}{Parameters}
\item[{\em pair0}]the first pair. (only PS0 is used) \item[{\em pair1}]the other pair. (only PS1 is used) \end{DoxyParams}
\begin{DoxyReturn}{Returns}
The merged pair. 
\end{DoxyReturn}
\hypertarget{paired_8h_a81845cc13b444cbadbf980996800b960}{
\index{paired.h@{paired.h}!paired\_\-merge10@{paired\_\-merge10}}
\index{paired\_\-merge10@{paired\_\-merge10}!paired.h@{paired.h}}
\subsubsection[{paired\_\-merge10}]{\setlength{\rightskip}{0pt plus 5cm}\#define paired\_\-merge10(pair0, \/  pair1)}}
\label{paired_8h_a81845cc13b444cbadbf980996800b960}
{\bfseries Value:}
\begin{DoxyCode}
({                      \
        double out;                                     \
        asm volatile                                    \
        ("      ps_merge10      %0, %1, %2\n"           \
         : "=f"(out)                                    \
         : "f"(pair0), "f"(pair1)                       \
        );                                              \
        out;                                            \
})
\end{DoxyCode}


Merge swapped. 


\begin{DoxyParams}{Parameters}
\item[{\em pair0}]the first pair. (only PS1 is used) \item[{\em pair1}]the other pair. (only PS0 is used) \end{DoxyParams}
\begin{DoxyReturn}{Returns}
The merged pair. 
\end{DoxyReturn}
\hypertarget{paired_8h_aba0c4effb51f54ffc298e9656cd8f9b8}{
\index{paired.h@{paired.h}!paired\_\-merge11@{paired\_\-merge11}}
\index{paired\_\-merge11@{paired\_\-merge11}!paired.h@{paired.h}}
\subsubsection[{paired\_\-merge11}]{\setlength{\rightskip}{0pt plus 5cm}\#define paired\_\-merge11(pair0, \/  pair1)}}
\label{paired_8h_aba0c4effb51f54ffc298e9656cd8f9b8}
{\bfseries Value:}
\begin{DoxyCode}
({                      \
        double out;                                     \
        asm volatile                                    \
        ("      ps_merge11      %0, %1, %2\n"           \
         : "=f"(out)                                    \
         : "f"(pair0), "f"(pair1)                       \
        );                                              \
        out;                                            \
})
\end{DoxyCode}


Merge low. 


\begin{DoxyParams}{Parameters}
\item[{\em pair0}]the first pair. (only PS1 is used) \item[{\em pair1}]the other pair. (only PS1 is used) \end{DoxyParams}
\begin{DoxyReturn}{Returns}
The merged pair. 
\end{DoxyReturn}
\hypertarget{paired_8h_a27c105f1c11fdda4daf6262f14250378}{
\index{paired.h@{paired.h}!paired\_\-msub@{paired\_\-msub}}
\index{paired\_\-msub@{paired\_\-msub}!paired.h@{paired.h}}
\subsubsection[{paired\_\-msub}]{\setlength{\rightskip}{0pt plus 5cm}\#define paired\_\-msub(mul0, \/  mul1, \/  sub)}}
\label{paired_8h_a27c105f1c11fdda4daf6262f14250378}
{\bfseries Value:}
\begin{DoxyCode}
({                      \
        double out;                                     \
        asm volatile                                    \
        ("      ps_msub         %0, %1, %2, %3\n"       \
         : "=f"(out)                                    \
         : "f"(mul0), "f"(mul1), "f"(sub)               \
        );                                              \
        out;                                            \
})
\end{DoxyCode}


Multiply then subtract Paired Singles. 


\begin{DoxyParams}{Parameters}
\item[{\em mul0}]the first multiply pair. \item[{\em mul1}]the other multiply pair. \item[{\em sub}]the subtraction pair. \end{DoxyParams}
\begin{DoxyReturn}{Returns}
The resulting pair. 
\end{DoxyReturn}
\hypertarget{paired_8h_a27e8b92c423156acb40a7021a7e99e66}{
\index{paired.h@{paired.h}!paired\_\-mul@{paired\_\-mul}}
\index{paired\_\-mul@{paired\_\-mul}!paired.h@{paired.h}}
\subsubsection[{paired\_\-mul}]{\setlength{\rightskip}{0pt plus 5cm}\#define paired\_\-mul(pair0, \/  pair1)}}
\label{paired_8h_a27e8b92c423156acb40a7021a7e99e66}
{\bfseries Value:}
\begin{DoxyCode}
({              \
        double out;                             \
        asm volatile                            \
        ("      ps_mul          %0, %1, %2\n"   \
         : "=f"(out)                            \
         : "f"(pair0), "f"(pair1)               \
        );                                      \
        out;                                    \
})
\end{DoxyCode}


Multiply Paired Singles. 


\begin{DoxyParams}{Parameters}
\item[{\em pair0}]the first pair. \item[{\em pair1}]the seconds pair. \end{DoxyParams}
\begin{DoxyReturn}{Returns}
The product pair. 
\end{DoxyReturn}
\hypertarget{paired_8h_a1e0ce7a7455e4634553367b03d0ce2f3}{
\index{paired.h@{paired.h}!paired\_\-muls0@{paired\_\-muls0}}
\index{paired\_\-muls0@{paired\_\-muls0}!paired.h@{paired.h}}
\subsubsection[{paired\_\-muls0}]{\setlength{\rightskip}{0pt plus 5cm}\#define paired\_\-muls0(mul0, \/  mul1)}}
\label{paired_8h_a1e0ce7a7455e4634553367b03d0ce2f3}
{\bfseries Value:}
\begin{DoxyCode}
({                      \
        double out;                                     \
        asm volatile                                    \
        ("      ps_muls0        %0, %1, %2\n"           \
         : "=f"(out)                                    \
         : "f"(mul0), "f"(mul1)                         \
        );                                              \
        out;                                            \
})
\end{DoxyCode}


Multiply Scalar high. 


\begin{DoxyParams}{Parameters}
\item[{\em mul0}]the first multiply pair. \item[{\em mul1}]the other multiply pair. (only PS0 is used) \end{DoxyParams}
\begin{DoxyReturn}{Returns}
The product pair. 
\end{DoxyReturn}
\hypertarget{paired_8h_abb737a904fc04cf89011945caa6b2de1}{
\index{paired.h@{paired.h}!paired\_\-muls1@{paired\_\-muls1}}
\index{paired\_\-muls1@{paired\_\-muls1}!paired.h@{paired.h}}
\subsubsection[{paired\_\-muls1}]{\setlength{\rightskip}{0pt plus 5cm}\#define paired\_\-muls1(mul0, \/  mul1)}}
\label{paired_8h_abb737a904fc04cf89011945caa6b2de1}
{\bfseries Value:}
\begin{DoxyCode}
({                      \
        double out;                                     \
        asm volatile                                    \
        ("      ps_muls1        %0, %1, %2\n"           \
         : "=f"(out)                                    \
         : "f"(mul0), "f"(mul1)                         \
        );                                              \
        out;                                            \
})
\end{DoxyCode}


Multiply Scalar low. 


\begin{DoxyParams}{Parameters}
\item[{\em mul0}]the first multiply pair. \item[{\em mul1}]the other multiply pair. (only PS1 is used) \end{DoxyParams}
\begin{DoxyReturn}{Returns}
The product pair. 
\end{DoxyReturn}
\hypertarget{paired_8h_a60b655eff7358c7ce941a7b915936389}{
\index{paired.h@{paired.h}!paired\_\-nabs@{paired\_\-nabs}}
\index{paired\_\-nabs@{paired\_\-nabs}!paired.h@{paired.h}}
\subsubsection[{paired\_\-nabs}]{\setlength{\rightskip}{0pt plus 5cm}\#define paired\_\-nabs(pair)}}
\label{paired_8h_a60b655eff7358c7ce941a7b915936389}
{\bfseries Value:}
\begin{DoxyCode}
({                      \
        double out;                             \
        asm volatile                            \
        ("      ps_nabs         %0, %1\n"       \
         : "=f"(out)                            \
         : "f"(pair)                            \
        );                                      \
        out;                                    \
})
\end{DoxyCode}


Negative absolute value of a Paired Single. 


\begin{DoxyParams}{Parameters}
\item[{\em pair}]the pair to get the negative absolute values of. \end{DoxyParams}
\begin{DoxyReturn}{Returns}
The resulting pair. 
\end{DoxyReturn}
\hypertarget{paired_8h_addb3aa43711a37f466ce99a90a841760}{
\index{paired.h@{paired.h}!paired\_\-neg@{paired\_\-neg}}
\index{paired\_\-neg@{paired\_\-neg}!paired.h@{paired.h}}
\subsubsection[{paired\_\-neg}]{\setlength{\rightskip}{0pt plus 5cm}\#define paired\_\-neg(pair)}}
\label{paired_8h_addb3aa43711a37f466ce99a90a841760}
{\bfseries Value:}
\begin{DoxyCode}
({                      \
        double out;                             \
        asm volatile                            \
        ("      ps_neg          %0, %1\n"       \
         : "=f"(out)                            \
         : "f"(pair)                            \
        );                                      \
        out;                                    \
})
\end{DoxyCode}


Negative value of a Paired Single. 


\begin{DoxyParams}{Parameters}
\item[{\em pair}]the pair to get the negative of. \end{DoxyParams}
\begin{DoxyReturn}{Returns}
The resulting pair. 
\end{DoxyReturn}
\hypertarget{paired_8h_a8addda4861c13a3739ce28718540bf45}{
\index{paired.h@{paired.h}!paired\_\-nmadd@{paired\_\-nmadd}}
\index{paired\_\-nmadd@{paired\_\-nmadd}!paired.h@{paired.h}}
\subsubsection[{paired\_\-nmadd}]{\setlength{\rightskip}{0pt plus 5cm}\#define paired\_\-nmadd(mul0, \/  mul1, \/  add)}}
\label{paired_8h_a8addda4861c13a3739ce28718540bf45}
{\bfseries Value:}
\begin{DoxyCode}
({              \
        double out;                                     \
        asm volatile                                    \
        ("      ps_nmadd        %0, %1, %2, %3\n"       \
         : "=f"(out)                                    \
         : "f"(mul0), "f"(mul1), "f"(add)               \
        );                                              \
        out;                                            \
})
\end{DoxyCode}


Negative multiply then add Paired Singles. 


\begin{DoxyParams}{Parameters}
\item[{\em mul0}]the first multiply pair. \item[{\em mul1}]the other multiply pair. \item[{\em add}]the addition pair. \end{DoxyParams}
\begin{DoxyReturn}{Returns}
The resulting pair. 
\end{DoxyReturn}
\hypertarget{paired_8h_acd7ab9ce08d2596d33b983fd57637552}{
\index{paired.h@{paired.h}!paired\_\-nmsub@{paired\_\-nmsub}}
\index{paired\_\-nmsub@{paired\_\-nmsub}!paired.h@{paired.h}}
\subsubsection[{paired\_\-nmsub}]{\setlength{\rightskip}{0pt plus 5cm}\#define paired\_\-nmsub(mul0, \/  mul1, \/  sub)}}
\label{paired_8h_acd7ab9ce08d2596d33b983fd57637552}
{\bfseries Value:}
\begin{DoxyCode}
({              \
        double out;                                     \
        asm volatile                                    \
        ("      ps_nmsub        %0, %1, %2, %3\n"       \
         : "=f"(out)                                    \
         : "f"(mul0), "f"(mul1), "f"(sub)               \
        );                                              \
        out;                                            \
})
\end{DoxyCode}


Negative multiply then subtract Paired Singles. 


\begin{DoxyParams}{Parameters}
\item[{\em mul0}]the first multiply pair. \item[{\em mul1}]the other multiply pair. \item[{\em sub}]the subtraction pair. \end{DoxyParams}
\begin{DoxyReturn}{Returns}
The resulting pair. 
\end{DoxyReturn}
\hypertarget{paired_8h_a40aa1aac31a1ee67150efbb3809ba94c}{
\index{paired.h@{paired.h}!paired\_\-reciprocal@{paired\_\-reciprocal}}
\index{paired\_\-reciprocal@{paired\_\-reciprocal}!paired.h@{paired.h}}
\subsubsection[{paired\_\-reciprocal}]{\setlength{\rightskip}{0pt plus 5cm}\#define paired\_\-reciprocal(pair)}}
\label{paired_8h_a40aa1aac31a1ee67150efbb3809ba94c}
{\bfseries Value:}
\begin{DoxyCode}
({              \
        double out;                             \
        asm volatile                            \
        ("      ps_res          %0, %1\n"       \
         : "=f"(out)                            \
         : "f"(pair)                            \
        );                                      \
        out;                                    \
})
\end{DoxyCode}


Estimated reciprocal of a Paired Single. 


\begin{DoxyParams}{Parameters}
\item[{\em pair}]the pair to get the estimated reciprocal of. \end{DoxyParams}
\begin{DoxyReturn}{Returns}
The resulting pair. 
\end{DoxyReturn}
\hypertarget{paired_8h_ae9c7df19dba515bee78b1c19865d2ef2}{
\index{paired.h@{paired.h}!paired\_\-select@{paired\_\-select}}
\index{paired\_\-select@{paired\_\-select}!paired.h@{paired.h}}
\subsubsection[{paired\_\-select}]{\setlength{\rightskip}{0pt plus 5cm}\#define paired\_\-select(sel, \/  pos, \/  neg)}}
\label{paired_8h_ae9c7df19dba515bee78b1c19865d2ef2}
{\bfseries Value:}
\begin{DoxyCode}
({                      \
        double out;                                     \
        asm volatile                                    \
        ("      ps_sel          %0, %1, %2, %3\n"       \
         : "=f"(out)                                    \
         : "f"(sel), "f"(pos), "f"(neg)                 \
        );                                              \
        out;                                            \
})
\end{DoxyCode}


Select. 

if(sel(ps0) $>$= 0) ret(ps0) = pos(ps0) else ret(ps0) = neg(ps0) if(sel(ps1) $>$= 0) ret(ps1) = pos(ps1) else ret(ps1) = neg(ps1) 
\begin{DoxyParams}{Parameters}
\item[{\em sel}]the selector pair. \item[{\em pos}]the pair to use for positives. \item[{\em neg}]the pair to use for negatives. \end{DoxyParams}
\begin{DoxyReturn}{Returns}
The resulting pair 
\end{DoxyReturn}
\hypertarget{paired_8h_a593a51b2b50fda0e05f19586c21307ee}{
\index{paired.h@{paired.h}!paired\_\-sqrt\_\-reciprocal@{paired\_\-sqrt\_\-reciprocal}}
\index{paired\_\-sqrt\_\-reciprocal@{paired\_\-sqrt\_\-reciprocal}!paired.h@{paired.h}}
\subsubsection[{paired\_\-sqrt\_\-reciprocal}]{\setlength{\rightskip}{0pt plus 5cm}\#define paired\_\-sqrt\_\-reciprocal(pair)}}
\label{paired_8h_a593a51b2b50fda0e05f19586c21307ee}
{\bfseries Value:}
\begin{DoxyCode}
({              \
        double out;                             \
        asm volatile                            \
        ("      ps_rsqrte       %0, %1\n"       \
         : "=f"(out)                            \
         : "f"(pair)                            \
        );                                      \
        out;                                    \
})
\end{DoxyCode}


Estimated reciprocal of the square root of a Paired Single. 


\begin{DoxyParams}{Parameters}
\item[{\em pair}]the pair to get the estimated reciprocal of the square root of. \end{DoxyParams}
\begin{DoxyReturn}{Returns}
The resulting pair. 
\end{DoxyReturn}
\hypertarget{paired_8h_a85b459759c11bb5cb3612c3859cdf035}{
\index{paired.h@{paired.h}!paired\_\-store@{paired\_\-store}}
\index{paired\_\-store@{paired\_\-store}!paired.h@{paired.h}}
\subsubsection[{paired\_\-store}]{\setlength{\rightskip}{0pt plus 5cm}\#define paired\_\-store(gqr, \/  data, \/  single, \/  pair)}}
\label{paired_8h_a85b459759c11bb5cb3612c3859cdf035}
{\bfseries Value:}
\begin{DoxyCode}
asm volatile                                    \
        ("      psq_st          %1, %0, 0, %3\n"        \
         : "=m"(data)                                   \
         : "f"(pair), "i"(single), "i"(gqr)             \
        );
\end{DoxyCode}


Stores a Paired Single. 


\begin{DoxyParams}{Parameters}
\item[{\em gqr}]the GQR to use for quantization of the data. \item[{\em data}]a pointer to which the data quantized from the paired single will be placed. Must a 2-\/element array. \item[{\em single}]if this is non-\/zero, only one number will be quantized from PS0. \item[{\em pair}]A double containing the paired singles. \end{DoxyParams}
\hypertarget{paired_8h_a94237f7731a4de0b37a9ee71443d987f}{
\index{paired.h@{paired.h}!paired\_\-sub@{paired\_\-sub}}
\index{paired\_\-sub@{paired\_\-sub}!paired.h@{paired.h}}
\subsubsection[{paired\_\-sub}]{\setlength{\rightskip}{0pt plus 5cm}\#define paired\_\-sub(uend, \/  hend)}}
\label{paired_8h_a94237f7731a4de0b37a9ee71443d987f}
{\bfseries Value:}
\begin{DoxyCode}
({              \
        double out;                             \
        asm volatile                            \
        ("      ps_sub          %0, %1, %2\n"   \
         : "=f"(out)                            \
         : "f"(uend), "f"(hend)                 \
        );                                      \
        out;                                    \
})
\end{DoxyCode}


Subtract Paired Singles. 


\begin{DoxyParams}{Parameters}
\item[{\em uend}]the minuend. \item[{\em hend}]the subtrahend. \end{DoxyParams}
\begin{DoxyReturn}{Returns}
The difference pair. 
\end{DoxyReturn}
\hypertarget{paired_8h_a8ac9948aba755765cdcc2d68b6d25b21}{
\index{paired.h@{paired.h}!paired\_\-sum0@{paired\_\-sum0}}
\index{paired\_\-sum0@{paired\_\-sum0}!paired.h@{paired.h}}
\subsubsection[{paired\_\-sum0}]{\setlength{\rightskip}{0pt plus 5cm}\#define paired\_\-sum0(pair0, \/  pair1, \/  pair2)}}
\label{paired_8h_a8ac9948aba755765cdcc2d68b6d25b21}
{\bfseries Value:}
\begin{DoxyCode}
({              \
        double out;                                     \
        asm volatile                                    \
        ("      ps_sum0         %0, %1, %2, %3\n"       \
         : "=f"(out)                                    \
         : "f"(pair0), "f"(pair2), "f"(pair1)           \
        );                                              \
        out;                                            \
})
\end{DoxyCode}


Vector Sum high. 


\begin{DoxyParams}{Parameters}
\item[{\em pair0}]the first addition pair. (only PS0 used) \item[{\em pair1}]the second addition pair. (only PS1 used) \item[{\em pair2}]the copy pair. (only PS1 used) \end{DoxyParams}
\begin{DoxyReturn}{Returns}
The resulting pair. 
\end{DoxyReturn}
\hypertarget{paired_8h_afad4df0bc3963c71015127fb686fed0e}{
\index{paired.h@{paired.h}!paired\_\-sum1@{paired\_\-sum1}}
\index{paired\_\-sum1@{paired\_\-sum1}!paired.h@{paired.h}}
\subsubsection[{paired\_\-sum1}]{\setlength{\rightskip}{0pt plus 5cm}\#define paired\_\-sum1(pair0, \/  pair1, \/  pair2)}}
\label{paired_8h_afad4df0bc3963c71015127fb686fed0e}
{\bfseries Value:}
\begin{DoxyCode}
({              \
        double out;                                     \
        asm volatile                                    \
        ("      ps_sum1         %0, %1, %2, %3\n"       \
         : "=f"(out)                                    \
         : "f"(pair0), "f"(pair2), "f"(pair1)           \
        );                                              \
        out;                                            \
})
\end{DoxyCode}


Vector Sum low. 


\begin{DoxyParams}{Parameters}
\item[{\em pair0}]the first addition pair. (only PS0 used) \item[{\em pair1}]the second addition pair. (only PS1 used) \item[{\em pair2}]the copy pair. (only PS0 used) \end{DoxyParams}
\begin{DoxyReturn}{Returns}
The resulting pair. 
\end{DoxyReturn}


\subsection{Enumeration Type Documentation}
\hypertarget{paired_8h_ab75676e53da2f419fbfe8d841959959c}{
\index{paired.h@{paired.h}!gqr\_\-type\_\-t@{gqr\_\-type\_\-t}}
\index{gqr\_\-type\_\-t@{gqr\_\-type\_\-t}!paired.h@{paired.h}}
\subsubsection[{gqr\_\-type\_\-t}]{\setlength{\rightskip}{0pt plus 5cm}enum {\bf gqr\_\-type\_\-t}}}
\label{paired_8h_ab75676e53da2f419fbfe8d841959959c}
De/quantization formats \begin{Desc}
\item[Enumerator: ]\par
\begin{description}
\index{GQR\_\-TYPE\_\-FLOAT@{GQR\_\-TYPE\_\-FLOAT}!paired.h@{paired.h}}\index{paired.h@{paired.h}!GQR\_\-TYPE\_\-FLOAT@{GQR\_\-TYPE\_\-FLOAT}}\item[{\em 
\hypertarget{paired_8h_ab75676e53da2f419fbfe8d841959959ca18820c8dd445ccc1ec6c7dc547379b6d}{
GQR\_\-TYPE\_\-FLOAT}
\label{paired_8h_ab75676e53da2f419fbfe8d841959959ca18820c8dd445ccc1ec6c7dc547379b6d}
}]Floating point (no scale) \index{GQR\_\-TYPE\_\-U8@{GQR\_\-TYPE\_\-U8}!paired.h@{paired.h}}\index{paired.h@{paired.h}!GQR\_\-TYPE\_\-U8@{GQR\_\-TYPE\_\-U8}}\item[{\em 
\hypertarget{paired_8h_ab75676e53da2f419fbfe8d841959959caa81c9600eba7b6aa9bef1407ac85f2ef}{
GQR\_\-TYPE\_\-U8}
\label{paired_8h_ab75676e53da2f419fbfe8d841959959caa81c9600eba7b6aa9bef1407ac85f2ef}
}]Unsigned 8bit integer \index{GQR\_\-TYPE\_\-U16@{GQR\_\-TYPE\_\-U16}!paired.h@{paired.h}}\index{paired.h@{paired.h}!GQR\_\-TYPE\_\-U16@{GQR\_\-TYPE\_\-U16}}\item[{\em 
\hypertarget{paired_8h_ab75676e53da2f419fbfe8d841959959cac5e2c62d1d1c67f619e7f9b0964a6e3f}{
GQR\_\-TYPE\_\-U16}
\label{paired_8h_ab75676e53da2f419fbfe8d841959959cac5e2c62d1d1c67f619e7f9b0964a6e3f}
}]Unsigned 16bit integer \index{GQR\_\-TYPE\_\-S8@{GQR\_\-TYPE\_\-S8}!paired.h@{paired.h}}\index{paired.h@{paired.h}!GQR\_\-TYPE\_\-S8@{GQR\_\-TYPE\_\-S8}}\item[{\em 
\hypertarget{paired_8h_ab75676e53da2f419fbfe8d841959959cabc025a12d1506789de315bf3b7a29916}{
GQR\_\-TYPE\_\-S8}
\label{paired_8h_ab75676e53da2f419fbfe8d841959959cabc025a12d1506789de315bf3b7a29916}
}]Signed 8bit integer \index{GQR\_\-TYPE\_\-S16@{GQR\_\-TYPE\_\-S16}!paired.h@{paired.h}}\index{paired.h@{paired.h}!GQR\_\-TYPE\_\-S16@{GQR\_\-TYPE\_\-S16}}\item[{\em 
\hypertarget{paired_8h_ab75676e53da2f419fbfe8d841959959cac4849571089297ae093e54439af2f5df}{
GQR\_\-TYPE\_\-S16}
\label{paired_8h_ab75676e53da2f419fbfe8d841959959cac4849571089297ae093e54439af2f5df}
}]Signed 16bit integer \end{description}
\end{Desc}



\subsection{Function Documentation}
\hypertarget{paired_8h_a450b1eec4bf8ae28822f4b9a00c294b2}{
\index{paired.h@{paired.h}!paired\_\-get\_\-gqr@{paired\_\-get\_\-gqr}}
\index{paired\_\-get\_\-gqr@{paired\_\-get\_\-gqr}!paired.h@{paired.h}}
\subsubsection[{paired\_\-get\_\-gqr}]{\setlength{\rightskip}{0pt plus 5cm}void paired\_\-get\_\-gqr (int {\em gqr}, \/  int {\em mode}, \/  {\bf gqr\_\-type\_\-t} $\ast$ {\em type}, \/  int $\ast$ {\em scale})}}
\label{paired_8h_a450b1eec4bf8ae28822f4b9a00c294b2}


Gets information from a GQR. 


\begin{DoxyParams}{Parameters}
\item[{\em gqr}]which GQR to obtain information from. \item[{\em mode}]whether to get load or store information. 0 for store, 1 for load. \item[{\em type}]a pointer to a variable to hold the conversion type. \item[{\em scale}]a pointer to a variable to hold the conversion scale value. \end{DoxyParams}
\begin{DoxySeeAlso}{See also}
\hyperlink{paired_8h_ad1d8b84d00bf61a250e8e1357a191131}{paired\_\-set\_\-gqr()} 
\end{DoxySeeAlso}
\hypertarget{paired_8h_ad1d8b84d00bf61a250e8e1357a191131}{
\index{paired.h@{paired.h}!paired\_\-set\_\-gqr@{paired\_\-set\_\-gqr}}
\index{paired\_\-set\_\-gqr@{paired\_\-set\_\-gqr}!paired.h@{paired.h}}
\subsubsection[{paired\_\-set\_\-gqr}]{\setlength{\rightskip}{0pt plus 5cm}void paired\_\-set\_\-gqr (int {\em gqr}, \/  int {\em mode}, \/  {\bf gqr\_\-type\_\-t} {\em type}, \/  int {\em scale})}}
\label{paired_8h_ad1d8b84d00bf61a250e8e1357a191131}


Sets up a GQR. 

This function loads a Graphics Quantization Register with the specified parameters, to prepare for loading a Paired Single. 
\begin{DoxyParams}{Parameters}
\item[{\em gqr}]which GQR to load. \item[{\em mode}]whether to change the load or store information. 0 for store, 1 for load. \item[{\em type}]the conversion type. (as described by the gqr\_\-load\_\-t enum) \item[{\em scale}]the conversion scale value. This is only applied to integer types, and a signed integer that scales as in val = num / (2$^\wedge$scale). \end{DoxyParams}
\begin{DoxySeeAlso}{See also}
\hyperlink{paired_8h_a450b1eec4bf8ae28822f4b9a00c294b2}{paired\_\-get\_\-gqr()} 
\end{DoxySeeAlso}
