cps-16-mic

Ускорение обучения глубокой нейронной сети путем оптимизации алгоритма для запуска на MIC архитектуре
git clone https://git.igankevich.com/cps-16-mic.git
Log | Files | Refs

pmstyle.sty (8528B)


      1 %%%%%%%%%%%%%%%%%%%%%%%
      2 %%% Стилевой файл   %%%
      3 %%%%%%%%%%%%%%%%%%%%%%%
      4 
      5 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      6 %%% Дата последнего изменения: 24.01.2016
      7 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      8 
      9 %%% Подключаем необходимые пакеты %%%
     10 \usepackage{ifthen}
     11 \usepackage[utf8]{inputenc}
     12 \usepackage[russian]{babel}
     13 \usepackage{amsmath,amsfonts,amssymb}
     14 
     15 \usepackage{floatrow}
     16 \usepackage[dvips]{graphicx}
     17 \usepackage{verbatim}
     18 \usepackage{wrapfig}
     19 \usepackage{url}
     20 
     21 %%% Заголовок %%%
     22 \def\maketitle{
     23 
     24 {\raggedright \@udk \par \smallskip {\bf\@author} \par}
     25 
     26 \bigskip
     27 {\centering\large\bf\@title\par} \par
     28 \bigskip
     29 }
     30 
     31 \def\udk#1{\gdef\@udk{#1}}
     32 \def\@udk{УДК}
     33 
     34 %%% Рекомендации %%%
     35 \def\recprof#1{\noindent\textit{Рекомендовано к публикации профессором #1}\bigskip\vskip-0.3cm}
     36 
     37 \def\recdotz#1{\noindent\textit{Рекомендовано к публикации доцентом #1}\bigskip\vskip-0.3cm}
     38 
     39 \def\recsp#1{\noindent\textit{Рекомендовано к публикации старшим преподавателем\newline{}#1}\bigskip\vskip-0.3cm}
     40 
     41 \def\norec{\bigskip\vskip-0.3cm\vskip-0.3cm}
     42 
     43 %%% Разделы %%%
     44 %% Ненумерованный/нумерованный с заголовками 3-х уровней
     45 \newcounter{c_sec}
     46 \newcounter{c_sec2}
     47 \newcounter{c_sec3}
     48 \setcounter{c_sec}{0}
     49 \newcommand{\secn}{\arabic{c_sec}.}
     50 \newcommand{\subsecn}{\secn\arabic{c_sec2}.}
     51 \newcommand{\subsubsecn}{\subsecn\arabic{c_sec3}.}
     52 \newcommand{\razdel}[2][numbered]{\par\ifthenelse{\equal{#1}{numbered}}
     53 {\addtocounter{c_sec}{+1}\setcounter{c_sec2}{0}\vspace{0.2cm}\textbf{\secn\,\,#2.}}%
     54 {\vspace{0.2cm}\textbf{#2.}}}%
     55 \newcommand{\podrazdel}[1]{\par\addtocounter{c_sec2}{+1}\setcounter{c_sec3}{0}\hspace{0.3cm}\textbf{\subsecn\,\,#1.}}%
     56 \newcommand{\podpodrazdel}[1]{\par\addtocounter{c_sec3}{+1}\hspace{0.3cm}\textbf{\subsubsec\,\,#1.}}%
     57 
     58 %%% Теоремы %%%
     59 \newcounter{c_teo}
     60 \setcounter{c_teo}{0}
     61 \newcounter{c_lem}
     62 \setcounter{c_lem}{0}
     63 \newcounter{c_gip}
     64 \setcounter{c_gip}{0}
     65 \newcounter{c_utv}
     66 \setcounter{c_utv}{0}
     67 \newcounter{c_opr}
     68 \setcounter{c_opr}{0}
     69 \newcounter{c_zam}
     70 \setcounter{c_zam}{0}
     71 \newcounter{c_pri}
     72 \setcounter{c_pri}{0}
     73 \newcounter{c_sle}
     74 \setcounter{c_sle}{0}
     75 
     76 \newcommand{\theorn}{\arabic{c_teo}}
     77 \newcommand{\Theorem}[2][numbered]{\par\setcounter{c_sle}{0}\ifthenelse{\equal{#1}{numbered}}%
     78 {\addtocounter{c_teo}{+1}\par\textbf{Теорема\,\,\theorn.}\textit{ #2}}%
     79 {\par\textbf{Теорема.}\textit{ #2}}}%
     80 \newcommand{\TheoremCite}[3][numbered]{\par\setcounter{c_sle}{0}\ifthenelse{\equal{#1}{numbered}}%
     81 {\addtocounter{c_teo}{+1}\par\textbf{Теорема\,\,\theorn}\,\,\cite{#2}.\textit{ #3}}%
     82 {\par\textbf{Теорема}\,\,\cite{#2}.\textit{ #3}}}%
     83 
     84 \newcommand{\lemman}{\arabic{c_lem}}
     85 \newcommand{\Lemma}[2][numbered]{\par\ifthenelse{\equal{#1}{numbered}}%
     86 {\addtocounter{c_lem}{+1}\par\textbf{Лемма\,\,\lemman.}\textit{ #2}}%
     87 {\par\textbf{Лемма.}\textit{ #2}}}%
     88 \newcommand{\LemmaCite}[3][numbered]{\par\ifthenelse{\equal{#1}{numbered}}%
     89 {\addtocounter{c_lem}{+1}\par\textbf{Лемма\,\,\lemman}\,\,\cite{#2}.\textit{ #3}}%
     90 {\par\textbf{Лемма}\,\,\cite{#2}.\textit{ #3}}}%
     91 
     92 \newcommand{\hypotn}{\arabic{c_gip}}
     93 \newcommand{\Hypothesis}[2][numbered]{\par\ifthenelse{\equal{#1}{numbered}}%
     94 {\addtocounter{c_gip}{+1}\par\textbf{Гипотеза\,\,\hypotn.}\textit{ #2}}%
     95 {\par\textbf{Гипотеза.}\textit{ #2}}}%
     96 \newcommand{\HypothesisCite}[3][numbered]{\par\ifthenelse{\equal{#1}{numbered}}%
     97 {\addtocounter{c_gip}{+1}\par\textbf{Гипотеза\,\,\hypotn}\,\,\cite{#2}.\textit{ #3}}%
     98 {\par\textbf{Гипотеза}\,\,\cite{#2}.\textit{ #3}}}%
     99 
    100 \newcommand{\staten}{\arabic{c_utv}}
    101 \newcommand{\Statement}[2][numbered]{\par\ifthenelse{\equal{#1}{numbered}}%
    102 {\addtocounter{c_utv}{+1}\par\textbf{Утверждение\,\,\staten.}\textit{ #2}}%
    103 {\par\textbf{Утверждение.}\textit{ #2}}}%
    104 \newcommand{\StatementCite}[3][numbered]{\par\ifthenelse{\equal{#1}{numbered}}%
    105 {\addtocounter{c_utv}{+1}\par\textbf{Утверждение\,\,\staten}\,\,\cite{#2}.\textit{ #3}}%
    106 {\par\textbf{Утверждение}\,\,\cite{#2}.\textit{ #3}}}%
    107 
    108 \newcommand{\definn}{\arabic{c_opr}}
    109 \newcommand{\Definition}[1][numbered]{\par\ifthenelse{\equal{#1}{numbered}}%
    110 {\addtocounter{c_opr}{+1}\par\textbf{Определение\,\,\definn.\,}}%
    111 {\par\textbf{Определение.}}}%
    112 \newcommand{\DefinitionCite}[2][numbered]{\par\ifthenelse{\equal{#1}{numbered}}%
    113 {\addtocounter{c_opr}{+1}\par\textbf{Определение\,\,\definn}\,\,\cite{#2}.}%
    114 {\par\textbf{Определение}\,\,\cite{#2}.}}%
    115 
    116 \newcommand{\Proof}{\par\textbf{Доказательство.} }
    117 
    118 \newcommand{\exampn}{\arabic{c_pri}}
    119 \newcommand{\Example}[1][numbered]{\par\ifthenelse{\equal{#1}{numbered}}%
    120 {\addtocounter{c_pri}{+1}\par\textbf{Пример\,\,\exampn.}}%
    121 {\par\textbf{Пример.}}}%
    122 \newcommand{\ExampleCite}[2][numbered]{\par\ifthenelse{\equal{#1}{numbered}}%
    123 {\addtocounter{c_pri}{+1}\par\textbf{Пример\,\,\exampn}\,\,\cite{#2}.}%
    124 {\par\textbf{Пример}\,\,\cite{#2}.}}%
    125 
    126 \newcommand{\remrkn}{\arabic{c_zam}}
    127 \newcommand{\Remark}[1][numbered]{\par\ifthenelse{\equal{#1}{numbered}}%
    128 {\addtocounter{c_zam}{+1}\par\textbf{Замечание\,\,\remrkn.}}%
    129 {\par\textbf{Замечание.}}}%
    130 \newcommand{\RemarkCite}[2][numbered]{\par\ifthenelse{\equal{#1}{numbered}}%
    131 {\addtocounter{c_zam}{+1}\par\textbf{Замечание\,\,\remrkn}\,\,\cite{#2}.}%
    132 {\par\textbf{Замечание}\,\,\cite{#2}.}}%
    133 
    134 \newcommand{\coroln}{\arabic{c_sle}}
    135 \newcommand{\Corollary}[2][numbered]{\par\ifthenelse{\equal{#1}{numbered}}%
    136 {\addtocounter{c_sle}{+1}\par\textbf{Следствие\,\,\coroln.}\textit{ #2}}%
    137 {\par\textbf{Следствие.}\textit{ #2}}}%
    138 \newcommand{\CorollaryCite}[3][numbered]{\par\ifthenelse{\equal{#1}{numbered}}%
    139 {\addtocounter{c_sle}{+1}\par\textbf{Следствие,\,\coroln}\,\,\cite{#2}.\textit{ #3}}%
    140 {\par\textbf{Следствие}\,\,\cite{#2}.\textit{ #3}}}%
    141 
    142 %%% Таблицы %%%
    143 \newcounter{c_tab}
    144 \setcounter{c_tab}{0}
    145 \newcommand{\tabn}{\arabic{c_tab}}
    146 \newcommand{\nextline}{\tabularnewline\hline}
    147 \newcommand{\Table}[5][numbered]{\par\vspace{-0.3cm}\begin{flushright}\ifthenelse{\equal{#1}{numbered}}%
    148 {\addtocounter{c_tab}{+1}{\footnotesize\textbf{Таблица\,\,\tabn.} #2}}%
    149 {{\footnotesize\textbf{Таблица.} #2}}%
    150 \end{flushright}\vspace{-0.5cm}\par{\footnotesize\begin{center}\begin{tabular}{#3}\hline#4\end{tabular}\end{center}}}%
    151 
    152 %%% Рисунки %%%
    153 \renewcommand{\@makecaption}[2]{%
    154 \abovecaptionskip=-5pt
    155 \belowcaptionskip=-27pt
    156 \vspace{\abovecaptionskip}%
    157 \sbox{\@tempboxa}{{\footnotesize {\textbf{#1.}} #2}}
    158 \ifdim \wd\@tempboxa > \hsize
    159     \begin{center} {\footnotesize {\textbf{#1.}} #2} \par \end{center}
    160 \else
    161     \global\@minipagefalse
    162     \hbox to \hsize {\footnotesize \hfil{\textbf{#1.}} #2\hfil}%
    163 \fi
    164 \vspace{\belowcaptionskip}}
    165 
    166 \newcommand{\Figure}[3]{\begin{figure}[h]\begin{center}\includegraphics[width=#1]{#2}\caption{#3\vspace{ 1cm}}\end{center}\end{figure}}
    167 
    168 \newcommand{\WrapFigure}[5]{\begin{wrapfigure}[#1]{l}{#2}
    169 \includegraphics[width=#3]{#4}\caption{#5}
    170 \end{wrapfigure}\vspace{0.3cm}}
    171 
    172 \newcommand{\WrapFigureR}[5]{\begin{wrapfigure}[#1]{r}{#2}
    173 \includegraphics[width=#3]{#4}\caption{#5}
    174 \end{wrapfigure}\vspace{0.3cm}}
    175 
    176 %%% Списки %%%
    177 \newcommand{\ITEM}{\vspace{-0.2cm}\item}
    178 \newcommand{\MList}[1]{\par\begin{itemize}#1\end{itemize}}
    179 \newcommand{\NList}[1]{\par\begin{enumerate}#1\end{enumerate}}
    180 
    181 
    182 \pagestyle{empty}
    183 \textwidth 110mm
    184 \textheight 165mm
    185 \oddsidemargin 24mm
    186 \topmargin 2.7cm
    187 \renewcommand\@biblabel[1]{#1.}
    188 %\AtBeginDocument{\def\refname{Литература}}
    189 \renewenvironment{thebibliography}[1]
    190      {\vskip12pt plus3pt minus6pt
    191       {\centering\large\bf Литература\par}%
    192       \medskip
    193       \list{\@biblabel{\@arabic\c@enumiv}}%
    194            {\settowidth\labelwidth{\@biblabel{#1}}%
    195             \leftmargin\labelwidth
    196             \advance\leftmargin\labelsep
    197             \@openbib@code
    198             \usecounter{enumiv}%
    199             \let\p@enumiv\@empty
    200             \renewcommand\theenumiv{\@arabic\c@enumiv}}%
    201       \sloppy
    202       \clubpenalty4000
    203       \@clubpenalty \clubpenalty
    204       \widowpenalty4000%
    205       \sfcode`\.\@m}
    206      {\def\@noitemerr
    207        {\@latex@warning{Empty `thebibliography' environment}}%
    208       \endlist}
    209 
    210 \tolerance=1000