Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] View of /trunk/doc/diderot.tex
ViewVC logotype

View of /trunk/doc/diderot.tex

Parent Directory Parent Directory | Revision Log Revision Log


Revision 18 - (download) (as text) (annotate)
Fri Jan 15 02:36:12 2010 UTC (9 years, 9 months ago) by jhr
File size: 4562 byte(s)
  Added tensor+/-field operations
\documentclass[11pt]{article}

\input{defs}

\setlength{\textwidth}{6in}
\setlength{\oddsidemargin}{0.25in}
\setlength{\evensidemargin}{0.25in}
\setlength{\parskip}{5pt}

\title{Diderot design}
\author{
  Gordon Kindlmann \\
  University of Chicago \\
  {\small\tt{}glk@cs.uchicago.edu} \\
\and
  John Reppy \\
  University of Chicago \\
  {\small\tt{}jhr@cs.uchicago.edu} \\
\and
  Thomas Schultz \\
  University of Chicago \\
  {\small\tt{}t.schultz@uchicago.edu} \\
}
\date{\today}

\begin{document}

\maketitle
\thispagestyle{empty}

\section{Introduction}
This document is a semi-formal design of Dedierot.

\section{Types}
The syntax of Diderot types is given in \figref{fig:types}.
\begin{figure}[t]
  \begin{displaymath}
    \begin{array}{rclr}
      \rho  & ::= & $\ldots$ & \text{NNRD types} \\[1em]
      \iota & ::= & \TYbool & \text{booleans} \\
           & \mid & \TYint & \text{integers} \\[1em]
      \theta & ::= & \TYtensor{o}{d} & \text{tensors of order $o$ and dimension $d$} \\[1em]
      \tau & ::= & \iota \\
           & \mid & \theta \\
           & \mid & \TYmatrix{n}{m} & \text{$n\times{}m$ matrix} \\
           & \mid & \TYimage{d}{\rho} & \text{image of dimension $d$ and $\rho$ elements}\\
           & \mid & \TYkern{k} & \text{convolution kernel with $k$ derivatives} \\
           & \mid & \TYfield{k}{d}{\theta} & \text{$d$-dimension field of $\theta$ values and $k$ derivatives} \\
    \end{array}%
  \end{displaymath}%
  where $o\in\Nat$ is the tensor order, $d,n,m\in\SET{2,3}$ are dimensions,
  and $k\in\Nat$ is the differentiability of a field.
  \caption{Diderot types}
  \label{fig:types}
\end{figure}%
We use some type abbreviations for common cases:
\begin{eqnarray*}
  \TYreal & = & \TYtensor{0}{d} \quad\text{for any $d$} \\
  \TYvec{d} & = & \TYtensor{1}{d}
\end{eqnarray*}%

\section{Operations}

\subsection{Scalar operations}
\noindent{}Arithmetic:
\begin{displaymath}
  \begin{array}{cl}
    \BinopTy{{\odot}}{\tau}{\tau}{\tau}
    & \text{for $\odot\in\SET{{+},{-},{*},{/}}$ and $\tau\in\SET{\TYint,\TYreal}$} \\
    \UnopTy{{-}}{\tau}{\tau}
    & \text{for $\tau\in\SET{\TYint,\TYreal}$}
  \end{array}%
\end{displaymath}%

\noindent{}Comparisons:
\begin{displaymath}
  \BinopTy{{\odot}}{\tau}{\tau}{\TYbool}
  \qquad\text{for $\odot\in\SET{{<},{\leq},{=},{\neq}{>},{\geq}}$ and $\tau\in\SET{\TYint,\TYreal}$}
\end{displaymath}%


\subsection{Matrix operations}

\subsection{Tensor operations}

\noindent{}Scalar multiplication:
\begin{displaymath}
  \begin{array}{c}
    \BinopTy{{*}}{\TYreal}{\TYtensor{o}{d}}{\TYtensor{o}{d}} \\
    \BinopTy{{*}}{\TYtensor{o}{d}}{\TYreal}{\TYtensor{o}{d}}
  \end{array}%
\end{displaymath}%

\noindent{}Scalar division:
\begin{displaymath}
  \BinopTy{{/}}{\TYtensor{o}{d}}{\TYreal}{\TYtensor{o}{d}}
\end{displaymath}%

\noindent{}Addition:
\begin{displaymath}
  \BinopTy{{\odot}}{\TYtensor{o}{d}}{\TYtensor{o}{d}}{\TYtensor{o}{d}}
  \qquad\text{for $\odot\in\SET{{+},{-}}$}
\end{displaymath}%

\noindent{}Negation:
\begin{displaymath}
  \UnopTy{-}{\TYtensor{o}{d}}{\TYtensor{o}{d}}
\end{displaymath}%

\subsection{Field operations}

\noindent{}Creation from an image:
\begin{displaymath}
  \BinopTy{\OPsample}{\TYkern{k}}{\TYimage{d}{\rho}}{\TYfield{k}{d}{\theta}}
  \qquad\text{where $\theta$ is the real conversion of $\rho$.}
\end{displaymath}%

\noindent{}Scalar multiplication:
\begin{displaymath}
  \begin{array}{c}
    \BinopTy{{*}}{\TYreal}{\TYfield{k}{d}{\theta}}{\TYfield{k}{d}{\theta}} \\
    \BinopTy{{*}}{\TYfield{k}{d}{\theta}}{\TYreal}{\TYfield{k}{d}{\theta}}
  \end{array}%
\end{displaymath}%

\noindent{}Scalar division:
\begin{displaymath}
  \BinopTy{{/}}{\TYfield{k}{d}{\theta}}{\TYreal}{\TYfield{k}{d}{\theta}}
\end{displaymath}%

\noindent{}Addition:
\begin{displaymath}
  \BinopTy{{\odot}}{\TYfield{k_1}{d}{\theta}}{\TYfield{k_2}{d}{\theta}}{\TYfield{\min(k_1,k_2)}{d}{\theta}}
  \qquad\text{for $\odot\in\SET{{+},{-}}$}
\end{displaymath}%

\noindent{}Differentiation:
\begin{displaymath}
  \UnopTy{\OPdiff}{\TYfield{k}{d}{\TYtensor{o}{d}}}{\TYfield{k-1}{d}{\TYtensor{o+1}{d}}}
  \qquad\text{for $k > 0$}
\end{displaymath}%

\noindent{}Probing:
\begin{displaymath}
  \BinopTy{@}{\TYfield{k}{d}{\theta}}{\TYvec{d}}{\theta}
\end{displaymath}%

\noindent{}Tensor arithmetic:
\begin{displaymath}
  \begin{array}{c}
    \BinopTy{{\odot}}{\TYfield{k}{d}{\tau}}{\tau}{\TYfield{k}{d}{\tau}} \\
    \BinopTy{{\odot}}{\tau}{\TYfield{k}{d}{\tau}}{\TYfield{k}{d}{\tau}}
  \end{array}  \qquad\text{for $\odot\in\SET{{+},{-}}$}
\end{displaymath}%

\end{document}

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0