code
stringlengths
1
2.01M
repo_name
stringlengths
3
62
path
stringlengths
1
267
language
stringclasses
231 values
license
stringclasses
13 values
size
int64
1
2.01M
\hypertarget{struct_a_l_s_vertices_in_mem_program}{\section{A\-L\-S\-Vertices\-In\-Mem\-Program Struct Reference} \label{struct_a_l_s_vertices_in_mem_program}\index{A\-L\-S\-Vertices\-In\-Mem\-Program@{A\-L\-S\-Vertices\-In\-Mem\-Program}} } Inheritance diagram for A\-L\-S\-Vertices\-In\-Mem\-Program\-:\begin{figure}[H] \begin{center} \leavevmode \includegraphics[height=2.000000cm]{struct_a_l_s_vertices_in_mem_program} \end{center} \end{figure} \subsection*{Public Member Functions} \begin{DoxyCompactItemize} \item \hypertarget{struct_a_l_s_vertices_in_mem_program_aa10200a9a239d9816e51f876985aec3c}{virtual void {\bfseries set\-\_\-latent\-\_\-factor} (\hyperlink{classgraphchi_1_1graphchi__vertex}{graphchi\-\_\-vertex}$<$ Vertex\-Data\-Type, Edge\-Data\-Type $>$ \&vertex, \hyperlink{structlatentvec__t}{latentvec\-\_\-t} \&fact)}\label{struct_a_l_s_vertices_in_mem_program_aa10200a9a239d9816e51f876985aec3c} \item void \hyperlink{struct_a_l_s_vertices_in_mem_program_ad9a6a2fdf9c1e996b89ebef238a45de1}{before\-\_\-iteration} (int iteration, \hyperlink{structgraphchi_1_1graphchi__context}{graphchi\-\_\-context} \&gcontext) \item void \hyperlink{struct_a_l_s_vertices_in_mem_program_a79ab59ee2ac716c0a4c7489c5bffe987}{update} (\hyperlink{classgraphchi_1_1graphchi__vertex}{graphchi\-\_\-vertex}$<$ Vertex\-Data\-Type, Edge\-Data\-Type $>$ \&vertex, \hyperlink{structgraphchi_1_1graphchi__context}{graphchi\-\_\-context} \&gcontext) \item void \hyperlink{struct_a_l_s_vertices_in_mem_program_ad5f96d529e7b579610944c660269b136}{after\-\_\-iteration} (int iteration, \hyperlink{structgraphchi_1_1graphchi__context}{graphchi\-\_\-context} \&gcontext) \item void \hyperlink{struct_a_l_s_vertices_in_mem_program_a36db7afcd9ec22c1ddbe378f91f0fe5e}{before\-\_\-exec\-\_\-interval} (vid\-\_\-t window\-\_\-st, vid\-\_\-t window\-\_\-en, \hyperlink{structgraphchi_1_1graphchi__context}{graphchi\-\_\-context} \&gcontext) \item void \hyperlink{struct_a_l_s_vertices_in_mem_program_a0a71542edb0835aa1bedf5cc1ef83975}{after\-\_\-exec\-\_\-interval} (vid\-\_\-t window\-\_\-st, vid\-\_\-t window\-\_\-en, \hyperlink{structgraphchi_1_1graphchi__context}{graphchi\-\_\-context} \&gcontext) \end{DoxyCompactItemize} \subsection*{Public Attributes} \begin{DoxyCompactItemize} \item \hypertarget{struct_a_l_s_vertices_in_mem_program_aebf3308cb87a54caffac08cf976889cc}{std\-::vector$<$ \hyperlink{structlatentvec__t}{latentvec\-\_\-t} $>$ {\bfseries latent\-\_\-factors\-\_\-inmem}}\label{struct_a_l_s_vertices_in_mem_program_aebf3308cb87a54caffac08cf976889cc} \end{DoxyCompactItemize} \subsection*{Additional Inherited Members} \subsection{Detailed Description} Graph\-Chi programs need to subclass Graph\-Chi\-Program$<$vertex-\/type, edge-\/type$>$ class. The main logic is usually in the update function. \subsection{Member Function Documentation} \hypertarget{struct_a_l_s_vertices_in_mem_program_a0a71542edb0835aa1bedf5cc1ef83975}{\index{A\-L\-S\-Vertices\-In\-Mem\-Program@{A\-L\-S\-Vertices\-In\-Mem\-Program}!after\-\_\-exec\-\_\-interval@{after\-\_\-exec\-\_\-interval}} \index{after\-\_\-exec\-\_\-interval@{after\-\_\-exec\-\_\-interval}!ALSVerticesInMemProgram@{A\-L\-S\-Vertices\-In\-Mem\-Program}} \subsubsection[{after\-\_\-exec\-\_\-interval}]{\setlength{\rightskip}{0pt plus 5cm}void A\-L\-S\-Vertices\-In\-Mem\-Program\-::after\-\_\-exec\-\_\-interval ( \begin{DoxyParamCaption} \item[{vid\-\_\-t}]{window\-\_\-st, } \item[{vid\-\_\-t}]{window\-\_\-en, } \item[{{\bf graphchi\-\_\-context} \&}]{gcontext} \end{DoxyParamCaption} )\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}}\label{struct_a_l_s_vertices_in_mem_program_a0a71542edb0835aa1bedf5cc1ef83975} Called after an execution interval has finished. Reimplemented from \hyperlink{classgraphchi_1_1_graph_chi_program_a9be881d1232e530c8d1852188cc8a84d}{graphchi\-::\-Graph\-Chi\-Program$<$ Vertex\-Data\-Type, Edge\-Data\-Type $>$}. \hypertarget{struct_a_l_s_vertices_in_mem_program_ad5f96d529e7b579610944c660269b136}{\index{A\-L\-S\-Vertices\-In\-Mem\-Program@{A\-L\-S\-Vertices\-In\-Mem\-Program}!after\-\_\-iteration@{after\-\_\-iteration}} \index{after\-\_\-iteration@{after\-\_\-iteration}!ALSVerticesInMemProgram@{A\-L\-S\-Vertices\-In\-Mem\-Program}} \subsubsection[{after\-\_\-iteration}]{\setlength{\rightskip}{0pt plus 5cm}void A\-L\-S\-Vertices\-In\-Mem\-Program\-::after\-\_\-iteration ( \begin{DoxyParamCaption} \item[{int}]{iteration, } \item[{{\bf graphchi\-\_\-context} \&}]{gcontext} \end{DoxyParamCaption} )\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}}\label{struct_a_l_s_vertices_in_mem_program_ad5f96d529e7b579610944c660269b136} Called after an iteration has finished. Reimplemented from \hyperlink{classgraphchi_1_1_graph_chi_program_a24259d43b85d28af16d53a4176d29a07}{graphchi\-::\-Graph\-Chi\-Program$<$ Vertex\-Data\-Type, Edge\-Data\-Type $>$}. \hypertarget{struct_a_l_s_vertices_in_mem_program_a36db7afcd9ec22c1ddbe378f91f0fe5e}{\index{A\-L\-S\-Vertices\-In\-Mem\-Program@{A\-L\-S\-Vertices\-In\-Mem\-Program}!before\-\_\-exec\-\_\-interval@{before\-\_\-exec\-\_\-interval}} \index{before\-\_\-exec\-\_\-interval@{before\-\_\-exec\-\_\-interval}!ALSVerticesInMemProgram@{A\-L\-S\-Vertices\-In\-Mem\-Program}} \subsubsection[{before\-\_\-exec\-\_\-interval}]{\setlength{\rightskip}{0pt plus 5cm}void A\-L\-S\-Vertices\-In\-Mem\-Program\-::before\-\_\-exec\-\_\-interval ( \begin{DoxyParamCaption} \item[{vid\-\_\-t}]{window\-\_\-st, } \item[{vid\-\_\-t}]{window\-\_\-en, } \item[{{\bf graphchi\-\_\-context} \&}]{gcontext} \end{DoxyParamCaption} )\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}}\label{struct_a_l_s_vertices_in_mem_program_a36db7afcd9ec22c1ddbe378f91f0fe5e} Called before an execution interval is started. Reimplemented from \hyperlink{classgraphchi_1_1_graph_chi_program_ab2f7244ddb743deb859dbc2fc927078a}{graphchi\-::\-Graph\-Chi\-Program$<$ Vertex\-Data\-Type, Edge\-Data\-Type $>$}. \hypertarget{struct_a_l_s_vertices_in_mem_program_ad9a6a2fdf9c1e996b89ebef238a45de1}{\index{A\-L\-S\-Vertices\-In\-Mem\-Program@{A\-L\-S\-Vertices\-In\-Mem\-Program}!before\-\_\-iteration@{before\-\_\-iteration}} \index{before\-\_\-iteration@{before\-\_\-iteration}!ALSVerticesInMemProgram@{A\-L\-S\-Vertices\-In\-Mem\-Program}} \subsubsection[{before\-\_\-iteration}]{\setlength{\rightskip}{0pt plus 5cm}void A\-L\-S\-Vertices\-In\-Mem\-Program\-::before\-\_\-iteration ( \begin{DoxyParamCaption} \item[{int}]{iteration, } \item[{{\bf graphchi\-\_\-context} \&}]{gcontext} \end{DoxyParamCaption} )\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}}\label{struct_a_l_s_vertices_in_mem_program_ad9a6a2fdf9c1e996b89ebef238a45de1} Called before an iteration starts. Reimplemented from \hyperlink{classgraphchi_1_1_graph_chi_program_aec6d16fd6dddf1543afe55360a653cf2}{graphchi\-::\-Graph\-Chi\-Program$<$ Vertex\-Data\-Type, Edge\-Data\-Type $>$}. \hypertarget{struct_a_l_s_vertices_in_mem_program_a79ab59ee2ac716c0a4c7489c5bffe987}{\index{A\-L\-S\-Vertices\-In\-Mem\-Program@{A\-L\-S\-Vertices\-In\-Mem\-Program}!update@{update}} \index{update@{update}!ALSVerticesInMemProgram@{A\-L\-S\-Vertices\-In\-Mem\-Program}} \subsubsection[{update}]{\setlength{\rightskip}{0pt plus 5cm}void A\-L\-S\-Vertices\-In\-Mem\-Program\-::update ( \begin{DoxyParamCaption} \item[{{\bf graphchi\-\_\-vertex}$<$ Vertex\-Data\-Type, Edge\-Data\-Type $>$ \&}]{vertex, } \item[{{\bf graphchi\-\_\-context} \&}]{gcontext} \end{DoxyParamCaption} )\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}}\label{struct_a_l_s_vertices_in_mem_program_a79ab59ee2ac716c0a4c7489c5bffe987} Vertex update function. Implements \hyperlink{classgraphchi_1_1_graph_chi_program_ad76f8881627e3c039144e261bfc77770}{graphchi\-::\-Graph\-Chi\-Program$<$ Vertex\-Data\-Type, Edge\-Data\-Type $>$}. The documentation for this struct was generated from the following file\-:\begin{DoxyCompactItemize} \item example\-\_\-apps/matrix\-\_\-factorization/\hyperlink{als__vertices__inmem_8cpp}{als\-\_\-vertices\-\_\-inmem.\-cpp}\end{DoxyCompactItemize}
09jijiangwen-download
docs/latex/struct_a_l_s_vertices_in_mem_program.tex
TeX
asf20
8,067
%!PS-Adobe-2.0 EPSF-2.0 %%Title: ClassName %%Creator: Doxygen %%CreationDate: Time %%For: %Magnification: 1.00 %%Orientation: Portrait %%BoundingBox: 0 0 500 103.896104 %%Pages: 0 %%BeginSetup %%EndSetup %%EndComments % ----- variables ----- /boxwidth 0 def /boxheight 40 def /fontheight 24 def /marginwidth 10 def /distx 20 def /disty 40 def /boundaspect 4.812500 def % aspect ratio of the BoundingBox (width/height) /boundx 500 def /boundy boundx boundaspect div def /xspacing 0 def /yspacing 0 def /rows 2 def /cols 1 def /scalefactor 0 def /boxfont /Times-Roman findfont fontheight scalefont def % ----- procedures ----- /dotted { [1 4] 0 setdash } def /dashed { [5] 0 setdash } def /solid { [] 0 setdash } def /max % result = MAX(arg1,arg2) { /a exch def /b exch def a b gt {a} {b} ifelse } def /xoffset % result = MAX(0,(scalefactor-(boxwidth*cols+distx*(cols-1)))/2) { 0 scalefactor boxwidth cols mul distx cols 1 sub mul add sub 2 div max } def /cw % boxwidth = MAX(boxwidth, stringwidth(arg1)) { /str exch def /boxwidth boxwidth str stringwidth pop max def } def /box % draws a box with text `arg1' at grid pos (arg2,arg3) { gsave 2 setlinewidth newpath exch xspacing mul xoffset add exch yspacing mul moveto boxwidth 0 rlineto 0 boxheight rlineto boxwidth neg 0 rlineto 0 boxheight neg rlineto closepath dup stringwidth pop neg boxwidth add 2 div boxheight fontheight 2 div sub 2 div rmoveto show stroke grestore } def /mark { newpath exch xspacing mul xoffset add boxwidth add exch yspacing mul moveto 0 boxheight 4 div rlineto boxheight neg 4 div boxheight neg 4 div rlineto closepath eofill stroke } def /arrow { newpath moveto 3 -8 rlineto -6 0 rlineto 3 8 rlineto closepath eofill stroke } def /out % draws an output connector for the block at (arg1,arg2) { newpath exch xspacing mul xoffset add boxwidth 2 div add exch yspacing mul boxheight add /y exch def /x exch def x y moveto 0 disty 2 div rlineto stroke 1 eq { x y disty 2 div add arrow } if } def /in % draws an input connector for the block at (arg1,arg2) { newpath exch xspacing mul xoffset add boxwidth 2 div add exch yspacing mul disty 2 div sub /y exch def /x exch def x y moveto 0 disty 2 div rlineto stroke 1 eq { x y disty 2 div add arrow } if } def /hedge { exch xspacing mul xoffset add boxwidth 2 div add exch yspacing mul boxheight 2 div sub /y exch def /x exch def newpath x y moveto boxwidth 2 div distx add 0 rlineto stroke 1 eq { newpath x boxwidth 2 div distx add add y moveto -8 3 rlineto 0 -6 rlineto 8 3 rlineto closepath eofill stroke } if } def /vedge { /ye exch def /ys exch def /xs exch def newpath xs xspacing mul xoffset add boxwidth 2 div add dup ys yspacing mul boxheight 2 div sub moveto ye yspacing mul boxheight 2 div sub lineto stroke } def /conn % connections the blocks from col `arg1' to `arg2' of row `arg3' { /ys exch def /xe exch def /xs exch def newpath xs xspacing mul xoffset add boxwidth 2 div add ys yspacing mul disty 2 div sub moveto xspacing xe xs sub mul 0 rlineto stroke } def % ----- main ------ boxfont setfont 1 boundaspect scale (ALSVerticesInMemProgram) cw (graphchi::GraphChiProgram< VertexDataType, EdgeDataType >) cw /boxwidth boxwidth marginwidth 2 mul add def /xspacing boxwidth distx add def /yspacing boxheight disty add def /scalefactor boxwidth cols mul distx cols 1 sub mul add boxheight rows mul disty rows 1 sub mul add boundaspect mul max def boundx scalefactor div boundy scalefactor div scale % ----- classes ----- (ALSVerticesInMemProgram) 0.000000 0.000000 box (graphchi::GraphChiProgram< VertexDataType, EdgeDataType >) 0.000000 1.000000 box % ----- relations ----- solid 0 0.000000 0.000000 out solid 1 0.000000 1.000000 in
09jijiangwen-download
docs/latex/struct_a_l_s_vertices_in_mem_program.eps
PostScript
asf20
3,902
\hypertarget{graphchi__context_8hpp}{\section{src/api/graphchi\-\_\-context.hpp File Reference} \label{graphchi__context_8hpp}\index{src/api/graphchi\-\_\-context.\-hpp@{src/api/graphchi\-\_\-context.\-hpp}} } {\ttfamily \#include $<$vector$>$}\\* {\ttfamily \#include $<$assert.\-h$>$}\\* {\ttfamily \#include $<$omp.\-h$>$}\\* {\ttfamily \#include $<$sys/time.\-h$>$}\\* {\ttfamily \#include \char`\"{}graphchi\-\_\-types.\-hpp\char`\"{}}\\* {\ttfamily \#include \char`\"{}api/ischeduler.\-hpp\char`\"{}}\\* \subsection*{Classes} \begin{DoxyCompactItemize} \item struct \hyperlink{structgraphchi_1_1graphchi__context}{graphchi\-::graphchi\-\_\-context} \end{DoxyCompactItemize} \subsection*{Namespaces} \begin{DoxyCompactItemize} \item namespace \hyperlink{namespacegraphchi}{graphchi} \end{DoxyCompactItemize} \subsection{Detailed Description} \begin{DoxyAuthor}{Author} Aapo Kyrola \href{mailto:akyrola@cs.cmu.edu}{\tt akyrola@cs.\-cmu.\-edu} \end{DoxyAuthor} \begin{DoxyVersion}{Version} 1.\-0 \end{DoxyVersion} \hypertarget{toplist_8hpp_LICENSE}{}\subsection{L\-I\-C\-E\-N\-S\-E}\label{toplist_8hpp_LICENSE} Copyright \mbox{[}2012\mbox{]} \mbox{[}Aapo Kyrola, Guy Blelloch, Carlos Guestrin / Carnegie Mellon University\mbox{]} Licensed under the Apache License, Version 2.\-0 (the \char`\"{}\-License\char`\"{}); you may not use this file except in compliance with the License. You may obtain a copy of the License at \href{http://www.apache.org/licenses/LICENSE-2.0}{\tt http\-://www.\-apache.\-org/licenses/\-L\-I\-C\-E\-N\-S\-E-\/2.\-0} Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \char`\"{}\-A\-S I\-S\char`\"{} B\-A\-S\-I\-S, W\-I\-T\-H\-O\-U\-T W\-A\-R\-R\-A\-N\-T\-I\-E\-S O\-R C\-O\-N\-D\-I\-T\-I\-O\-N\-S O\-F A\-N\-Y K\-I\-N\-D, either express or implied. See the License for the specific language governing permissions and limitations under the License.\hypertarget{toplist_8hpp_DESCRIPTION}{}\subsection{D\-E\-S\-C\-R\-I\-P\-T\-I\-O\-N}\label{toplist_8hpp_DESCRIPTION} Context object which contains information about the graph and on-\/going computation.
09jijiangwen-download
docs/latex/graphchi__context_8hpp.tex
TeX
asf20
2,156
\hypertarget{chifilenames_8hpp}{\section{src/api/chifilenames.hpp File Reference} \label{chifilenames_8hpp}\index{src/api/chifilenames.\-hpp@{src/api/chifilenames.\-hpp}} } {\ttfamily \#include $<$fcntl.\-h$>$}\\* {\ttfamily \#include $<$string$>$}\\* {\ttfamily \#include $<$sstream$>$}\\* {\ttfamily \#include $<$stdlib.\-h$>$}\\* {\ttfamily \#include $<$unistd.\-h$>$}\\* {\ttfamily \#include \char`\"{}logger/logger.\-hpp\char`\"{}}\\* \subsection*{Namespaces} \begin{DoxyCompactItemize} \item namespace \hyperlink{namespacegraphchi}{graphchi} \end{DoxyCompactItemize} \subsection*{Functions} \begin{DoxyCompactItemize} \item \hypertarget{namespacegraphchi_ad9c6dbb9f922b349e84595b7860a4dcb}{bool {\bfseries graphchi\-::shard\-\_\-file\-\_\-exists} (std\-::string sname)}\label{namespacegraphchi_ad9c6dbb9f922b349e84595b7860a4dcb} \end{DoxyCompactItemize} \subsection{Detailed Description} \begin{DoxyAuthor}{Author} Aapo Kyrola \href{mailto:akyrola@cs.cmu.edu}{\tt akyrola@cs.\-cmu.\-edu} \end{DoxyAuthor} \begin{DoxyVersion}{Version} 1.\-0 \end{DoxyVersion} \hypertarget{toplist_8hpp_LICENSE}{}\subsection{L\-I\-C\-E\-N\-S\-E}\label{toplist_8hpp_LICENSE} Copyright \mbox{[}2012\mbox{]} \mbox{[}Aapo Kyrola, Guy Blelloch, Carlos Guestrin / Carnegie Mellon University\mbox{]} Licensed under the Apache License, Version 2.\-0 (the \char`\"{}\-License\char`\"{}); you may not use this file except in compliance with the License. You may obtain a copy of the License at \href{http://www.apache.org/licenses/LICENSE-2.0}{\tt http\-://www.\-apache.\-org/licenses/\-L\-I\-C\-E\-N\-S\-E-\/2.\-0} Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \char`\"{}\-A\-S I\-S\char`\"{} B\-A\-S\-I\-S, W\-I\-T\-H\-O\-U\-T W\-A\-R\-R\-A\-N\-T\-I\-E\-S O\-R C\-O\-N\-D\-I\-T\-I\-O\-N\-S O\-F A\-N\-Y K\-I\-N\-D, either express or implied. See the License for the specific language governing permissions and limitations under the License.\hypertarget{toplist_8hpp_DESCRIPTION}{}\subsection{D\-E\-S\-C\-R\-I\-P\-T\-I\-O\-N}\label{toplist_8hpp_DESCRIPTION} Returns standard filenames for all the data files used by Graph\-Chi. All functions expect a \char`\"{}basefilename\char`\"{}. You can specify environment variable \char`\"{}\-G\-R\-A\-P\-H\-C\-H\-I\-\_\-\-R\-O\-O\-T\char`\"{}, which is the root directory for the Graph\-Chi configuration and source directories.
09jijiangwen-download
docs/latex/chifilenames_8hpp.tex
TeX
asf20
2,431
\hypertarget{struct_my_graph_chi_program}{\section{My\-Graph\-Chi\-Program Struct Reference} \label{struct_my_graph_chi_program}\index{My\-Graph\-Chi\-Program@{My\-Graph\-Chi\-Program}} } Inheritance diagram for My\-Graph\-Chi\-Program\-:\begin{figure}[H] \begin{center} \leavevmode \includegraphics[height=2.000000cm]{struct_my_graph_chi_program} \end{center} \end{figure} \subsection*{Public Member Functions} \begin{DoxyCompactItemize} \item void \hyperlink{struct_my_graph_chi_program_abdfcf1ebfeaa35790060e9f79dff4209}{update} (\hyperlink{classgraphchi_1_1graphchi__vertex}{graphchi\-\_\-vertex}$<$ Vertex\-Data\-Type, Edge\-Data\-Type $>$ \&vertex, \hyperlink{structgraphchi_1_1graphchi__context}{graphchi\-\_\-context} \&gcontext) \item void \hyperlink{struct_my_graph_chi_program_a2d16696c74cea6bdbb4f237595563b8a}{before\-\_\-iteration} (int iteration, \hyperlink{structgraphchi_1_1graphchi__context}{graphchi\-\_\-context} \&gcontext) \item void \hyperlink{struct_my_graph_chi_program_a6e9c87461584131b1b7546a258a9e1ab}{after\-\_\-iteration} (int iteration, \hyperlink{structgraphchi_1_1graphchi__context}{graphchi\-\_\-context} \&gcontext) \item void \hyperlink{struct_my_graph_chi_program_a77c27ea8780ebffa75618cd6a875f353}{before\-\_\-exec\-\_\-interval} (vid\-\_\-t window\-\_\-st, vid\-\_\-t window\-\_\-en, \hyperlink{structgraphchi_1_1graphchi__context}{graphchi\-\_\-context} \&gcontext) \item void \hyperlink{struct_my_graph_chi_program_a3d208961e548f3c29cc3edc26c74e3ac}{after\-\_\-exec\-\_\-interval} (vid\-\_\-t window\-\_\-st, vid\-\_\-t window\-\_\-en, \hyperlink{structgraphchi_1_1graphchi__context}{graphchi\-\_\-context} \&gcontext) \end{DoxyCompactItemize} \subsection*{Additional Inherited Members} \subsection{Detailed Description} Graph\-Chi programs need to subclass Graph\-Chi\-Program$<$vertex-\/type, edge-\/type$>$ class. The main logic is usually in the update function. \subsection{Member Function Documentation} \hypertarget{struct_my_graph_chi_program_a3d208961e548f3c29cc3edc26c74e3ac}{\index{My\-Graph\-Chi\-Program@{My\-Graph\-Chi\-Program}!after\-\_\-exec\-\_\-interval@{after\-\_\-exec\-\_\-interval}} \index{after\-\_\-exec\-\_\-interval@{after\-\_\-exec\-\_\-interval}!MyGraphChiProgram@{My\-Graph\-Chi\-Program}} \subsubsection[{after\-\_\-exec\-\_\-interval}]{\setlength{\rightskip}{0pt plus 5cm}void My\-Graph\-Chi\-Program\-::after\-\_\-exec\-\_\-interval ( \begin{DoxyParamCaption} \item[{vid\-\_\-t}]{window\-\_\-st, } \item[{vid\-\_\-t}]{window\-\_\-en, } \item[{{\bf graphchi\-\_\-context} \&}]{gcontext} \end{DoxyParamCaption} )\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}}\label{struct_my_graph_chi_program_a3d208961e548f3c29cc3edc26c74e3ac} Called after an execution interval has finished. Reimplemented from \hyperlink{classgraphchi_1_1_graph_chi_program_a9be881d1232e530c8d1852188cc8a84d}{graphchi\-::\-Graph\-Chi\-Program$<$ Vertex\-Data\-Type, Edge\-Data\-Type $>$}. \hypertarget{struct_my_graph_chi_program_a6e9c87461584131b1b7546a258a9e1ab}{\index{My\-Graph\-Chi\-Program@{My\-Graph\-Chi\-Program}!after\-\_\-iteration@{after\-\_\-iteration}} \index{after\-\_\-iteration@{after\-\_\-iteration}!MyGraphChiProgram@{My\-Graph\-Chi\-Program}} \subsubsection[{after\-\_\-iteration}]{\setlength{\rightskip}{0pt plus 5cm}void My\-Graph\-Chi\-Program\-::after\-\_\-iteration ( \begin{DoxyParamCaption} \item[{int}]{iteration, } \item[{{\bf graphchi\-\_\-context} \&}]{gcontext} \end{DoxyParamCaption} )\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}}\label{struct_my_graph_chi_program_a6e9c87461584131b1b7546a258a9e1ab} Called after an iteration has finished. Reimplemented from \hyperlink{classgraphchi_1_1_graph_chi_program_a24259d43b85d28af16d53a4176d29a07}{graphchi\-::\-Graph\-Chi\-Program$<$ Vertex\-Data\-Type, Edge\-Data\-Type $>$}. \hypertarget{struct_my_graph_chi_program_a77c27ea8780ebffa75618cd6a875f353}{\index{My\-Graph\-Chi\-Program@{My\-Graph\-Chi\-Program}!before\-\_\-exec\-\_\-interval@{before\-\_\-exec\-\_\-interval}} \index{before\-\_\-exec\-\_\-interval@{before\-\_\-exec\-\_\-interval}!MyGraphChiProgram@{My\-Graph\-Chi\-Program}} \subsubsection[{before\-\_\-exec\-\_\-interval}]{\setlength{\rightskip}{0pt plus 5cm}void My\-Graph\-Chi\-Program\-::before\-\_\-exec\-\_\-interval ( \begin{DoxyParamCaption} \item[{vid\-\_\-t}]{window\-\_\-st, } \item[{vid\-\_\-t}]{window\-\_\-en, } \item[{{\bf graphchi\-\_\-context} \&}]{gcontext} \end{DoxyParamCaption} )\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}}\label{struct_my_graph_chi_program_a77c27ea8780ebffa75618cd6a875f353} Called before an execution interval is started. Reimplemented from \hyperlink{classgraphchi_1_1_graph_chi_program_ab2f7244ddb743deb859dbc2fc927078a}{graphchi\-::\-Graph\-Chi\-Program$<$ Vertex\-Data\-Type, Edge\-Data\-Type $>$}. \hypertarget{struct_my_graph_chi_program_a2d16696c74cea6bdbb4f237595563b8a}{\index{My\-Graph\-Chi\-Program@{My\-Graph\-Chi\-Program}!before\-\_\-iteration@{before\-\_\-iteration}} \index{before\-\_\-iteration@{before\-\_\-iteration}!MyGraphChiProgram@{My\-Graph\-Chi\-Program}} \subsubsection[{before\-\_\-iteration}]{\setlength{\rightskip}{0pt plus 5cm}void My\-Graph\-Chi\-Program\-::before\-\_\-iteration ( \begin{DoxyParamCaption} \item[{int}]{iteration, } \item[{{\bf graphchi\-\_\-context} \&}]{gcontext} \end{DoxyParamCaption} )\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}}\label{struct_my_graph_chi_program_a2d16696c74cea6bdbb4f237595563b8a} Called before an iteration starts. Reimplemented from \hyperlink{classgraphchi_1_1_graph_chi_program_aec6d16fd6dddf1543afe55360a653cf2}{graphchi\-::\-Graph\-Chi\-Program$<$ Vertex\-Data\-Type, Edge\-Data\-Type $>$}. \hypertarget{struct_my_graph_chi_program_abdfcf1ebfeaa35790060e9f79dff4209}{\index{My\-Graph\-Chi\-Program@{My\-Graph\-Chi\-Program}!update@{update}} \index{update@{update}!MyGraphChiProgram@{My\-Graph\-Chi\-Program}} \subsubsection[{update}]{\setlength{\rightskip}{0pt plus 5cm}void My\-Graph\-Chi\-Program\-::update ( \begin{DoxyParamCaption} \item[{{\bf graphchi\-\_\-vertex}$<$ Vertex\-Data\-Type, Edge\-Data\-Type $>$ \&}]{vertex, } \item[{{\bf graphchi\-\_\-context} \&}]{gcontext} \end{DoxyParamCaption} )\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}}\label{struct_my_graph_chi_program_abdfcf1ebfeaa35790060e9f79dff4209} Vertex update function. Implements \hyperlink{classgraphchi_1_1_graph_chi_program_ad76f8881627e3c039144e261bfc77770}{graphchi\-::\-Graph\-Chi\-Program$<$ Vertex\-Data\-Type, Edge\-Data\-Type $>$}. The documentation for this struct was generated from the following file\-:\begin{DoxyCompactItemize} \item example\-\_\-apps/\hyperlink{application__template_8cpp}{application\-\_\-template.\-cpp}\end{DoxyCompactItemize}
09jijiangwen-download
docs/latex/struct_my_graph_chi_program.tex
TeX
asf20
6,785
\hypertarget{struct_connected_components_program}{\section{Connected\-Components\-Program Struct Reference} \label{struct_connected_components_program}\index{Connected\-Components\-Program@{Connected\-Components\-Program}} } Inheritance diagram for Connected\-Components\-Program\-:\begin{figure}[H] \begin{center} \leavevmode \includegraphics[height=2.000000cm]{struct_connected_components_program} \end{center} \end{figure} \subsection*{Public Member Functions} \begin{DoxyCompactItemize} \item void \hyperlink{struct_connected_components_program_a31f583b07a3882bb1c231070d2f430c2}{update} (\hyperlink{classgraphchi_1_1graphchi__vertex}{graphchi\-\_\-vertex}$<$ Vertex\-Data\-Type, Edge\-Data\-Type $>$ \&vertex, \hyperlink{structgraphchi_1_1graphchi__context}{graphchi\-\_\-context} \&gcontext) \item void \hyperlink{struct_connected_components_program_aae6274665671c137878968c6714cfdcf}{before\-\_\-iteration} (int iteration, \hyperlink{structgraphchi_1_1graphchi__context}{graphchi\-\_\-context} \&info) \item void \hyperlink{struct_connected_components_program_acfee1eaafacf9a197b17fefb365914ba}{after\-\_\-iteration} (int iteration, \hyperlink{structgraphchi_1_1graphchi__context}{graphchi\-\_\-context} \&ginfo) \item void \hyperlink{struct_connected_components_program_ab8720ed99bd8d2bc555e8e545a48a858}{before\-\_\-exec\-\_\-interval} (vid\-\_\-t window\-\_\-st, vid\-\_\-t window\-\_\-en, \hyperlink{structgraphchi_1_1graphchi__context}{graphchi\-\_\-context} \&ginfo) \item void \hyperlink{struct_connected_components_program_ac7970431691b01689a29cee5f0baa759}{after\-\_\-exec\-\_\-interval} (vid\-\_\-t window\-\_\-st, vid\-\_\-t window\-\_\-en, \hyperlink{structgraphchi_1_1graphchi__context}{graphchi\-\_\-context} \&ginfo) \end{DoxyCompactItemize} \subsection*{Additional Inherited Members} \subsection{Detailed Description} Graph\-Chi programs need to subclass Graph\-Chi\-Program$<$vertex-\/type, edge-\/type$>$ class. The main logic is usually in the update function. \subsection{Member Function Documentation} \hypertarget{struct_connected_components_program_ac7970431691b01689a29cee5f0baa759}{\index{Connected\-Components\-Program@{Connected\-Components\-Program}!after\-\_\-exec\-\_\-interval@{after\-\_\-exec\-\_\-interval}} \index{after\-\_\-exec\-\_\-interval@{after\-\_\-exec\-\_\-interval}!ConnectedComponentsProgram@{Connected\-Components\-Program}} \subsubsection[{after\-\_\-exec\-\_\-interval}]{\setlength{\rightskip}{0pt plus 5cm}void Connected\-Components\-Program\-::after\-\_\-exec\-\_\-interval ( \begin{DoxyParamCaption} \item[{vid\-\_\-t}]{window\-\_\-st, } \item[{vid\-\_\-t}]{window\-\_\-en, } \item[{{\bf graphchi\-\_\-context} \&}]{ginfo} \end{DoxyParamCaption} )\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}}\label{struct_connected_components_program_ac7970431691b01689a29cee5f0baa759} Called after an execution interval has finished. Reimplemented from \hyperlink{classgraphchi_1_1_graph_chi_program_a9be881d1232e530c8d1852188cc8a84d}{graphchi\-::\-Graph\-Chi\-Program$<$ Vertex\-Data\-Type, Edge\-Data\-Type $>$}. \hypertarget{struct_connected_components_program_acfee1eaafacf9a197b17fefb365914ba}{\index{Connected\-Components\-Program@{Connected\-Components\-Program}!after\-\_\-iteration@{after\-\_\-iteration}} \index{after\-\_\-iteration@{after\-\_\-iteration}!ConnectedComponentsProgram@{Connected\-Components\-Program}} \subsubsection[{after\-\_\-iteration}]{\setlength{\rightskip}{0pt plus 5cm}void Connected\-Components\-Program\-::after\-\_\-iteration ( \begin{DoxyParamCaption} \item[{int}]{iteration, } \item[{{\bf graphchi\-\_\-context} \&}]{ginfo} \end{DoxyParamCaption} )\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}}\label{struct_connected_components_program_acfee1eaafacf9a197b17fefb365914ba} Called after an iteration has finished. Reimplemented from \hyperlink{classgraphchi_1_1_graph_chi_program_a24259d43b85d28af16d53a4176d29a07}{graphchi\-::\-Graph\-Chi\-Program$<$ Vertex\-Data\-Type, Edge\-Data\-Type $>$}. \hypertarget{struct_connected_components_program_ab8720ed99bd8d2bc555e8e545a48a858}{\index{Connected\-Components\-Program@{Connected\-Components\-Program}!before\-\_\-exec\-\_\-interval@{before\-\_\-exec\-\_\-interval}} \index{before\-\_\-exec\-\_\-interval@{before\-\_\-exec\-\_\-interval}!ConnectedComponentsProgram@{Connected\-Components\-Program}} \subsubsection[{before\-\_\-exec\-\_\-interval}]{\setlength{\rightskip}{0pt plus 5cm}void Connected\-Components\-Program\-::before\-\_\-exec\-\_\-interval ( \begin{DoxyParamCaption} \item[{vid\-\_\-t}]{window\-\_\-st, } \item[{vid\-\_\-t}]{window\-\_\-en, } \item[{{\bf graphchi\-\_\-context} \&}]{ginfo} \end{DoxyParamCaption} )\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}}\label{struct_connected_components_program_ab8720ed99bd8d2bc555e8e545a48a858} Called before an execution interval is started. Reimplemented from \hyperlink{classgraphchi_1_1_graph_chi_program_ab2f7244ddb743deb859dbc2fc927078a}{graphchi\-::\-Graph\-Chi\-Program$<$ Vertex\-Data\-Type, Edge\-Data\-Type $>$}. \hypertarget{struct_connected_components_program_aae6274665671c137878968c6714cfdcf}{\index{Connected\-Components\-Program@{Connected\-Components\-Program}!before\-\_\-iteration@{before\-\_\-iteration}} \index{before\-\_\-iteration@{before\-\_\-iteration}!ConnectedComponentsProgram@{Connected\-Components\-Program}} \subsubsection[{before\-\_\-iteration}]{\setlength{\rightskip}{0pt plus 5cm}void Connected\-Components\-Program\-::before\-\_\-iteration ( \begin{DoxyParamCaption} \item[{int}]{iteration, } \item[{{\bf graphchi\-\_\-context} \&}]{info} \end{DoxyParamCaption} )\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}}\label{struct_connected_components_program_aae6274665671c137878968c6714cfdcf} Called before an iteration starts. Reimplemented from \hyperlink{classgraphchi_1_1_graph_chi_program_aec6d16fd6dddf1543afe55360a653cf2}{graphchi\-::\-Graph\-Chi\-Program$<$ Vertex\-Data\-Type, Edge\-Data\-Type $>$}. \hypertarget{struct_connected_components_program_a31f583b07a3882bb1c231070d2f430c2}{\index{Connected\-Components\-Program@{Connected\-Components\-Program}!update@{update}} \index{update@{update}!ConnectedComponentsProgram@{Connected\-Components\-Program}} \subsubsection[{update}]{\setlength{\rightskip}{0pt plus 5cm}void Connected\-Components\-Program\-::update ( \begin{DoxyParamCaption} \item[{{\bf graphchi\-\_\-vertex}$<$ Vertex\-Data\-Type, Edge\-Data\-Type $>$ \&}]{vertex, } \item[{{\bf graphchi\-\_\-context} \&}]{gcontext} \end{DoxyParamCaption} )\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}}\label{struct_connected_components_program_a31f583b07a3882bb1c231070d2f430c2} Vertex update function. On first iteration ,each vertex chooses a label = the vertex id. On subsequent iterations, each vertex chooses the minimum of the neighbor's label (and itself). Broadcast new label to neighbors by writing the value to the incident edges. Note\-: on first iteration, write only to out-\/edges to avoid overwriting data (this is kind of a subtle point) Implements \hyperlink{classgraphchi_1_1_graph_chi_program_ad76f8881627e3c039144e261bfc77770}{graphchi\-::\-Graph\-Chi\-Program$<$ Vertex\-Data\-Type, Edge\-Data\-Type $>$}. The documentation for this struct was generated from the following file\-:\begin{DoxyCompactItemize} \item example\-\_\-apps/\hyperlink{connectedcomponents_8cpp}{connectedcomponents.\-cpp}\end{DoxyCompactItemize}
09jijiangwen-download
docs/latex/struct_connected_components_program.tex
TeX
asf20
7,458
\hypertarget{basic__dynamicengine__smoketest_8cpp}{\section{src/tests/basic\-\_\-dynamicengine\-\_\-smoketest.cpp File Reference} \label{basic__dynamicengine__smoketest_8cpp}\index{src/tests/basic\-\_\-dynamicengine\-\_\-smoketest.\-cpp@{src/tests/basic\-\_\-dynamicengine\-\_\-smoketest.\-cpp}} } {\ttfamily \#include $<$string$>$}\\* {\ttfamily \#include \char`\"{}graphchi\-\_\-basic\-\_\-includes.\-hpp\char`\"{}}\\* {\ttfamily \#include \char`\"{}engine/dynamic\-\_\-graphs/graphchi\-\_\-dynamicgraph\-\_\-engine.\-hpp\char`\"{}}\\* \subsection*{Classes} \begin{DoxyCompactItemize} \item struct \hyperlink{struct_smoke_test_program}{Smoke\-Test\-Program} \item class \hyperlink{class_vertex_data_checker}{Vertex\-Data\-Checker} \end{DoxyCompactItemize} \subsection*{Typedefs} \begin{DoxyCompactItemize} \item typedef vid\-\_\-t \hyperlink{basic__dynamicengine__smoketest_8cpp_acf10237949ab87b83055ff6aa646c565}{Vertex\-Data\-Type} \item \hypertarget{basic__dynamicengine__smoketest_8cpp_afbb404dcf5d5c3e666744be9ba363945}{typedef vid\-\_\-t {\bfseries Edge\-Data\-Type}}\label{basic__dynamicengine__smoketest_8cpp_afbb404dcf5d5c3e666744be9ba363945} \end{DoxyCompactItemize} \subsection*{Functions} \begin{DoxyCompactItemize} \item \hypertarget{basic__dynamicengine__smoketest_8cpp_a217dbf8b442f20279ea00b898af96f52}{int {\bfseries main} (int argc, const char $\ast$$\ast$argv)}\label{basic__dynamicengine__smoketest_8cpp_a217dbf8b442f20279ea00b898af96f52} \end{DoxyCompactItemize} \subsection{Detailed Description} \begin{DoxyAuthor}{Author} Aapo Kyrola \href{mailto:akyrola@cs.cmu.edu}{\tt akyrola@cs.\-cmu.\-edu} \end{DoxyAuthor} \begin{DoxyVersion}{Version} 1.\-0 \end{DoxyVersion} \hypertarget{toplist_8hpp_LICENSE}{}\subsection{L\-I\-C\-E\-N\-S\-E}\label{toplist_8hpp_LICENSE} Copyright \mbox{[}2012\mbox{]} \mbox{[}Aapo Kyrola, Guy Blelloch, Carlos Guestrin / Carnegie Mellon University\mbox{]} Licensed under the Apache License, Version 2.\-0 (the \char`\"{}\-License\char`\"{}); you may not use this file except in compliance with the License. You may obtain a copy of the License at \href{http://www.apache.org/licenses/LICENSE-2.0}{\tt http\-://www.\-apache.\-org/licenses/\-L\-I\-C\-E\-N\-S\-E-\/2.\-0} Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \char`\"{}\-A\-S I\-S\char`\"{} B\-A\-S\-I\-S, W\-I\-T\-H\-O\-U\-T W\-A\-R\-R\-A\-N\-T\-I\-E\-S O\-R C\-O\-N\-D\-I\-T\-I\-O\-N\-S O\-F A\-N\-Y K\-I\-N\-D, either express or implied. See the License for the specific language governing permissions and limitations under the License.\hypertarget{toplist_8hpp_DESCRIPTION}{}\subsection{D\-E\-S\-C\-R\-I\-P\-T\-I\-O\-N}\label{toplist_8hpp_DESCRIPTION} Simple smoketest for the dynamic graph graphchi engine. \subsection{Typedef Documentation} \hypertarget{basic__dynamicengine__smoketest_8cpp_acf10237949ab87b83055ff6aa646c565}{\index{basic\-\_\-dynamicengine\-\_\-smoketest.\-cpp@{basic\-\_\-dynamicengine\-\_\-smoketest.\-cpp}!Vertex\-Data\-Type@{Vertex\-Data\-Type}} \index{Vertex\-Data\-Type@{Vertex\-Data\-Type}!basic_dynamicengine_smoketest.cpp@{basic\-\_\-dynamicengine\-\_\-smoketest.\-cpp}} \subsubsection[{Vertex\-Data\-Type}]{\setlength{\rightskip}{0pt plus 5cm}typedef vid\-\_\-t {\bf Vertex\-Data\-Type}}}\label{basic__dynamicengine__smoketest_8cpp_acf10237949ab87b83055ff6aa646c565} Type definitions. Remember to create suitable graph shards using the Sharder-\/program.
09jijiangwen-download
docs/latex/basic__dynamicengine__smoketest_8cpp.tex
TeX
asf20
3,483
\hypertarget{structerror__aggregator}{\section{error\-\_\-aggregator Struct Reference} \label{structerror__aggregator}\index{error\-\_\-aggregator@{error\-\_\-aggregator}} } Inheritance diagram for error\-\_\-aggregator\-:\begin{figure}[H] \begin{center} \leavevmode \includegraphics[height=2.000000cm]{structerror__aggregator} \end{center} \end{figure} \subsection*{Public Types} \begin{DoxyCompactItemize} \item \hypertarget{structerror__aggregator_a640e7ca473b36d7968fecc82de107c12}{typedef \\* \hyperlink{classgraphlab_1_1icontext}{als\-\_\-vertex\-\_\-program\-::icontext\-\_\-type} {\bfseries icontext\-\_\-type}}\label{structerror__aggregator_a640e7ca473b36d7968fecc82de107c12} \item \hypertarget{structerror__aggregator_a4f190a0998b5796c2a69ec563492b66a}{typedef \hyperlink{structgraphlab_1_1_graph_lab_edge_wrapper}{graph\-\_\-type\-::edge\-\_\-type} {\bfseries edge\-\_\-type}}\label{structerror__aggregator_a4f190a0998b5796c2a69ec563492b66a} \end{DoxyCompactItemize} \subsection*{Public Member Functions} \begin{DoxyCompactItemize} \item \hypertarget{structerror__aggregator_abe0144adcf2c91ffb6d0580e38be9f62}{\hyperlink{structerror__aggregator}{error\-\_\-aggregator} \& {\bfseries operator+=} (const \hyperlink{structerror__aggregator}{error\-\_\-aggregator} \&other)}\label{structerror__aggregator_abe0144adcf2c91ffb6d0580e38be9f62} \end{DoxyCompactItemize} \subsection*{Static Public Member Functions} \begin{DoxyCompactItemize} \item \hypertarget{structerror__aggregator_a76f377914f60ca35ea5f4f4fac652ec5}{static \hyperlink{structerror__aggregator}{error\-\_\-aggregator} {\bfseries map} (\hyperlink{classgraphlab_1_1icontext}{icontext\-\_\-type} \&context, const \hyperlink{structgraphlab_1_1_graph_lab_edge_wrapper}{graph\-\_\-type\-::edge\-\_\-type} \&\hyperlink{structedge}{edge})}\label{structerror__aggregator_a76f377914f60ca35ea5f4f4fac652ec5} \item \hypertarget{structerror__aggregator_a4caf40a82d825e5335fdcc15928ec2c3}{static void {\bfseries finalize} (\hyperlink{classgraphlab_1_1icontext}{icontext\-\_\-type} \&context, \hyperlink{structerror__aggregator}{error\-\_\-aggregator} \&agg)}\label{structerror__aggregator_a4caf40a82d825e5335fdcc15928ec2c3} \end{DoxyCompactItemize} \subsection*{Public Attributes} \begin{DoxyCompactItemize} \item \hypertarget{structerror__aggregator_a2821929919717d750072da409c516013}{double {\bfseries train\-\_\-error}}\label{structerror__aggregator_a2821929919717d750072da409c516013} \item \hypertarget{structerror__aggregator_ada0b548d6b16f864690a275248c8c19d}{double {\bfseries validation\-\_\-error}}\label{structerror__aggregator_ada0b548d6b16f864690a275248c8c19d} \item \hypertarget{structerror__aggregator_adef80f4bb3516f5c781d108b463d4a98}{size\-\_\-t {\bfseries ntrain}}\label{structerror__aggregator_adef80f4bb3516f5c781d108b463d4a98} \item \hypertarget{structerror__aggregator_a6fec3a73d150498666b65c168d5c3c4e}{size\-\_\-t {\bfseries nvalidation}}\label{structerror__aggregator_a6fec3a73d150498666b65c168d5c3c4e} \end{DoxyCompactItemize} The documentation for this struct was generated from the following file\-:\begin{DoxyCompactItemize} \item example\-\_\-apps/matrix\-\_\-factorization/graphlab\-\_\-gas/\hyperlink{als__vertex__program_8hpp}{als\-\_\-vertex\-\_\-program.\-hpp}\end{DoxyCompactItemize}
09jijiangwen-download
docs/latex/structerror__aggregator.tex
TeX
asf20
3,297
\hypertarget{struct_smoke_test_program}{\section{Smoke\-Test\-Program Struct Reference} \label{struct_smoke_test_program}\index{Smoke\-Test\-Program@{Smoke\-Test\-Program}} } Inheritance diagram for Smoke\-Test\-Program\-:\begin{figure}[H] \begin{center} \leavevmode \includegraphics[height=1.454545cm]{struct_smoke_test_program} \end{center} \end{figure} \subsection*{Public Member Functions} \begin{DoxyCompactItemize} \item void \hyperlink{struct_smoke_test_program_afe153e12ae31476c82214b62417b791b}{update} (\hyperlink{classgraphchi_1_1graphchi__vertex}{graphchi\-\_\-vertex}$<$ Vertex\-Data\-Type, Edge\-Data\-Type $>$ \&vertex, \hyperlink{structgraphchi_1_1graphchi__context}{graphchi\-\_\-context} \&gcontext) \item void \hyperlink{struct_smoke_test_program_a955ed7d1dd7ea0f5a12ddaefe299cc4b}{before\-\_\-iteration} (int iteration, \hyperlink{structgraphchi_1_1graphchi__context}{graphchi\-\_\-context} \&gcontext) \item void \hyperlink{struct_smoke_test_program_a22ced893fb5769579406717abaf1c749}{after\-\_\-iteration} (int iteration, \hyperlink{structgraphchi_1_1graphchi__context}{graphchi\-\_\-context} \&gcontext) \item void \hyperlink{struct_smoke_test_program_aa99545ae82126af27572baa2c834f737}{before\-\_\-exec\-\_\-interval} (vid\-\_\-t window\-\_\-st, vid\-\_\-t window\-\_\-en, \hyperlink{structgraphchi_1_1graphchi__context}{graphchi\-\_\-context} \&gcontext) \item void \hyperlink{struct_smoke_test_program_ad2d4d576e0b10dc2b0e09ca6c54f625a}{after\-\_\-exec\-\_\-interval} (vid\-\_\-t window\-\_\-st, vid\-\_\-t window\-\_\-en, \hyperlink{structgraphchi_1_1graphchi__context}{graphchi\-\_\-context} \&gcontext) \item void \hyperlink{struct_smoke_test_program_afe153e12ae31476c82214b62417b791b}{update} (\hyperlink{classgraphchi_1_1graphchi__vertex}{graphchi\-\_\-vertex}$<$ Vertex\-Data\-Type, Edge\-Data\-Type $>$ \&vertex, \hyperlink{structgraphchi_1_1graphchi__context}{graphchi\-\_\-context} \&gcontext) \item void \hyperlink{struct_smoke_test_program_a955ed7d1dd7ea0f5a12ddaefe299cc4b}{before\-\_\-iteration} (int iteration, \hyperlink{structgraphchi_1_1graphchi__context}{graphchi\-\_\-context} \&gcontext) \item void \hyperlink{struct_smoke_test_program_a22ced893fb5769579406717abaf1c749}{after\-\_\-iteration} (int iteration, \hyperlink{structgraphchi_1_1graphchi__context}{graphchi\-\_\-context} \&gcontext) \item void \hyperlink{struct_smoke_test_program_aa99545ae82126af27572baa2c834f737}{before\-\_\-exec\-\_\-interval} (vid\-\_\-t window\-\_\-st, vid\-\_\-t window\-\_\-en, \hyperlink{structgraphchi_1_1graphchi__context}{graphchi\-\_\-context} \&gcontext) \item void \hyperlink{struct_smoke_test_program_ad2d4d576e0b10dc2b0e09ca6c54f625a}{after\-\_\-exec\-\_\-interval} (vid\-\_\-t window\-\_\-st, vid\-\_\-t window\-\_\-en, \hyperlink{structgraphchi_1_1graphchi__context}{graphchi\-\_\-context} \&gcontext) \end{DoxyCompactItemize}
09jijiangwen-download
docs/latex/struct_smoke_test_program.tex
TeX
asf20
2,878
\hypertarget{graphchi__graphlabv2__1_8hpp}{\section{src/api/graphlab2\-\_\-1\-\_\-\-G\-A\-S\-\_\-api/graphchi\-\_\-graphlabv2\-\_\-1.hpp File Reference} \label{graphchi__graphlabv2__1_8hpp}\index{src/api/graphlab2\-\_\-1\-\_\-\-G\-A\-S\-\_\-api/graphchi\-\_\-graphlabv2\-\_\-1.\-hpp@{src/api/graphlab2\-\_\-1\-\_\-\-G\-A\-S\-\_\-api/graphchi\-\_\-graphlabv2\-\_\-1.\-hpp}} } {\ttfamily \#include \char`\"{}graphchi\-\_\-basic\-\_\-includes.\-hpp\char`\"{}}\\* \subsection*{Classes} \begin{DoxyCompactItemize} \item struct \hyperlink{structgraphlab_1_1_i_s___p_o_d___t_y_p_e}{graphlab\-::\-I\-S\-\_\-\-P\-O\-D\-\_\-\-T\-Y\-P\-E} \item struct \hyperlink{structgraphlab_1_1empty}{graphlab\-::empty} \item class \hyperlink{classgraphlab_1_1icontext}{graphlab\-::icontext$<$ Graph\-Type, Gather\-Type, Message\-Type $>$} \item struct \hyperlink{structgraphlab_1_1distributed__graph}{graphlab\-::distributed\-\_\-graph$<$ vertex\-\_\-data, edge\-\_\-data $>$} \item struct \hyperlink{structgraphlab_1_1ivertex__program}{graphlab\-::ivertex\-\_\-program$<$ Graph, Gather\-Type, Message\-Type $>$} \item struct \hyperlink{structgraphlab_1_1_graph_lab_vertex_wrapper}{graphlab\-::\-Graph\-Lab\-Vertex\-Wrapper$<$ G\-L\-Vertex\-Data\-Type, Edge\-Data\-Type $>$} \item struct \hyperlink{structgraphlab_1_1_graph_lab_edge_wrapper}{graphlab\-::\-Graph\-Lab\-Edge\-Wrapper$<$ G\-L\-Vertex\-Data\-Type, Edge\-Data\-Type $>$} \item struct \hyperlink{structgraphlab_1_1_graph_lab_wrapper}{graphlab\-::\-Graph\-Lab\-Wrapper$<$ Graph\-Lab\-Vertex\-Program $>$} \item struct \hyperlink{structgraphlab_1_1_graph_lab_edge_aggregator_wrapper}{graphlab\-::\-Graph\-Lab\-Edge\-Aggregator\-Wrapper$<$ Graph\-Lab\-Vertex\-Program, Reduction\-Type, Edge\-Map\-Type, Finalizer\-Type $>$} \item struct \hyperlink{structgraphlab_1_1messages_1_1sum__priority}{graphlab\-::messages\-::sum\-\_\-priority} \item struct \hyperlink{structgraphlab_1_1messages_1_1max__priority}{graphlab\-::messages\-::max\-\_\-priority} \end{DoxyCompactItemize} \subsection*{Namespaces} \begin{DoxyCompactItemize} \item namespace \hyperlink{namespacegraphlab_1_1messages}{graphlab\-::messages} \end{DoxyCompactItemize} \subsection*{Enumerations} \begin{DoxyCompactItemize} \item enum {\bfseries edge\-\_\-dir\-\_\-type} \{ {\bfseries graphlab\-::\-N\-O\-\_\-\-E\-D\-G\-E\-S} = 0, {\bfseries graphlab\-::\-I\-N\-\_\-\-E\-D\-G\-E\-S} = 1, {\bfseries graphlab\-::\-O\-U\-T\-\_\-\-E\-D\-G\-E\-S} = 2, {\bfseries graphlab\-::\-A\-L\-L\-\_\-\-E\-D\-G\-E\-S} = 3 \} \end{DoxyCompactItemize} \subsection*{Functions} \begin{DoxyCompactItemize} \item \hypertarget{graphchi__graphlabv2__1_8hpp_af73c68312649d6dab218043f2daf9dc0}{{\footnotesize template$<$typename Graph\-Lab\-Vertex\-Program $>$ }\\std\-::vector$<$ typename \\* Graph\-Lab\-Vertex\-Program\-::vertex\-\_\-data\-\_\-type $>$ $\ast$ {\bfseries run\-\_\-graphlab\-\_\-vertexprogram} (std\-::string base\-\_\-filename, int nshards, int niters, bool scheduler, \hyperlink{classgraphchi_1_1metrics}{metrics} \&\-\_\-m, bool modifies\-\_\-inedges=true, bool modifies\-\_\-outedges=true)}\label{graphchi__graphlabv2__1_8hpp_af73c68312649d6dab218043f2daf9dc0} \item \hypertarget{graphchi__graphlabv2__1_8hpp_aa8370f5e5416c3c30dbaaeac9a4eca20}{{\footnotesize template$<$typename Graph\-Lab\-Vertex\-Program , typename Reduction\-Type , typename Edge\-Map\-Type , typename Finalizer\-Type $>$ }\\Reduction\-Type {\bfseries run\-\_\-graphlab\-\_\-edge\-\_\-aggregator} (std\-::string base\-\_\-filename, int nshards, Edge\-Map\-Type map\-\_\-function, Finalizer\-Type finalize\-\_\-function, std\-::vector$<$ typename Graph\-Lab\-Vertex\-Program\-::vertex\-\_\-data\-\_\-type $>$ $\ast$vertices, \hyperlink{classgraphchi_1_1metrics}{metrics} \&\-\_\-m)}\label{graphchi__graphlabv2__1_8hpp_aa8370f5e5416c3c30dbaaeac9a4eca20} \end{DoxyCompactItemize} \subsection{Detailed Description} \begin{DoxyAuthor}{Author} Aapo Kyrola \href{mailto:akyrola@cs.cmu.edu}{\tt akyrola@cs.\-cmu.\-edu} \end{DoxyAuthor} \begin{DoxyVersion}{Version} 1.\-0 \end{DoxyVersion} \hypertarget{toplist_8hpp_LICENSE}{}\subsection{L\-I\-C\-E\-N\-S\-E}\label{toplist_8hpp_LICENSE} Copyright \mbox{[}2012\mbox{]} \mbox{[}Aapo Kyrola, Guy Blelloch, Carlos Guestrin / Carnegie Mellon University\mbox{]} Licensed under the Apache License, Version 2.\-0 (the \char`\"{}\-License\char`\"{}); you may not use this file except in compliance with the License. You may obtain a copy of the License at \href{http://www.apache.org/licenses/LICENSE-2.0}{\tt http\-://www.\-apache.\-org/licenses/\-L\-I\-C\-E\-N\-S\-E-\/2.\-0} Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \char`\"{}\-A\-S I\-S\char`\"{} B\-A\-S\-I\-S, W\-I\-T\-H\-O\-U\-T W\-A\-R\-R\-A\-N\-T\-I\-E\-S O\-R C\-O\-N\-D\-I\-T\-I\-O\-N\-S O\-F A\-N\-Y K\-I\-N\-D, either express or implied. See the License for the specific language governing permissions and limitations under the License.\hypertarget{toplist_8hpp_DESCRIPTION}{}\subsection{D\-E\-S\-C\-R\-I\-P\-T\-I\-O\-N}\label{toplist_8hpp_DESCRIPTION} Wrapper classes for Graph\-Lab v2.\-1 A\-P\-I.
09jijiangwen-download
docs/latex/graphchi__graphlabv2__1_8hpp.tex
TeX
asf20
5,166
\hypertarget{graphchi__program_8hpp}{\section{src/api/graphchi\-\_\-program.hpp File Reference} \label{graphchi__program_8hpp}\index{src/api/graphchi\-\_\-program.\-hpp@{src/api/graphchi\-\_\-program.\-hpp}} } {\ttfamily \#include \char`\"{}api/graph\-\_\-objects.\-hpp\char`\"{}}\\* {\ttfamily \#include \char`\"{}api/graphchi\-\_\-context.\-hpp\char`\"{}}\\* \subsection*{Classes} \begin{DoxyCompactItemize} \item class \hyperlink{classgraphchi_1_1_graph_chi_program}{graphchi\-::\-Graph\-Chi\-Program$<$ Vertex\-Data\-Type\-\_\-, Edge\-Data\-Type\-\_\-, vertex\-\_\-t $>$} \end{DoxyCompactItemize} \subsection*{Namespaces} \begin{DoxyCompactItemize} \item namespace \hyperlink{namespacegraphchi}{graphchi} \end{DoxyCompactItemize} \subsection{Detailed Description} \begin{DoxyAuthor}{Author} Aapo Kyrola \href{mailto:akyrola@cs.cmu.edu}{\tt akyrola@cs.\-cmu.\-edu} \end{DoxyAuthor} \begin{DoxyVersion}{Version} 1.\-0 \end{DoxyVersion} \hypertarget{toplist_8hpp_LICENSE}{}\subsection{L\-I\-C\-E\-N\-S\-E}\label{toplist_8hpp_LICENSE} Copyright \mbox{[}2012\mbox{]} \mbox{[}Aapo Kyrola, Guy Blelloch, Carlos Guestrin / Carnegie Mellon University\mbox{]} Licensed under the Apache License, Version 2.\-0 (the \char`\"{}\-License\char`\"{}); you may not use this file except in compliance with the License. You may obtain a copy of the License at \href{http://www.apache.org/licenses/LICENSE-2.0}{\tt http\-://www.\-apache.\-org/licenses/\-L\-I\-C\-E\-N\-S\-E-\/2.\-0} Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \char`\"{}\-A\-S I\-S\char`\"{} B\-A\-S\-I\-S, W\-I\-T\-H\-O\-U\-T W\-A\-R\-R\-A\-N\-T\-I\-E\-S O\-R C\-O\-N\-D\-I\-T\-I\-O\-N\-S O\-F A\-N\-Y K\-I\-N\-D, either express or implied. See the License for the specific language governing permissions and limitations under the License.\hypertarget{toplist_8hpp_DESCRIPTION}{}\subsection{D\-E\-S\-C\-R\-I\-P\-T\-I\-O\-N}\label{toplist_8hpp_DESCRIPTION} Graph\-Chi\-Program must be subclassed by Graph\-Chi user programs. They can define an update function (run for each vertex), and call backs for iteration and interval beginning and ending.
09jijiangwen-download
docs/latex/graphchi__program_8hpp.tex
TeX
asf20
2,181
\hypertarget{slidingshard_8hpp}{\section{src/shards/slidingshard.hpp File Reference} \label{slidingshard_8hpp}\index{src/shards/slidingshard.\-hpp@{src/shards/slidingshard.\-hpp}} } {\ttfamily \#include $<$iostream$>$}\\* {\ttfamily \#include $<$cstdio$>$}\\* {\ttfamily \#include $<$sstream$>$}\\* {\ttfamily \#include $<$vector$>$}\\* {\ttfamily \#include $<$fcntl.\-h$>$}\\* {\ttfamily \#include $<$unistd.\-h$>$}\\* {\ttfamily \#include $<$assert.\-h$>$}\\* {\ttfamily \#include $<$string$>$}\\* {\ttfamily \#include \char`\"{}api/graph\-\_\-objects.\-hpp\char`\"{}}\\* {\ttfamily \#include \char`\"{}metrics/metrics.\-hpp\char`\"{}}\\* {\ttfamily \#include \char`\"{}logger/logger.\-hpp\char`\"{}}\\* {\ttfamily \#include \char`\"{}io/stripedio.\-hpp\char`\"{}}\\* {\ttfamily \#include \char`\"{}graphchi\-\_\-types.\-hpp\char`\"{}}\\* \subsection*{Classes} \begin{DoxyCompactItemize} \item struct \hyperlink{structgraphchi_1_1sblock}{graphchi\-::sblock} \item struct \hyperlink{structgraphchi_1_1indexentry}{graphchi\-::indexentry} \item class \hyperlink{classgraphchi_1_1sliding__shard}{graphchi\-::sliding\-\_\-shard$<$ V\-T, E\-T, svertex\-\_\-t, E\-Tspecial $>$} \end{DoxyCompactItemize} \subsection*{Namespaces} \begin{DoxyCompactItemize} \item namespace \hyperlink{namespacegraphchi}{graphchi} \end{DoxyCompactItemize} \subsection{Detailed Description} \begin{DoxyAuthor}{Author} Aapo Kyrola \href{mailto:akyrola@cs.cmu.edu}{\tt akyrola@cs.\-cmu.\-edu} \end{DoxyAuthor} \begin{DoxyVersion}{Version} 1.\-0 \end{DoxyVersion} \hypertarget{toplist_8hpp_LICENSE}{}\subsection{L\-I\-C\-E\-N\-S\-E}\label{toplist_8hpp_LICENSE} Copyright \mbox{[}2012\mbox{]} \mbox{[}Aapo Kyrola, Guy Blelloch, Carlos Guestrin / Carnegie Mellon University\mbox{]} Licensed under the Apache License, Version 2.\-0 (the \char`\"{}\-License\char`\"{}); you may not use this file except in compliance with the License. You may obtain a copy of the License at \href{http://www.apache.org/licenses/LICENSE-2.0}{\tt http\-://www.\-apache.\-org/licenses/\-L\-I\-C\-E\-N\-S\-E-\/2.\-0} Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \char`\"{}\-A\-S I\-S\char`\"{} B\-A\-S\-I\-S, W\-I\-T\-H\-O\-U\-T W\-A\-R\-R\-A\-N\-T\-I\-E\-S O\-R C\-O\-N\-D\-I\-T\-I\-O\-N\-S O\-F A\-N\-Y K\-I\-N\-D, either express or implied. See the License for the specific language governing permissions and limitations under the License.\hypertarget{toplist_8hpp_DESCRIPTION}{}\subsection{D\-E\-S\-C\-R\-I\-P\-T\-I\-O\-N}\label{toplist_8hpp_DESCRIPTION} The sliding shard.
09jijiangwen-download
docs/latex/slidingshard_8hpp.tex
TeX
asf20
2,609
\hypertarget{pagerank_8cpp}{\section{example\-\_\-apps/pagerank.cpp File Reference} \label{pagerank_8cpp}\index{example\-\_\-apps/pagerank.\-cpp@{example\-\_\-apps/pagerank.\-cpp}} } {\ttfamily \#include $<$string$>$}\\* {\ttfamily \#include $<$fstream$>$}\\* {\ttfamily \#include $<$cmath$>$}\\* {\ttfamily \#include \char`\"{}graphchi\-\_\-basic\-\_\-includes.\-hpp\char`\"{}}\\* {\ttfamily \#include \char`\"{}util/toplist.\-hpp\char`\"{}}\\* \subsection*{Classes} \begin{DoxyCompactItemize} \item struct \hyperlink{struct_pagerank_program}{Pagerank\-Program} \end{DoxyCompactItemize} \subsection*{Macros} \begin{DoxyCompactItemize} \item \hypertarget{pagerank_8cpp_a4679d8ea8690999a6c6c7c0cb245c879}{\#define {\bfseries T\-H\-R\-E\-S\-H\-O\-L\-D}~1e-\/1}\label{pagerank_8cpp_a4679d8ea8690999a6c6c7c0cb245c879} \item \hypertarget{pagerank_8cpp_a5e3939b7192acef3f437bb0edc1c63df}{\#define {\bfseries R\-A\-N\-D\-O\-M\-R\-E\-S\-E\-T\-P\-R\-O\-B}~0.\-15}\label{pagerank_8cpp_a5e3939b7192acef3f437bb0edc1c63df} \end{DoxyCompactItemize} \subsection*{Typedefs} \begin{DoxyCompactItemize} \item \hypertarget{pagerank_8cpp_a357c4eed6dd08b74c2a63472c0f10afa}{typedef float {\bfseries Vertex\-Data\-Type}}\label{pagerank_8cpp_a357c4eed6dd08b74c2a63472c0f10afa} \item \hypertarget{pagerank_8cpp_af2381c28a1096b588ce381c1037d2264}{typedef float {\bfseries Edge\-Data\-Type}}\label{pagerank_8cpp_af2381c28a1096b588ce381c1037d2264} \end{DoxyCompactItemize} \subsection*{Functions} \begin{DoxyCompactItemize} \item \hypertarget{pagerank_8cpp_a217dbf8b442f20279ea00b898af96f52}{int {\bfseries main} (int argc, const char $\ast$$\ast$argv)}\label{pagerank_8cpp_a217dbf8b442f20279ea00b898af96f52} \end{DoxyCompactItemize} \subsection{Detailed Description} \begin{DoxyAuthor}{Author} Aapo Kyrola \href{mailto:akyrola@cs.cmu.edu}{\tt akyrola@cs.\-cmu.\-edu} \end{DoxyAuthor} \begin{DoxyVersion}{Version} 1.\-0 \end{DoxyVersion} \hypertarget{toplist_8hpp_LICENSE}{}\subsection{L\-I\-C\-E\-N\-S\-E}\label{toplist_8hpp_LICENSE} Copyright \mbox{[}2012\mbox{]} \mbox{[}Aapo Kyrola, Guy Blelloch, Carlos Guestrin / Carnegie Mellon University\mbox{]} Licensed under the Apache License, Version 2.\-0 (the \char`\"{}\-License\char`\"{}); you may not use this file except in compliance with the License. You may obtain a copy of the License at \href{http://www.apache.org/licenses/LICENSE-2.0}{\tt http\-://www.\-apache.\-org/licenses/\-L\-I\-C\-E\-N\-S\-E-\/2.\-0} Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \char`\"{}\-A\-S I\-S\char`\"{} B\-A\-S\-I\-S, W\-I\-T\-H\-O\-U\-T W\-A\-R\-R\-A\-N\-T\-I\-E\-S O\-R C\-O\-N\-D\-I\-T\-I\-O\-N\-S O\-F A\-N\-Y K\-I\-N\-D, either express or implied. See the License for the specific language governing permissions and limitations under the License.\hypertarget{toplist_8hpp_DESCRIPTION}{}\subsection{D\-E\-S\-C\-R\-I\-P\-T\-I\-O\-N}\label{toplist_8hpp_DESCRIPTION} Simple pagerank implementation. Uses the basic vertex-\/based A\-P\-I for demonstration purposes. A faster implementation uses the functional A\-P\-I, \char`\"{}pagerank\-\_\-functional\char`\"{}.
09jijiangwen-download
docs/latex/pagerank_8cpp.tex
TeX
asf20
3,170
\hypertarget{structnull__stream}{\section{null\-\_\-stream Struct Reference} \label{structnull__stream}\index{null\-\_\-stream@{null\-\_\-stream}} } \subsection*{Public Member Functions} \begin{DoxyCompactItemize} \item \hypertarget{structnull__stream_a72053224b3d432b8111453a0aec3fdd1}{{\footnotesize template$<$typename T $>$ }\\\hyperlink{structnull__stream}{null\-\_\-stream} {\bfseries operator$<$$<$} (T t)}\label{structnull__stream_a72053224b3d432b8111453a0aec3fdd1} \item \hypertarget{structnull__stream_abfaf81817f085afaaf8717478f26bc97}{\hyperlink{structnull__stream}{null\-\_\-stream} {\bfseries operator$<$$<$} (const char $\ast$a)}\label{structnull__stream_abfaf81817f085afaaf8717478f26bc97} \item \hypertarget{structnull__stream_a1394a183e7860103bc59b6e5bdf8644b}{\hyperlink{structnull__stream}{null\-\_\-stream} {\bfseries operator$<$$<$} (std\-::ostream \&($\ast$f)(std\-::ostream \&))}\label{structnull__stream_a1394a183e7860103bc59b6e5bdf8644b} \end{DoxyCompactItemize} The documentation for this struct was generated from the following file\-:\begin{DoxyCompactItemize} \item src/logger/\hyperlink{logger_8hpp}{logger.\-hpp}\end{DoxyCompactItemize}
09jijiangwen-download
docs/latex/structnull__stream.tex
TeX
asf20
1,177
\hypertarget{degree__data_8hpp}{\section{src/engine/auxdata/degree\-\_\-data.hpp File Reference} \label{degree__data_8hpp}\index{src/engine/auxdata/degree\-\_\-data.\-hpp@{src/engine/auxdata/degree\-\_\-data.\-hpp}} } {\ttfamily \#include $<$fstream$>$}\\* {\ttfamily \#include $<$assert.\-h$>$}\\* {\ttfamily \#include $<$string$>$}\\* {\ttfamily \#include $<$stdlib.\-h$>$}\\* {\ttfamily \#include \char`\"{}graphchi\-\_\-types.\-hpp\char`\"{}}\\* {\ttfamily \#include \char`\"{}io/stripedio.\-hpp\char`\"{}}\\* \subsection*{Classes} \begin{DoxyCompactItemize} \item struct \hyperlink{structgraphchi_1_1degree}{graphchi\-::degree} \item class \hyperlink{classgraphchi_1_1degree__data}{graphchi\-::degree\-\_\-data} \end{DoxyCompactItemize} \subsection*{Namespaces} \begin{DoxyCompactItemize} \item namespace \hyperlink{namespacegraphchi}{graphchi} \end{DoxyCompactItemize} \subsection{Detailed Description} \begin{DoxyAuthor}{Author} Aapo Kyrola \href{mailto:akyrola@cs.cmu.edu}{\tt akyrola@cs.\-cmu.\-edu} \end{DoxyAuthor} \begin{DoxyVersion}{Version} 1.\-0 \end{DoxyVersion} \hypertarget{toplist_8hpp_LICENSE}{}\subsection{L\-I\-C\-E\-N\-S\-E}\label{toplist_8hpp_LICENSE} Copyright \mbox{[}2012\mbox{]} \mbox{[}Aapo Kyrola, Guy Blelloch, Carlos Guestrin / Carnegie Mellon University\mbox{]} Licensed under the Apache License, Version 2.\-0 (the \char`\"{}\-License\char`\"{}); you may not use this file except in compliance with the License. You may obtain a copy of the License at \href{http://www.apache.org/licenses/LICENSE-2.0}{\tt http\-://www.\-apache.\-org/licenses/\-L\-I\-C\-E\-N\-S\-E-\/2.\-0} Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \char`\"{}\-A\-S I\-S\char`\"{} B\-A\-S\-I\-S, W\-I\-T\-H\-O\-U\-T W\-A\-R\-R\-A\-N\-T\-I\-E\-S O\-R C\-O\-N\-D\-I\-T\-I\-O\-N\-S O\-F A\-N\-Y K\-I\-N\-D, either express or implied. See the License for the specific language governing permissions and limitations under the License.\hypertarget{toplist_8hpp_DESCRIPTION}{}\subsection{D\-E\-S\-C\-R\-I\-P\-T\-I\-O\-N}\label{toplist_8hpp_DESCRIPTION} The class manages information about vertex degree, and allows sequential block access to the degree data file.
09jijiangwen-download
docs/latex/degree__data_8hpp.tex
TeX
asf20
2,244
\hypertarget{structmg__context}{\section{mg\-\_\-context Struct Reference} \label{structmg__context}\index{mg\-\_\-context@{mg\-\_\-context}} } \subsection*{Public Attributes} \begin{DoxyCompactItemize} \item \hypertarget{structmg__context_a49996b52099257da8c06e5ccecd478fb}{int {\bfseries stop\-\_\-flag}}\label{structmg__context_a49996b52099257da8c06e5ccecd478fb} \item \hypertarget{structmg__context_a463677406a1b4dd5e5a6a9df427800ce}{S\-S\-L\-\_\-\-C\-T\-X $\ast$ {\bfseries ssl\-\_\-ctx}}\label{structmg__context_a463677406a1b4dd5e5a6a9df427800ce} \item \hypertarget{structmg__context_adf904c7ddd0214498d77f9ba70262dce}{char $\ast$ {\bfseries config} \mbox{[}N\-U\-M\-\_\-\-O\-P\-T\-I\-O\-N\-S\mbox{]}}\label{structmg__context_adf904c7ddd0214498d77f9ba70262dce} \item \hypertarget{structmg__context_a3b5cc8977ca3af5ff20c3b445c0a9823}{mg\-\_\-callback\-\_\-t {\bfseries user\-\_\-callback}}\label{structmg__context_a3b5cc8977ca3af5ff20c3b445c0a9823} \item \hypertarget{structmg__context_a73a26dd1c9abead88b40b2d226ad9f28}{void $\ast$ {\bfseries user\-\_\-data}}\label{structmg__context_a73a26dd1c9abead88b40b2d226ad9f28} \item \hypertarget{structmg__context_a8639456185dda0c46dc6131f814a9d3f}{struct \hyperlink{structsocket}{socket} $\ast$ {\bfseries listening\-\_\-sockets}}\label{structmg__context_a8639456185dda0c46dc6131f814a9d3f} \item \hypertarget{structmg__context_a85cc21ebe888a9c10a87e135d242cf43}{int {\bfseries num\-\_\-threads}}\label{structmg__context_a85cc21ebe888a9c10a87e135d242cf43} \item \hypertarget{structmg__context_ae4d63e22f24744ca80804d96c2936dc1}{pthread\-\_\-mutex\-\_\-t {\bfseries mutex}}\label{structmg__context_ae4d63e22f24744ca80804d96c2936dc1} \item \hypertarget{structmg__context_ae7ffc4f7cdffe0c4341b3bc9bfb699a5}{pthread\-\_\-cond\-\_\-t {\bfseries cond}}\label{structmg__context_ae7ffc4f7cdffe0c4341b3bc9bfb699a5} \item \hypertarget{structmg__context_a1fdc6b1641a5eaa6d45c3140b3752a90}{struct \hyperlink{structsocket}{socket} {\bfseries queue} \mbox{[}20\mbox{]}}\label{structmg__context_a1fdc6b1641a5eaa6d45c3140b3752a90} \item \hypertarget{structmg__context_a3f0d6fd0b413fa48a21d94c9c909b421}{int {\bfseries sq\-\_\-head}}\label{structmg__context_a3f0d6fd0b413fa48a21d94c9c909b421} \item \hypertarget{structmg__context_af62080e6b4cbe517ab7605ee8d175cc5}{int {\bfseries sq\-\_\-tail}}\label{structmg__context_af62080e6b4cbe517ab7605ee8d175cc5} \item \hypertarget{structmg__context_aad49398eacc039c312d58c55530c65fa}{pthread\-\_\-cond\-\_\-t {\bfseries sq\-\_\-full}}\label{structmg__context_aad49398eacc039c312d58c55530c65fa} \item \hypertarget{structmg__context_a3260d5fc8e16e35026d7d2bbcb10abf5}{pthread\-\_\-cond\-\_\-t {\bfseries sq\-\_\-empty}}\label{structmg__context_a3260d5fc8e16e35026d7d2bbcb10abf5} \end{DoxyCompactItemize} The documentation for this struct was generated from the following file\-:\begin{DoxyCompactItemize} \item src/external/vpiotr-\/mongoose-\/cpp/mongoose.\-c\end{DoxyCompactItemize}
09jijiangwen-download
docs/latex/structmg__context.tex
TeX
asf20
2,987
\hypertarget{structsmoketest__program}{\section{smoketest\-\_\-program Struct Reference} \label{structsmoketest__program}\index{smoketest\-\_\-program@{smoketest\-\_\-program}} } Inheritance diagram for smoketest\-\_\-program\-:\begin{figure}[H] \begin{center} \leavevmode \includegraphics[height=2.000000cm]{structsmoketest__program} \end{center} \end{figure} \subsection*{Public Member Functions} \begin{DoxyCompactItemize} \item \hypertarget{structsmoketest__program_acb582a99fa69ac88aaa313a20a2c314d}{int {\bfseries initial\-\_\-value} (\hyperlink{structgraphchi_1_1graphchi__context}{graphchi\-\_\-context} \&info, \hyperlink{structgraphchi_1_1vertex__info}{vertex\-\_\-info} \&myvertex)}\label{structsmoketest__program_acb582a99fa69ac88aaa313a20a2c314d} \item \hypertarget{structsmoketest__program_ac47d83f5770d0ec72564cc62fc7d1d15}{int {\bfseries reset} ()}\label{structsmoketest__program_ac47d83f5770d0ec72564cc62fc7d1d15} \item \hypertarget{structsmoketest__program_a3070fe1597ee025bda42a7b267dcf7a9}{int {\bfseries op\-\_\-neighborval} (\hyperlink{structgraphchi_1_1graphchi__context}{graphchi\-\_\-context} \&info, \hyperlink{structgraphchi_1_1vertex__info}{vertex\-\_\-info} \&myvertex, vid\-\_\-t nbid, int nbval)}\label{structsmoketest__program_a3070fe1597ee025bda42a7b267dcf7a9} \item \hypertarget{structsmoketest__program_a58cf0d408d898777245c416973fb5544}{int {\bfseries plus} (int curval, int toadd)}\label{structsmoketest__program_a58cf0d408d898777245c416973fb5544} \item \hypertarget{structsmoketest__program_a28d5215603dae9bcee99b46ee9688196}{int {\bfseries compute\-\_\-vertexvalue} (\hyperlink{structgraphchi_1_1graphchi__context}{graphchi\-\_\-context} \&ginfo, \hyperlink{structgraphchi_1_1vertex__info}{vertex\-\_\-info} \&myvertex, int nbvalsum)}\label{structsmoketest__program_a28d5215603dae9bcee99b46ee9688196} \item \hypertarget{structsmoketest__program_abc937e7c50885e8c9f17c5f9bf6e477e}{int {\bfseries value\-\_\-to\-\_\-neighbor} (\hyperlink{structgraphchi_1_1graphchi__context}{graphchi\-\_\-context} \&info, \hyperlink{structgraphchi_1_1vertex__info}{vertex\-\_\-info} \&myvertex, vid\-\_\-t nbid, int myval)}\label{structsmoketest__program_abc937e7c50885e8c9f17c5f9bf6e477e} \end{DoxyCompactItemize} \subsection*{Additional Inherited Members} The documentation for this struct was generated from the following file\-:\begin{DoxyCompactItemize} \item src/tests/\hyperlink{bulksync__functional__test_8cpp}{bulksync\-\_\-functional\-\_\-test.\-cpp}\end{DoxyCompactItemize}
09jijiangwen-download
docs/latex/structsmoketest__program.tex
TeX
asf20
2,521
\hypertarget{vertex__data_8hpp}{\section{src/engine/auxdata/vertex\-\_\-data.hpp File Reference} \label{vertex__data_8hpp}\index{src/engine/auxdata/vertex\-\_\-data.\-hpp@{src/engine/auxdata/vertex\-\_\-data.\-hpp}} } {\ttfamily \#include $<$stdlib.\-h$>$}\\* {\ttfamily \#include $<$string$>$}\\* {\ttfamily \#include $<$assert.\-h$>$}\\* {\ttfamily \#include \char`\"{}graphchi\-\_\-types.\-hpp\char`\"{}}\\* {\ttfamily \#include \char`\"{}api/chifilenames.\-hpp\char`\"{}}\\* {\ttfamily \#include \char`\"{}io/stripedio.\-hpp\char`\"{}}\\* {\ttfamily \#include \char`\"{}util/ioutil.\-hpp\char`\"{}}\\* \subsection*{Classes} \begin{DoxyCompactItemize} \item class \hyperlink{classgraphchi_1_1vertex__data__store}{graphchi\-::vertex\-\_\-data\-\_\-store$<$ Vertex\-Data\-Type $>$} \end{DoxyCompactItemize} \subsection*{Namespaces} \begin{DoxyCompactItemize} \item namespace \hyperlink{namespacegraphchi}{graphchi} \end{DoxyCompactItemize} \subsection{Detailed Description} \begin{DoxyAuthor}{Author} Aapo Kyrola \href{mailto:akyrola@cs.cmu.edu}{\tt akyrola@cs.\-cmu.\-edu} \end{DoxyAuthor} \begin{DoxyVersion}{Version} 1.\-0 \end{DoxyVersion} \hypertarget{toplist_8hpp_LICENSE}{}\subsection{L\-I\-C\-E\-N\-S\-E}\label{toplist_8hpp_LICENSE} Copyright \mbox{[}2012\mbox{]} \mbox{[}Aapo Kyrola, Guy Blelloch, Carlos Guestrin / Carnegie Mellon University\mbox{]} Licensed under the Apache License, Version 2.\-0 (the \char`\"{}\-License\char`\"{}); you may not use this file except in compliance with the License. You may obtain a copy of the License at \href{http://www.apache.org/licenses/LICENSE-2.0}{\tt http\-://www.\-apache.\-org/licenses/\-L\-I\-C\-E\-N\-S\-E-\/2.\-0} Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \char`\"{}\-A\-S I\-S\char`\"{} B\-A\-S\-I\-S, W\-I\-T\-H\-O\-U\-T W\-A\-R\-R\-A\-N\-T\-I\-E\-S O\-R C\-O\-N\-D\-I\-T\-I\-O\-N\-S O\-F A\-N\-Y K\-I\-N\-D, either express or implied. See the License for the specific language governing permissions and limitations under the License.\hypertarget{toplist_8hpp_DESCRIPTION}{}\subsection{D\-E\-S\-C\-R\-I\-P\-T\-I\-O\-N}\label{toplist_8hpp_DESCRIPTION} The class manages vertex values (vertex data).
09jijiangwen-download
docs/latex/vertex__data_8hpp.tex
TeX
asf20
2,245
\hypertarget{functional__defs_8hpp}{\section{src/api/functional/functional\-\_\-defs.hpp File Reference} \label{functional__defs_8hpp}\index{src/api/functional/functional\-\_\-defs.\-hpp@{src/api/functional/functional\-\_\-defs.\-hpp}} } {\ttfamily \#include \char`\"{}api/graphchi\-\_\-program.\-hpp\char`\"{}}\\* \subsection*{Classes} \begin{DoxyCompactItemize} \item struct \hyperlink{structgraphchi_1_1vertex__info}{graphchi\-::vertex\-\_\-info} \end{DoxyCompactItemize} \subsection*{Namespaces} \begin{DoxyCompactItemize} \item namespace \hyperlink{namespacegraphchi}{graphchi} \end{DoxyCompactItemize} \subsection{Detailed Description} \begin{DoxyAuthor}{Author} Aapo Kyrola \href{mailto:akyrola@cs.cmu.edu}{\tt akyrola@cs.\-cmu.\-edu} \end{DoxyAuthor} \begin{DoxyVersion}{Version} 1.\-0 \end{DoxyVersion} \hypertarget{toplist_8hpp_LICENSE}{}\subsection{L\-I\-C\-E\-N\-S\-E}\label{toplist_8hpp_LICENSE} Copyright \mbox{[}2012\mbox{]} \mbox{[}Aapo Kyrola, Guy Blelloch, Carlos Guestrin / Carnegie Mellon University\mbox{]} Licensed under the Apache License, Version 2.\-0 (the \char`\"{}\-License\char`\"{}); you may not use this file except in compliance with the License. You may obtain a copy of the License at \href{http://www.apache.org/licenses/LICENSE-2.0}{\tt http\-://www.\-apache.\-org/licenses/\-L\-I\-C\-E\-N\-S\-E-\/2.\-0} Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \char`\"{}\-A\-S I\-S\char`\"{} B\-A\-S\-I\-S, W\-I\-T\-H\-O\-U\-T W\-A\-R\-R\-A\-N\-T\-I\-E\-S O\-R C\-O\-N\-D\-I\-T\-I\-O\-N\-S O\-F A\-N\-Y K\-I\-N\-D, either express or implied. See the License for the specific language governing permissions and limitations under the License.\hypertarget{toplist_8hpp_DESCRIPTION}{}\subsection{D\-E\-S\-C\-R\-I\-P\-T\-I\-O\-N}\label{toplist_8hpp_DESCRIPTION} Functional A\-P\-I defs.
09jijiangwen-download
docs/latex/functional__defs_8hpp.tex
TeX
asf20
1,890
\hypertarget{structmg__request__info_1_1mg__header}{\section{mg\-\_\-request\-\_\-info\-:\-:mg\-\_\-header Struct Reference} \label{structmg__request__info_1_1mg__header}\index{mg\-\_\-request\-\_\-info\-::mg\-\_\-header@{mg\-\_\-request\-\_\-info\-::mg\-\_\-header}} } \subsection*{Public Attributes} \begin{DoxyCompactItemize} \item \hypertarget{structmg__request__info_1_1mg__header_ae1537e652f4407bf44deb6bad278003d}{char $\ast$ {\bfseries name}}\label{structmg__request__info_1_1mg__header_ae1537e652f4407bf44deb6bad278003d} \item \hypertarget{structmg__request__info_1_1mg__header_a90f057013be658006fbc42c884f85a9f}{char $\ast$ {\bfseries value}}\label{structmg__request__info_1_1mg__header_a90f057013be658006fbc42c884f85a9f} \end{DoxyCompactItemize} The documentation for this struct was generated from the following file\-:\begin{DoxyCompactItemize} \item src/external/vpiotr-\/mongoose-\/cpp/mongoose.\-h\end{DoxyCompactItemize}
09jijiangwen-download
docs/latex/structmg__request__info_1_1mg__header.tex
TeX
asf20
945
\hypertarget{communitydetection_8cpp}{\section{example\-\_\-apps/communitydetection.cpp File Reference} \label{communitydetection_8cpp}\index{example\-\_\-apps/communitydetection.\-cpp@{example\-\_\-apps/communitydetection.\-cpp}} } {\ttfamily \#include $<$cmath$>$}\\* {\ttfamily \#include $<$map$>$}\\* {\ttfamily \#include $<$string$>$}\\* {\ttfamily \#include \char`\"{}graphchi\-\_\-basic\-\_\-includes.\-hpp\char`\"{}}\\* {\ttfamily \#include \char`\"{}util/labelanalysis.\-hpp\char`\"{}}\\* \subsection*{Classes} \begin{DoxyCompactItemize} \item struct \hyperlink{structbidirectional__label}{bidirectional\-\_\-label} \item struct \hyperlink{struct_community_detection_program}{Community\-Detection\-Program} \end{DoxyCompactItemize} \subsection*{Typedefs} \begin{DoxyCompactItemize} \item typedef vid\-\_\-t \hyperlink{communitydetection_8cpp_acf10237949ab87b83055ff6aa646c565}{Vertex\-Data\-Type} \item \hypertarget{communitydetection_8cpp_a8de01fb3810641bbd5a8183ab351584d}{typedef \hyperlink{structbidirectional__label}{bidirectional\-\_\-label} {\bfseries Edge\-Data\-Type}}\label{communitydetection_8cpp_a8de01fb3810641bbd5a8183ab351584d} \end{DoxyCompactItemize} \subsection*{Functions} \begin{DoxyCompactItemize} \item \hypertarget{communitydetection_8cpp_a1836b46ef02075c00334ecc406107656}{vid\-\_\-t \& {\bfseries neighbor\-\_\-label} (\hyperlink{structbidirectional__label}{bidirectional\-\_\-label} \&bidir, vid\-\_\-t myid, vid\-\_\-t nbid)}\label{communitydetection_8cpp_a1836b46ef02075c00334ecc406107656} \item \hypertarget{communitydetection_8cpp_a492d652a999fb7408dcf38952dc75ac4}{vid\-\_\-t \& {\bfseries my\-\_\-label} (\hyperlink{structbidirectional__label}{bidirectional\-\_\-label} \&bidir, vid\-\_\-t myid, vid\-\_\-t nbid)}\label{communitydetection_8cpp_a492d652a999fb7408dcf38952dc75ac4} \item \hypertarget{communitydetection_8cpp_a217dbf8b442f20279ea00b898af96f52}{int {\bfseries main} (int argc, const char $\ast$$\ast$argv)}\label{communitydetection_8cpp_a217dbf8b442f20279ea00b898af96f52} \end{DoxyCompactItemize} \subsection{Detailed Description} \begin{DoxyAuthor}{Author} Aapo Kyrola \href{mailto:akyrola@cs.cmu.edu}{\tt akyrola@cs.\-cmu.\-edu} \end{DoxyAuthor} \begin{DoxyVersion}{Version} 1.\-0 \end{DoxyVersion} \hypertarget{toplist_8hpp_LICENSE}{}\subsection{L\-I\-C\-E\-N\-S\-E}\label{toplist_8hpp_LICENSE} Copyright \mbox{[}2012\mbox{]} \mbox{[}Aapo Kyrola, Guy Blelloch, Carlos Guestrin / Carnegie Mellon University\mbox{]} Licensed under the Apache License, Version 2.\-0 (the \char`\"{}\-License\char`\"{}); you may not use this file except in compliance with the License. You may obtain a copy of the License at \href{http://www.apache.org/licenses/LICENSE-2.0}{\tt http\-://www.\-apache.\-org/licenses/\-L\-I\-C\-E\-N\-S\-E-\/2.\-0} Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \char`\"{}\-A\-S I\-S\char`\"{} B\-A\-S\-I\-S, W\-I\-T\-H\-O\-U\-T W\-A\-R\-R\-A\-N\-T\-I\-E\-S O\-R C\-O\-N\-D\-I\-T\-I\-O\-N\-S O\-F A\-N\-Y K\-I\-N\-D, either express or implied. See the License for the specific language governing permissions and limitations under the License.\hypertarget{toplist_8hpp_DESCRIPTION}{}\subsection{D\-E\-S\-C\-R\-I\-P\-T\-I\-O\-N}\label{toplist_8hpp_DESCRIPTION} A simple community detection algorithm based on label propagation. L\-P\-A-\/algorithm is explained in \href{http://arxiv.org/pdf/0910.1154.pdf}{\tt http\-://arxiv.\-org/pdf/0910.\-1154.\-pdf} "Advanced modularity-\/specialized label propagation algorithm for detecting communities in networks X. Liu, T. Murata Tokyo Institute of Technology, 2-\/12-\/1 Ookayama, Meguro, Tokyo 152-\/8552, Japan\hypertarget{connectedcomponents_8cpp_REMARKS}{}\subsection{R\-E\-M\-A\-R\-K\-S}\label{connectedcomponents_8cpp_REMARKS} The algorithm is very similar to the connected components algorithm, but instead of vertex choosing the minimum label of its neighbor, it chooses the most frequent one. However, because the operation (most frequent label) is not commutative, we need to store both vertices labels in an edge. See comment below, above the struct \char`\"{}bidirectional\-\_\-label\char`\"{}. Note, that this algorithm is not very sophisticated and is prone to local minimas. If you want to use this seriously, try with different initial labeling. Also, a more sophisticated algorithm called L\-P\-Am should be doable on Graph\-Chi. \begin{DoxyAuthor}{Author} Aapo Kyrola \end{DoxyAuthor} \subsection{Typedef Documentation} \hypertarget{communitydetection_8cpp_acf10237949ab87b83055ff6aa646c565}{\index{communitydetection.\-cpp@{communitydetection.\-cpp}!Vertex\-Data\-Type@{Vertex\-Data\-Type}} \index{Vertex\-Data\-Type@{Vertex\-Data\-Type}!communitydetection.cpp@{communitydetection.\-cpp}} \subsubsection[{Vertex\-Data\-Type}]{\setlength{\rightskip}{0pt plus 5cm}typedef vid\-\_\-t {\bf Vertex\-Data\-Type}}}\label{communitydetection_8cpp_acf10237949ab87b83055ff6aa646c565} Type definitions. Remember to create suitable graph shards using the Sharder-\/program.
09jijiangwen-download
docs/latex/communitydetection_8cpp.tex
TeX
asf20
5,085
\hypertarget{structmg__auth__header}{\section{mg\-\_\-auth\-\_\-header Struct Reference} \label{structmg__auth__header}\index{mg\-\_\-auth\-\_\-header@{mg\-\_\-auth\-\_\-header}} } \subsection*{Public Attributes} \begin{DoxyCompactItemize} \item \hypertarget{structmg__auth__header_a8c319ac11aa126fcac89a44c46739d14}{const char $\ast$ {\bfseries user}}\label{structmg__auth__header_a8c319ac11aa126fcac89a44c46739d14} \item \hypertarget{structmg__auth__header_a3504ba32c6a43a3fc4a0441ed95786e8}{const char $\ast$ {\bfseries uri}}\label{structmg__auth__header_a3504ba32c6a43a3fc4a0441ed95786e8} \item \hypertarget{structmg__auth__header_a9d5bd4d95827a71bb36a8a7e98cbc1fe}{const char $\ast$ {\bfseries cnonce}}\label{structmg__auth__header_a9d5bd4d95827a71bb36a8a7e98cbc1fe} \item \hypertarget{structmg__auth__header_a4dd86377fe54a6879d2ffa294533a26a}{const char $\ast$ {\bfseries response}}\label{structmg__auth__header_a4dd86377fe54a6879d2ffa294533a26a} \item \hypertarget{structmg__auth__header_a71c2332a5fccd8eb243981f8019be8fd}{const char $\ast$ {\bfseries qop}}\label{structmg__auth__header_a71c2332a5fccd8eb243981f8019be8fd} \item \hypertarget{structmg__auth__header_ab407074f03b164f58d17b1173f55fda9}{const char $\ast$ {\bfseries nc}}\label{structmg__auth__header_ab407074f03b164f58d17b1173f55fda9} \item \hypertarget{structmg__auth__header_a5bcf28b3228c92d5be142ef63b71cd08}{const char $\ast$ {\bfseries nonce}}\label{structmg__auth__header_a5bcf28b3228c92d5be142ef63b71cd08} \item \hypertarget{structmg__auth__header_ab10d3753d1fe38c7bbf48dafbb0a6455}{char $\ast$ {\bfseries ha1}}\label{structmg__auth__header_ab10d3753d1fe38c7bbf48dafbb0a6455} \item \hypertarget{structmg__auth__header_a45f4edc88b7b6d55a9d5a49110a1f9f7}{char $\ast$ {\bfseries expected\-\_\-response}}\label{structmg__auth__header_a45f4edc88b7b6d55a9d5a49110a1f9f7} \end{DoxyCompactItemize} The documentation for this struct was generated from the following file\-:\begin{DoxyCompactItemize} \item src/external/vpiotr-\/mongoose-\/cpp/mongoose.\-h\end{DoxyCompactItemize}
09jijiangwen-download
docs/latex/structmg__auth__header.tex
TeX
asf20
2,068
\hypertarget{pthread__tools_8hpp}{\section{src/util/pthread\-\_\-tools.hpp File Reference} \label{pthread__tools_8hpp}\index{src/util/pthread\-\_\-tools.\-hpp@{src/util/pthread\-\_\-tools.\-hpp}} } {\ttfamily \#include $<$cstdlib$>$}\\* {\ttfamily \#include $<$memory.\-h$>$}\\* {\ttfamily \#include $<$pthread.\-h$>$}\\* {\ttfamily \#include $<$semaphore.\-h$>$}\\* {\ttfamily \#include $<$sched.\-h$>$}\\* {\ttfamily \#include $<$signal.\-h$>$}\\* {\ttfamily \#include $<$sys/time.\-h$>$}\\* {\ttfamily \#include $<$vector$>$}\\* {\ttfamily \#include $<$cassert$>$}\\* {\ttfamily \#include $<$list$>$}\\* {\ttfamily \#include $<$iostream$>$}\\* \subsection*{Classes} \begin{DoxyCompactItemize} \item class \hyperlink{classgraphchi_1_1mutex}{graphchi\-::mutex} \item class \hyperlink{classgraphchi_1_1conditional}{graphchi\-::conditional} \item class \hyperlink{classgraphchi_1_1semaphore}{graphchi\-::semaphore} \item class \hyperlink{classgraphchi_1_1spinrwlock}{graphchi\-::spinrwlock} \item union {\bfseries graphchi\-::spinrwlock\-::rwticket} \item class \hyperlink{classgraphchi_1_1rwlock}{graphchi\-::rwlock} \item class \hyperlink{classgraphchi_1_1barrier}{graphchi\-::barrier} \end{DoxyCompactItemize} \subsection*{Namespaces} \begin{DoxyCompactItemize} \item namespace \hyperlink{namespacegraphchi}{graphchi} \end{DoxyCompactItemize} \subsection*{Macros} \begin{DoxyCompactItemize} \item \hypertarget{pthread__tools_8hpp_ad022064435f5624d1112e6dded65456a}{\#define {\bfseries \-\_\-\-P\-O\-S\-I\-X\-\_\-\-S\-P\-I\-N\-\_\-\-L\-O\-C\-K\-S}~-\/1}\label{pthread__tools_8hpp_ad022064435f5624d1112e6dded65456a} \item \hypertarget{pthread__tools_8hpp_af18b4423b3fbe3bbc8e1fba580e9f959}{\#define {\bfseries S\-P\-I\-N\-L\-O\-C\-K\-\_\-\-S\-U\-P\-P\-O\-R\-T\-E\-D}~0}\label{pthread__tools_8hpp_af18b4423b3fbe3bbc8e1fba580e9f959} \item \hypertarget{pthread__tools_8hpp_a97c020c88ee892bb5a3055d5a68c9788}{\#define {\bfseries atomic\-\_\-xadd}(P, V)~\-\_\-\-\_\-sync\-\_\-fetch\-\_\-and\-\_\-add((P), (V))}\label{pthread__tools_8hpp_a97c020c88ee892bb5a3055d5a68c9788} \item \hypertarget{pthread__tools_8hpp_a2ecfcce98539a0b972d6fa2586c4e67f}{\#define {\bfseries cmpxchg}(P, O, N)~\-\_\-\-\_\-sync\-\_\-val\-\_\-compare\-\_\-and\-\_\-swap((P), (O), (N))}\label{pthread__tools_8hpp_a2ecfcce98539a0b972d6fa2586c4e67f} \item \hypertarget{pthread__tools_8hpp_a45a583ebc7ce181c15688c871f955e98}{\#define {\bfseries atomic\-\_\-inc}(P)~\-\_\-\-\_\-sync\-\_\-add\-\_\-and\-\_\-fetch((P), 1)}\label{pthread__tools_8hpp_a45a583ebc7ce181c15688c871f955e98} \end{DoxyCompactItemize} \subsection*{Typedefs} \begin{DoxyCompactItemize} \item \hypertarget{namespacegraphchi_a86d970062f7c0596b53faaabd29cf9a8}{typedef mutex \hyperlink{namespacegraphchi_a86d970062f7c0596b53faaabd29cf9a8}{graphchi\-::spinlock}}\label{namespacegraphchi_a86d970062f7c0596b53faaabd29cf9a8} \begin{DoxyCompactList}\small\item\em if spinlock not supported, it is typedef it to a mutex. \end{DoxyCompactList}\end{DoxyCompactItemize} \subsection*{Functions} \begin{DoxyCompactItemize} \item \hypertarget{namespacegraphchi_a06eafe9d38f82c61515fbcb151361af0}{void {\bfseries graphchi\-::prefetch\-\_\-range} (void $\ast$addr, size\-\_\-t len)}\label{namespacegraphchi_a06eafe9d38f82c61515fbcb151361af0} \item \hypertarget{namespacegraphchi_a7cae7ee17128428446762964e0710b47}{void {\bfseries graphchi\-::prefetch\-\_\-range\-\_\-write} (void $\ast$addr, size\-\_\-t len)}\label{namespacegraphchi_a7cae7ee17128428446762964e0710b47} \end{DoxyCompactItemize} \subsection{Detailed Description} A collection of utilities for threading
09jijiangwen-download
docs/latex/pthread__tools_8hpp.tex
TeX
asf20
3,610
\hypertarget{reporters_2html__reporter_8hpp}{\section{src/metrics/reporters/html\-\_\-reporter.hpp File Reference} \label{reporters_2html__reporter_8hpp}\index{src/metrics/reporters/html\-\_\-reporter.\-hpp@{src/metrics/reporters/html\-\_\-reporter.\-hpp}} } {\ttfamily \#include $<$cstdio$>$}\\* {\ttfamily \#include $<$metrics/imetrics\-\_\-reporter.\-hpp$>$}\\* \subsection*{Classes} \begin{DoxyCompactItemize} \item class \hyperlink{classgraphchi_1_1html__reporter}{graphchi\-::html\-\_\-reporter} \end{DoxyCompactItemize} \subsection*{Namespaces} \begin{DoxyCompactItemize} \item namespace \hyperlink{namespacegraphchi}{graphchi} \end{DoxyCompactItemize} \subsection{Detailed Description} \begin{DoxyAuthor}{Author} Aapo Kyrola \href{mailto:akyrola@cs.cmu.edu}{\tt akyrola@cs.\-cmu.\-edu} \end{DoxyAuthor} \begin{DoxyVersion}{Version} 1.\-0 \end{DoxyVersion} \hypertarget{toplist_8hpp_LICENSE}{}\subsection{L\-I\-C\-E\-N\-S\-E}\label{toplist_8hpp_LICENSE} Copyright \mbox{[}2012\mbox{]} \mbox{[}Aapo Kyrola, Guy Blelloch, Carlos Guestrin / Carnegie Mellon University\mbox{]} Licensed under the Apache License, Version 2.\-0 (the \char`\"{}\-License\char`\"{}); you may not use this file except in compliance with the License. You may obtain a copy of the License at \href{http://www.apache.org/licenses/LICENSE-2.0}{\tt http\-://www.\-apache.\-org/licenses/\-L\-I\-C\-E\-N\-S\-E-\/2.\-0} Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \char`\"{}\-A\-S I\-S\char`\"{} B\-A\-S\-I\-S, W\-I\-T\-H\-O\-U\-T W\-A\-R\-R\-A\-N\-T\-I\-E\-S O\-R C\-O\-N\-D\-I\-T\-I\-O\-N\-S O\-F A\-N\-Y K\-I\-N\-D, either express or implied. See the License for the specific language governing permissions and limitations under the License.\hypertarget{toplist_8hpp_DESCRIPTION}{}\subsection{D\-E\-S\-C\-R\-I\-P\-T\-I\-O\-N}\label{toplist_8hpp_DESCRIPTION} File metrics reporter.
09jijiangwen-download
docs/latex/reporters_2html__reporter_8hpp.tex
TeX
asf20
1,940
%!PS-Adobe-2.0 EPSF-2.0 %%Title: ClassName %%Creator: Doxygen %%CreationDate: Time %%For: %Magnification: 1.00 %%Orientation: Portrait %%BoundingBox: 0 0 500 103.896104 %%Pages: 0 %%BeginSetup %%EndSetup %%EndComments % ----- variables ----- /boxwidth 0 def /boxheight 40 def /fontheight 24 def /marginwidth 10 def /distx 20 def /disty 40 def /boundaspect 4.812500 def % aspect ratio of the BoundingBox (width/height) /boundx 500 def /boundy boundx boundaspect div def /xspacing 0 def /yspacing 0 def /rows 2 def /cols 1 def /scalefactor 0 def /boxfont /Times-Roman findfont fontheight scalefont def % ----- procedures ----- /dotted { [1 4] 0 setdash } def /dashed { [5] 0 setdash } def /solid { [] 0 setdash } def /max % result = MAX(arg1,arg2) { /a exch def /b exch def a b gt {a} {b} ifelse } def /xoffset % result = MAX(0,(scalefactor-(boxwidth*cols+distx*(cols-1)))/2) { 0 scalefactor boxwidth cols mul distx cols 1 sub mul add sub 2 div max } def /cw % boxwidth = MAX(boxwidth, stringwidth(arg1)) { /str exch def /boxwidth boxwidth str stringwidth pop max def } def /box % draws a box with text `arg1' at grid pos (arg2,arg3) { gsave 2 setlinewidth newpath exch xspacing mul xoffset add exch yspacing mul moveto boxwidth 0 rlineto 0 boxheight rlineto boxwidth neg 0 rlineto 0 boxheight neg rlineto closepath dup stringwidth pop neg boxwidth add 2 div boxheight fontheight 2 div sub 2 div rmoveto show stroke grestore } def /mark { newpath exch xspacing mul xoffset add boxwidth add exch yspacing mul moveto 0 boxheight 4 div rlineto boxheight neg 4 div boxheight neg 4 div rlineto closepath eofill stroke } def /arrow { newpath moveto 3 -8 rlineto -6 0 rlineto 3 8 rlineto closepath eofill stroke } def /out % draws an output connector for the block at (arg1,arg2) { newpath exch xspacing mul xoffset add boxwidth 2 div add exch yspacing mul boxheight add /y exch def /x exch def x y moveto 0 disty 2 div rlineto stroke 1 eq { x y disty 2 div add arrow } if } def /in % draws an input connector for the block at (arg1,arg2) { newpath exch xspacing mul xoffset add boxwidth 2 div add exch yspacing mul disty 2 div sub /y exch def /x exch def x y moveto 0 disty 2 div rlineto stroke 1 eq { x y disty 2 div add arrow } if } def /hedge { exch xspacing mul xoffset add boxwidth 2 div add exch yspacing mul boxheight 2 div sub /y exch def /x exch def newpath x y moveto boxwidth 2 div distx add 0 rlineto stroke 1 eq { newpath x boxwidth 2 div distx add add y moveto -8 3 rlineto 0 -6 rlineto 8 3 rlineto closepath eofill stroke } if } def /vedge { /ye exch def /ys exch def /xs exch def newpath xs xspacing mul xoffset add boxwidth 2 div add dup ys yspacing mul boxheight 2 div sub moveto ye yspacing mul boxheight 2 div sub lineto stroke } def /conn % connections the blocks from col `arg1' to `arg2' of row `arg3' { /ys exch def /xe exch def /xs exch def newpath xs xspacing mul xoffset add boxwidth 2 div add ys yspacing mul disty 2 div sub moveto xspacing xe xs sub mul 0 rlineto stroke } def % ----- main ------ boxfont setfont 1 boundaspect scale (ALSEdgeFactorsProgram) cw (graphchi::GraphChiProgram< VertexDataType, EdgeDataType >) cw /boxwidth boxwidth marginwidth 2 mul add def /xspacing boxwidth distx add def /yspacing boxheight disty add def /scalefactor boxwidth cols mul distx cols 1 sub mul add boxheight rows mul disty rows 1 sub mul add boundaspect mul max def boundx scalefactor div boundy scalefactor div scale % ----- classes ----- (ALSEdgeFactorsProgram) 0.000000 0.000000 box (graphchi::GraphChiProgram< VertexDataType, EdgeDataType >) 0.000000 1.000000 box % ----- relations ----- solid 0 0.000000 0.000000 out solid 1 0.000000 1.000000 in
09jijiangwen-download
docs/latex/struct_a_l_s_edge_factors_program.eps
PostScript
asf20
3,898
\hypertarget{structlatentvec__t}{\section{latentvec\-\_\-t Struct Reference} \label{structlatentvec__t}\index{latentvec\-\_\-t@{latentvec\-\_\-t}} } \subsection*{Public Member Functions} \begin{DoxyCompactItemize} \item \hypertarget{structlatentvec__t_a59b5ecc4e5c062550b9488e4a9cb7e94}{void {\bfseries init} ()}\label{structlatentvec__t_a59b5ecc4e5c062550b9488e4a9cb7e94} \item \hypertarget{structlatentvec__t_ae0dd358e7caeffdd1ca9a65328117b17}{double \& {\bfseries operator\mbox{[}$\,$\mbox{]}} (int idx)}\label{structlatentvec__t_ae0dd358e7caeffdd1ca9a65328117b17} \item \hypertarget{structlatentvec__t_ab346b7121751756c9aca33c0dbdd77d5}{bool {\bfseries operator!=} (const \hyperlink{structlatentvec__t}{latentvec\-\_\-t} \&oth) const }\label{structlatentvec__t_ab346b7121751756c9aca33c0dbdd77d5} \item \hypertarget{structlatentvec__t_ac8c50f2d93ef5e2d3c4a58321e12d495}{double {\bfseries dot} (\hyperlink{structlatentvec__t}{latentvec\-\_\-t} \&oth) const }\label{structlatentvec__t_ac8c50f2d93ef5e2d3c4a58321e12d495} \end{DoxyCompactItemize} \subsection*{Public Attributes} \begin{DoxyCompactItemize} \item \hypertarget{structlatentvec__t_a6ce42ca776455eb8d37be2b1748d74a4}{double {\bfseries d} \mbox{[}N\-L\-A\-T\-E\-N\-T\mbox{]}}\label{structlatentvec__t_a6ce42ca776455eb8d37be2b1748d74a4} \end{DoxyCompactItemize} The documentation for this struct was generated from the following file\-:\begin{DoxyCompactItemize} \item example\-\_\-apps/matrix\-\_\-factorization/\hyperlink{als_8hpp}{als.\-hpp}\end{DoxyCompactItemize}
09jijiangwen-download
docs/latex/structlatentvec__t.tex
TeX
asf20
1,541
\hypertarget{reporters_2basic__reporter_8hpp}{\section{src/metrics/reporters/basic\-\_\-reporter.hpp File Reference} \label{reporters_2basic__reporter_8hpp}\index{src/metrics/reporters/basic\-\_\-reporter.\-hpp@{src/metrics/reporters/basic\-\_\-reporter.\-hpp}} } {\ttfamily \#include $<$iostream$>$}\\* {\ttfamily \#include $<$map$>$}\\* {\ttfamily \#include \char`\"{}metrics/imetrics\-\_\-reporter.\-hpp\char`\"{}}\\* \subsection*{Classes} \begin{DoxyCompactItemize} \item class \hyperlink{classgraphchi_1_1basic__reporter}{graphchi\-::basic\-\_\-reporter} \end{DoxyCompactItemize} \subsection*{Namespaces} \begin{DoxyCompactItemize} \item namespace \hyperlink{namespacegraphchi}{graphchi} \end{DoxyCompactItemize} \subsection{Detailed Description} \begin{DoxyAuthor}{Author} Aapo Kyrola \href{mailto:akyrola@cs.cmu.edu}{\tt akyrola@cs.\-cmu.\-edu} \end{DoxyAuthor} \begin{DoxyVersion}{Version} 1.\-0 \end{DoxyVersion} \hypertarget{toplist_8hpp_LICENSE}{}\subsection{L\-I\-C\-E\-N\-S\-E}\label{toplist_8hpp_LICENSE} Copyright \mbox{[}2012\mbox{]} \mbox{[}Aapo Kyrola, Guy Blelloch, Carlos Guestrin / Carnegie Mellon University\mbox{]} Licensed under the Apache License, Version 2.\-0 (the \char`\"{}\-License\char`\"{}); you may not use this file except in compliance with the License. You may obtain a copy of the License at \href{http://www.apache.org/licenses/LICENSE-2.0}{\tt http\-://www.\-apache.\-org/licenses/\-L\-I\-C\-E\-N\-S\-E-\/2.\-0} Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \char`\"{}\-A\-S I\-S\char`\"{} B\-A\-S\-I\-S, W\-I\-T\-H\-O\-U\-T W\-A\-R\-R\-A\-N\-T\-I\-E\-S O\-R C\-O\-N\-D\-I\-T\-I\-O\-N\-S O\-F A\-N\-Y K\-I\-N\-D, either express or implied. See the License for the specific language governing permissions and limitations under the License.\hypertarget{toplist_8hpp_DESCRIPTION}{}\subsection{D\-E\-S\-C\-R\-I\-P\-T\-I\-O\-N}\label{toplist_8hpp_DESCRIPTION} Simple metrics reporter that dumps metrics to standard output.
09jijiangwen-download
docs/latex/reporters_2basic__reporter_8hpp.tex
TeX
asf20
2,038
\hypertarget{reps_2html__reporter_8hpp}{\section{src/metrics/reps/html\-\_\-reporter.hpp File Reference} \label{reps_2html__reporter_8hpp}\index{src/metrics/reps/html\-\_\-reporter.\-hpp@{src/metrics/reps/html\-\_\-reporter.\-hpp}} } {\ttfamily \#include $<$cstdio$>$}\\* {\ttfamily \#include \char`\"{}metrics/metrics.\-hpp\char`\"{}}\\* \subsection*{Classes} \begin{DoxyCompactItemize} \item class \hyperlink{classgraphchi_1_1html__reporter}{graphchi\-::html\-\_\-reporter} \end{DoxyCompactItemize} \subsection*{Namespaces} \begin{DoxyCompactItemize} \item namespace \hyperlink{namespacegraphchi}{graphchi} \end{DoxyCompactItemize} \subsection{Detailed Description} \begin{DoxyAuthor}{Author} Aapo Kyrola \href{mailto:akyrola@cs.cmu.edu}{\tt akyrola@cs.\-cmu.\-edu} \end{DoxyAuthor} \begin{DoxyVersion}{Version} 1.\-0 \end{DoxyVersion} \hypertarget{toplist_8hpp_LICENSE}{}\subsection{L\-I\-C\-E\-N\-S\-E}\label{toplist_8hpp_LICENSE} Copyright \mbox{[}2012\mbox{]} \mbox{[}Aapo Kyrola, Guy Blelloch, Carlos Guestrin / Carnegie Mellon University\mbox{]} Licensed under the Apache License, Version 2.\-0 (the \char`\"{}\-License\char`\"{}); you may not use this file except in compliance with the License. You may obtain a copy of the License at \href{http://www.apache.org/licenses/LICENSE-2.0}{\tt http\-://www.\-apache.\-org/licenses/\-L\-I\-C\-E\-N\-S\-E-\/2.\-0} Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \char`\"{}\-A\-S I\-S\char`\"{} B\-A\-S\-I\-S, W\-I\-T\-H\-O\-U\-T W\-A\-R\-R\-A\-N\-T\-I\-E\-S O\-R C\-O\-N\-D\-I\-T\-I\-O\-N\-S O\-F A\-N\-Y K\-I\-N\-D, either express or implied. See the License for the specific language governing permissions and limitations under the License.\hypertarget{toplist_8hpp_DESCRIPTION}{}\subsection{D\-E\-S\-C\-R\-I\-P\-T\-I\-O\-N}\label{toplist_8hpp_DESCRIPTION} File metrics reporter.
09jijiangwen-download
docs/latex/reps_2html__reporter_8hpp.tex
TeX
asf20
1,914
\hypertarget{streaming__pagerank_8cpp}{\section{example\-\_\-apps/streaming\-\_\-pagerank.cpp File Reference} \label{streaming__pagerank_8cpp}\index{example\-\_\-apps/streaming\-\_\-pagerank.\-cpp@{example\-\_\-apps/streaming\-\_\-pagerank.\-cpp}} } {\ttfamily \#include $<$string$>$}\\* {\ttfamily \#include $<$fstream$>$}\\* {\ttfamily \#include $<$cmath$>$}\\* {\ttfamily \#include \char`\"{}graphchi\-\_\-basic\-\_\-includes.\-hpp\char`\"{}}\\* {\ttfamily \#include \char`\"{}engine/dynamic\-\_\-graphs/graphchi\-\_\-dynamicgraph\-\_\-engine.\-hpp\char`\"{}}\\* {\ttfamily \#include \char`\"{}util/toplist.\-hpp\char`\"{}}\\* {\ttfamily \#include \char`\"{}httpadmin/chi\-\_\-httpadmin.\-hpp\char`\"{}}\\* {\ttfamily \#include \char`\"{}httpadmin/plotter.\-hpp\char`\"{}}\\* \subsection*{Classes} \begin{DoxyCompactItemize} \item struct \hyperlink{struct_pagerank_program}{Pagerank\-Program} \end{DoxyCompactItemize} \subsection*{Macros} \begin{DoxyCompactItemize} \item \hypertarget{streaming__pagerank_8cpp_a4679d8ea8690999a6c6c7c0cb245c879}{\#define {\bfseries T\-H\-R\-E\-S\-H\-O\-L\-D}~1e-\/1f}\label{streaming__pagerank_8cpp_a4679d8ea8690999a6c6c7c0cb245c879} \item \hypertarget{streaming__pagerank_8cpp_a5e3939b7192acef3f437bb0edc1c63df}{\#define {\bfseries R\-A\-N\-D\-O\-M\-R\-E\-S\-E\-T\-P\-R\-O\-B}~0.\-15f}\label{streaming__pagerank_8cpp_a5e3939b7192acef3f437bb0edc1c63df} \item \hypertarget{streaming__pagerank_8cpp_ad5c46706b38c7dc7ebb32e964a24fd13}{\#define {\bfseries D\-E\-M\-O}~1}\label{streaming__pagerank_8cpp_ad5c46706b38c7dc7ebb32e964a24fd13} \end{DoxyCompactItemize} \subsection*{Typedefs} \begin{DoxyCompactItemize} \item \hypertarget{streaming__pagerank_8cpp_a357c4eed6dd08b74c2a63472c0f10afa}{typedef float {\bfseries Vertex\-Data\-Type}}\label{streaming__pagerank_8cpp_a357c4eed6dd08b74c2a63472c0f10afa} \item \hypertarget{streaming__pagerank_8cpp_af2381c28a1096b588ce381c1037d2264}{typedef float {\bfseries Edge\-Data\-Type}}\label{streaming__pagerank_8cpp_af2381c28a1096b588ce381c1037d2264} \end{DoxyCompactItemize} \subsection*{Functions} \begin{DoxyCompactItemize} \item \hypertarget{streaming__pagerank_8cpp_abd72c37d1db6a7d178db70ca4df5165d}{std\-::string {\bfseries getname} (vid\-\_\-t v)}\label{streaming__pagerank_8cpp_abd72c37d1db6a7d178db70ca4df5165d} \item \hypertarget{streaming__pagerank_8cpp_af286b4603a69d710fbeca99e345d508f}{void $\ast$ {\bfseries plotter\-\_\-thread} (void $\ast$info)}\label{streaming__pagerank_8cpp_af286b4603a69d710fbeca99e345d508f} \item void $\ast$ \hyperlink{streaming__pagerank_8cpp_a07cffb3d80a3b3a9f675df2f3a7f8fdd}{dynamic\-\_\-graph\-\_\-reader} (void $\ast$info) \item \hypertarget{streaming__pagerank_8cpp_a217dbf8b442f20279ea00b898af96f52}{int {\bfseries main} (int argc, const char $\ast$$\ast$argv)}\label{streaming__pagerank_8cpp_a217dbf8b442f20279ea00b898af96f52} \end{DoxyCompactItemize} \subsection*{Variables} \begin{DoxyCompactItemize} \item \hypertarget{streaming__pagerank_8cpp_aaba7afae9ad22e92a975f980009b218a}{\hyperlink{classgraphchi_1_1graphchi__dynamicgraph__engine}{graphchi\-\_\-dynamicgraph\-\_\-engine}\\* $<$ float, float $>$ $\ast$ {\bfseries dyngraph\-\_\-engine}}\label{streaming__pagerank_8cpp_aaba7afae9ad22e92a975f980009b218a} \item \hypertarget{streaming__pagerank_8cpp_af0de0677ed3e06af221954c75af9e23d}{std\-::string {\bfseries streaming\-\_\-graph\-\_\-file}}\label{streaming__pagerank_8cpp_af0de0677ed3e06af221954c75af9e23d} \item \hypertarget{streaming__pagerank_8cpp_a36f7b6be7108281af77939ceaec42fd6}{bool {\bfseries running} = true}\label{streaming__pagerank_8cpp_a36f7b6be7108281af77939ceaec42fd6} \end{DoxyCompactItemize} \subsection{Detailed Description} \begin{DoxyAuthor}{Author} Aapo Kyrola \href{mailto:akyrola@cs.cmu.edu}{\tt akyrola@cs.\-cmu.\-edu} \end{DoxyAuthor} \begin{DoxyVersion}{Version} 1.\-0 \end{DoxyVersion} \hypertarget{toplist_8hpp_LICENSE}{}\subsection{L\-I\-C\-E\-N\-S\-E}\label{toplist_8hpp_LICENSE} Copyright \mbox{[}2012\mbox{]} \mbox{[}Aapo Kyrola, Guy Blelloch, Carlos Guestrin / Carnegie Mellon University\mbox{]} Licensed under the Apache License, Version 2.\-0 (the \char`\"{}\-License\char`\"{}); you may not use this file except in compliance with the License. You may obtain a copy of the License at \href{http://www.apache.org/licenses/LICENSE-2.0}{\tt http\-://www.\-apache.\-org/licenses/\-L\-I\-C\-E\-N\-S\-E-\/2.\-0} Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \char`\"{}\-A\-S I\-S\char`\"{} B\-A\-S\-I\-S, W\-I\-T\-H\-O\-U\-T W\-A\-R\-R\-A\-N\-T\-I\-E\-S O\-R C\-O\-N\-D\-I\-T\-I\-O\-N\-S O\-F A\-N\-Y K\-I\-N\-D, either express or implied. See the License for the specific language governing permissions and limitations under the License.\hypertarget{toplist_8hpp_DESCRIPTION}{}\subsection{D\-E\-S\-C\-R\-I\-P\-T\-I\-O\-N}\label{toplist_8hpp_DESCRIPTION} Demonstration for streaming graph updates. This application reads from a file list of edges and adds them into the graph continuously. Simultaneously, pagerank is computed for the evolving graph. \subsection{Function Documentation} \hypertarget{streaming__pagerank_8cpp_a07cffb3d80a3b3a9f675df2f3a7f8fdd}{\index{streaming\-\_\-pagerank.\-cpp@{streaming\-\_\-pagerank.\-cpp}!dynamic\-\_\-graph\-\_\-reader@{dynamic\-\_\-graph\-\_\-reader}} \index{dynamic\-\_\-graph\-\_\-reader@{dynamic\-\_\-graph\-\_\-reader}!streaming_pagerank.cpp@{streaming\-\_\-pagerank.\-cpp}} \subsubsection[{dynamic\-\_\-graph\-\_\-reader}]{\setlength{\rightskip}{0pt plus 5cm}void $\ast$ dynamic\-\_\-graph\-\_\-reader ( \begin{DoxyParamCaption} \item[{void $\ast$}]{info} \end{DoxyParamCaption} )}}\label{streaming__pagerank_8cpp_a07cffb3d80a3b3a9f675df2f3a7f8fdd} Function executed by a separate thread that streams graph from a file.
09jijiangwen-download
docs/latex/streaming__pagerank_8cpp.tex
TeX
asf20
5,834
\hypertarget{als__edgefactors_8cpp}{\section{example\-\_\-apps/matrix\-\_\-factorization/als\-\_\-edgefactors.cpp File Reference} \label{als__edgefactors_8cpp}\index{example\-\_\-apps/matrix\-\_\-factorization/als\-\_\-edgefactors.\-cpp@{example\-\_\-apps/matrix\-\_\-factorization/als\-\_\-edgefactors.\-cpp}} } {\ttfamily \#include $<$string$>$}\\* {\ttfamily \#include $<$algorithm$>$}\\* {\ttfamily \#include \char`\"{}graphchi\-\_\-basic\-\_\-includes.\-hpp\char`\"{}}\\* {\ttfamily \#include \char`\"{}als.\-hpp\char`\"{}}\\* \subsection*{Classes} \begin{DoxyCompactItemize} \item struct \hyperlink{struct_a_l_s_edge_factors_program}{A\-L\-S\-Edge\-Factors\-Program} \end{DoxyCompactItemize} \subsection*{Typedefs} \begin{DoxyCompactItemize} \item typedef \hyperlink{structlatentvec__t}{latentvec\-\_\-t} \hyperlink{als__edgefactors_8cpp_acd2f11571e777894d1d2b0faab84bbb8}{Vertex\-Data\-Type} \item \hypertarget{als__edgefactors_8cpp_a69515e5736ec6f0c05364570a42d8c36}{typedef \hyperlink{structals__factor__and__weight}{als\-\_\-factor\-\_\-and\-\_\-weight} {\bfseries Edge\-Data\-Type}}\label{als__edgefactors_8cpp_a69515e5736ec6f0c05364570a42d8c36} \end{DoxyCompactItemize} \subsection*{Functions} \begin{DoxyCompactItemize} \item \hypertarget{als__edgefactors_8cpp_a217dbf8b442f20279ea00b898af96f52}{int {\bfseries main} (int argc, const char $\ast$$\ast$argv)}\label{als__edgefactors_8cpp_a217dbf8b442f20279ea00b898af96f52} \end{DoxyCompactItemize} \subsection{Detailed Description} \begin{DoxyAuthor}{Author} Aapo Kyrola \href{mailto:akyrola@cs.cmu.edu}{\tt akyrola@cs.\-cmu.\-edu} \end{DoxyAuthor} \begin{DoxyVersion}{Version} 1.\-0 \end{DoxyVersion} \hypertarget{toplist_8hpp_LICENSE}{}\subsection{L\-I\-C\-E\-N\-S\-E}\label{toplist_8hpp_LICENSE} Copyright \mbox{[}2012\mbox{]} \mbox{[}Aapo Kyrola, Guy Blelloch, Carlos Guestrin / Carnegie Mellon University\mbox{]} Licensed under the Apache License, Version 2.\-0 (the \char`\"{}\-License\char`\"{}); you may not use this file except in compliance with the License. You may obtain a copy of the License at \href{http://www.apache.org/licenses/LICENSE-2.0}{\tt http\-://www.\-apache.\-org/licenses/\-L\-I\-C\-E\-N\-S\-E-\/2.\-0} Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \char`\"{}\-A\-S I\-S\char`\"{} B\-A\-S\-I\-S, W\-I\-T\-H\-O\-U\-T W\-A\-R\-R\-A\-N\-T\-I\-E\-S O\-R C\-O\-N\-D\-I\-T\-I\-O\-N\-S O\-F A\-N\-Y K\-I\-N\-D, either express or implied. See the License for the specific language governing permissions and limitations under the License.\hypertarget{toplist_8hpp_DESCRIPTION}{}\subsection{D\-E\-S\-C\-R\-I\-P\-T\-I\-O\-N}\label{toplist_8hpp_DESCRIPTION} Matrix factorizatino with the Alternative Least Squares (A\-L\-S) algorithm. This code is based on Graph\-Lab's implementation of A\-L\-S by Joey Gonzalez and Danny Bickson (C\-M\-U). A good explanation of the algorithm is given in the following paper\-: Large-\/\-Scale Parallel Collaborative Filtering for the Netflix Prize Yunhong Zhou, Dennis Wilkinson, Robert Schreiber and Rong Pan \href{http://www.springerlink.com/content/j1076u0h14586183/}{\tt http\-://www.\-springerlink.\-com/content/j1076u0h14586183/} There are two versions of the A\-L\-S in the example applications. This version is slower, but works with very low memory. In this implementation, a vertex writes its D-\/dimensional latent factor to its incident edges. See application \char`\"{}als\-\_\-vertices\-\_\-inmem\char`\"{} for a faster version, which requires more memory. In the code, we use movie-\/rating terminology for clarity. This code has been tested with the Netflix movie rating challenge, where the task is to predict how user rates movies in range from 1 to 5. This code is has integrated preprocessing, 'sharding', so it is not necessary to run sharder prior to running the matrix factorization algorithm. Input data must be provided in the Matrix Market format (\href{http://math.nist.gov/MatrixMarket/formats.html}{\tt http\-://math.\-nist.\-gov/\-Matrix\-Market/formats.\-html}). A\-L\-S uses free linear algebra library 'Eigen'. See Readme\-\_\-\-Eigen.\-txt for instructions how to obtain it. At the end of the processing, the two latent factor matrices are written into files in the matrix market format.\hypertarget{als__vertices__inmem_8cpp_USAGE}{}\subsection{U\-S\-A\-G\-E}\label{als__vertices__inmem_8cpp_USAGE} bin/example\-\_\-apps/matrix\-\_\-factorization/als\-\_\-edgefactors file $<$matrix-\/market-\/input$>$ niters 5 \subsection{Typedef Documentation} \hypertarget{als__edgefactors_8cpp_acd2f11571e777894d1d2b0faab84bbb8}{\index{als\-\_\-edgefactors.\-cpp@{als\-\_\-edgefactors.\-cpp}!Vertex\-Data\-Type@{Vertex\-Data\-Type}} \index{Vertex\-Data\-Type@{Vertex\-Data\-Type}!als_edgefactors.cpp@{als\-\_\-edgefactors.\-cpp}} \subsubsection[{Vertex\-Data\-Type}]{\setlength{\rightskip}{0pt plus 5cm}typedef {\bf latentvec\-\_\-t} {\bf Vertex\-Data\-Type}}}\label{als__edgefactors_8cpp_acd2f11571e777894d1d2b0faab84bbb8} Type definitions. Remember to create suitable graph shards using the Sharder-\/program.
09jijiangwen-download
docs/latex/als__edgefactors_8cpp.tex
TeX
asf20
5,140
\hypertarget{reps_2basic__reporter_8hpp}{\section{src/metrics/reps/basic\-\_\-reporter.hpp File Reference} \label{reps_2basic__reporter_8hpp}\index{src/metrics/reps/basic\-\_\-reporter.\-hpp@{src/metrics/reps/basic\-\_\-reporter.\-hpp}} } {\ttfamily \#include $<$iostream$>$}\\* {\ttfamily \#include $<$map$>$}\\* {\ttfamily \#include \char`\"{}metrics/metrics.\-hpp\char`\"{}}\\* \subsection*{Classes} \begin{DoxyCompactItemize} \item class \hyperlink{classgraphchi_1_1basic__reporter}{graphchi\-::basic\-\_\-reporter} \end{DoxyCompactItemize} \subsection*{Namespaces} \begin{DoxyCompactItemize} \item namespace \hyperlink{namespacegraphchi}{graphchi} \end{DoxyCompactItemize} \subsection{Detailed Description} \begin{DoxyAuthor}{Author} Aapo Kyrola \href{mailto:akyrola@cs.cmu.edu}{\tt akyrola@cs.\-cmu.\-edu} \end{DoxyAuthor} \begin{DoxyVersion}{Version} 1.\-0 \end{DoxyVersion} \hypertarget{toplist_8hpp_LICENSE}{}\subsection{L\-I\-C\-E\-N\-S\-E}\label{toplist_8hpp_LICENSE} Copyright \mbox{[}2012\mbox{]} \mbox{[}Aapo Kyrola, Guy Blelloch, Carlos Guestrin / Carnegie Mellon University\mbox{]} Licensed under the Apache License, Version 2.\-0 (the \char`\"{}\-License\char`\"{}); you may not use this file except in compliance with the License. You may obtain a copy of the License at \href{http://www.apache.org/licenses/LICENSE-2.0}{\tt http\-://www.\-apache.\-org/licenses/\-L\-I\-C\-E\-N\-S\-E-\/2.\-0} Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \char`\"{}\-A\-S I\-S\char`\"{} B\-A\-S\-I\-S, W\-I\-T\-H\-O\-U\-T W\-A\-R\-R\-A\-N\-T\-I\-E\-S O\-R C\-O\-N\-D\-I\-T\-I\-O\-N\-S O\-F A\-N\-Y K\-I\-N\-D, either express or implied. See the License for the specific language governing permissions and limitations under the License.\hypertarget{toplist_8hpp_DESCRIPTION}{}\subsection{D\-E\-S\-C\-R\-I\-P\-T\-I\-O\-N}\label{toplist_8hpp_DESCRIPTION} Simple metrics reporter that dumps metrics to standard output.
09jijiangwen-download
docs/latex/reps_2basic__reporter_8hpp.tex
TeX
asf20
1,998
\hypertarget{reporters_2null__reporter_8hpp}{\section{src/metrics/reporters/null\-\_\-reporter.hpp File Reference} \label{reporters_2null__reporter_8hpp}\index{src/metrics/reporters/null\-\_\-reporter.\-hpp@{src/metrics/reporters/null\-\_\-reporter.\-hpp}} } {\ttfamily \#include $<$metrics/imetrics\-\_\-reporter.\-hpp$>$}\\* \subsection*{Classes} \begin{DoxyCompactItemize} \item class \hyperlink{classgraphchi_1_1null__reporter}{graphchi\-::null\-\_\-reporter} \end{DoxyCompactItemize} \subsection*{Namespaces} \begin{DoxyCompactItemize} \item namespace \hyperlink{namespacegraphchi}{graphchi} \end{DoxyCompactItemize} \subsection{Detailed Description} \begin{DoxyAuthor}{Author} Aapo Kyrola \href{mailto:akyrola@cs.cmu.edu}{\tt akyrola@cs.\-cmu.\-edu} \end{DoxyAuthor} \begin{DoxyVersion}{Version} 1.\-0 \end{DoxyVersion} \hypertarget{toplist_8hpp_LICENSE}{}\subsection{L\-I\-C\-E\-N\-S\-E}\label{toplist_8hpp_LICENSE} Copyright \mbox{[}2012\mbox{]} \mbox{[}Aapo Kyrola, Guy Blelloch, Carlos Guestrin / Carnegie Mellon University\mbox{]} Licensed under the Apache License, Version 2.\-0 (the \char`\"{}\-License\char`\"{}); you may not use this file except in compliance with the License. You may obtain a copy of the License at \href{http://www.apache.org/licenses/LICENSE-2.0}{\tt http\-://www.\-apache.\-org/licenses/\-L\-I\-C\-E\-N\-S\-E-\/2.\-0} Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \char`\"{}\-A\-S I\-S\char`\"{} B\-A\-S\-I\-S, W\-I\-T\-H\-O\-U\-T W\-A\-R\-R\-A\-N\-T\-I\-E\-S O\-R C\-O\-N\-D\-I\-T\-I\-O\-N\-S O\-F A\-N\-Y K\-I\-N\-D, either express or implied. See the License for the specific language governing permissions and limitations under the License.\hypertarget{toplist_8hpp_DESCRIPTION}{}\subsection{D\-E\-S\-C\-R\-I\-P\-T\-I\-O\-N}\label{toplist_8hpp_DESCRIPTION} Empty metrics reporter.
09jijiangwen-download
docs/latex/reporters_2null__reporter_8hpp.tex
TeX
asf20
1,903
\hypertarget{basic__dynamicengine__smoketest2_8cpp}{\section{src/tests/basic\-\_\-dynamicengine\-\_\-smoketest2.cpp File Reference} \label{basic__dynamicengine__smoketest2_8cpp}\index{src/tests/basic\-\_\-dynamicengine\-\_\-smoketest2.\-cpp@{src/tests/basic\-\_\-dynamicengine\-\_\-smoketest2.\-cpp}} } {\ttfamily \#include $<$string$>$}\\* {\ttfamily \#include \char`\"{}graphchi\-\_\-basic\-\_\-includes.\-hpp\char`\"{}}\\* {\ttfamily \#include \char`\"{}engine/dynamic\-\_\-graphs/graphchi\-\_\-dynamicgraph\-\_\-engine.\-hpp\char`\"{}}\\* \subsection*{Classes} \begin{DoxyCompactItemize} \item struct \hyperlink{struct_smoke_test_program2}{Smoke\-Test\-Program2} \item class \hyperlink{class_vertex_data_checker}{Vertex\-Data\-Checker} \end{DoxyCompactItemize} \subsection*{Macros} \begin{DoxyCompactItemize} \item \hypertarget{basic__dynamicengine__smoketest2_8cpp_a5e44d0ac338ca3ad77ad74a8e17d763d}{\#define {\bfseries S\-U\-P\-P\-O\-R\-T\-\_\-\-D\-E\-L\-E\-T\-I\-O\-N\-S}~1}\label{basic__dynamicengine__smoketest2_8cpp_a5e44d0ac338ca3ad77ad74a8e17d763d} \end{DoxyCompactItemize} \subsection*{Typedefs} \begin{DoxyCompactItemize} \item typedef vid\-\_\-t \hyperlink{basic__dynamicengine__smoketest2_8cpp_acf10237949ab87b83055ff6aa646c565}{Vertex\-Data\-Type} \item \hypertarget{basic__dynamicengine__smoketest2_8cpp_afbb404dcf5d5c3e666744be9ba363945}{typedef vid\-\_\-t {\bfseries Edge\-Data\-Type}}\label{basic__dynamicengine__smoketest2_8cpp_afbb404dcf5d5c3e666744be9ba363945} \end{DoxyCompactItemize} \subsection*{Functions} \begin{DoxyCompactItemize} \item \hypertarget{basic__dynamicengine__smoketest2_8cpp_a217dbf8b442f20279ea00b898af96f52}{int {\bfseries main} (int argc, const char $\ast$$\ast$argv)}\label{basic__dynamicengine__smoketest2_8cpp_a217dbf8b442f20279ea00b898af96f52} \end{DoxyCompactItemize} \subsection{Detailed Description} \begin{DoxyAuthor}{Author} Aapo Kyrola \href{mailto:akyrola@cs.cmu.edu}{\tt akyrola@cs.\-cmu.\-edu} \end{DoxyAuthor} \begin{DoxyVersion}{Version} 1.\-0 \end{DoxyVersion} \hypertarget{toplist_8hpp_LICENSE}{}\subsection{L\-I\-C\-E\-N\-S\-E}\label{toplist_8hpp_LICENSE} Copyright \mbox{[}2012\mbox{]} \mbox{[}Aapo Kyrola, Guy Blelloch, Carlos Guestrin / Carnegie Mellon University\mbox{]} Licensed under the Apache License, Version 2.\-0 (the \char`\"{}\-License\char`\"{}); you may not use this file except in compliance with the License. You may obtain a copy of the License at \href{http://www.apache.org/licenses/LICENSE-2.0}{\tt http\-://www.\-apache.\-org/licenses/\-L\-I\-C\-E\-N\-S\-E-\/2.\-0} Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \char`\"{}\-A\-S I\-S\char`\"{} B\-A\-S\-I\-S, W\-I\-T\-H\-O\-U\-T W\-A\-R\-R\-A\-N\-T\-I\-E\-S O\-R C\-O\-N\-D\-I\-T\-I\-O\-N\-S O\-F A\-N\-Y K\-I\-N\-D, either express or implied. See the License for the specific language governing permissions and limitations under the License.\hypertarget{toplist_8hpp_DESCRIPTION}{}\subsection{D\-E\-S\-C\-R\-I\-P\-T\-I\-O\-N}\label{toplist_8hpp_DESCRIPTION} Simple smoketest for the dynamic graph graphchi engine. \subsection{Typedef Documentation} \hypertarget{basic__dynamicengine__smoketest2_8cpp_acf10237949ab87b83055ff6aa646c565}{\index{basic\-\_\-dynamicengine\-\_\-smoketest2.\-cpp@{basic\-\_\-dynamicengine\-\_\-smoketest2.\-cpp}!Vertex\-Data\-Type@{Vertex\-Data\-Type}} \index{Vertex\-Data\-Type@{Vertex\-Data\-Type}!basic_dynamicengine_smoketest2.cpp@{basic\-\_\-dynamicengine\-\_\-smoketest2.\-cpp}} \subsubsection[{Vertex\-Data\-Type}]{\setlength{\rightskip}{0pt plus 5cm}typedef vid\-\_\-t {\bf Vertex\-Data\-Type}}}\label{basic__dynamicengine__smoketest2_8cpp_acf10237949ab87b83055ff6aa646c565} Type definitions. Remember to create suitable graph shards using the Sharder-\/program.
09jijiangwen-download
docs/latex/basic__dynamicengine__smoketest2_8cpp.tex
TeX
asf20
3,824
\hypertarget{bitset__scheduler_8hpp}{\section{src/engine/bitset\-\_\-scheduler.hpp File Reference} \label{bitset__scheduler_8hpp}\index{src/engine/bitset\-\_\-scheduler.\-hpp@{src/engine/bitset\-\_\-scheduler.\-hpp}} } {\ttfamily \#include \char`\"{}graphchi\-\_\-types.\-hpp\char`\"{}}\\* {\ttfamily \#include \char`\"{}api/ischeduler.\-hpp\char`\"{}}\\* {\ttfamily \#include \char`\"{}util/dense\-\_\-bitset.\-hpp\char`\"{}}\\* \subsection*{Classes} \begin{DoxyCompactItemize} \item class \hyperlink{classgraphchi_1_1bitset__scheduler}{graphchi\-::bitset\-\_\-scheduler} \end{DoxyCompactItemize} \subsection*{Namespaces} \begin{DoxyCompactItemize} \item namespace \hyperlink{namespacegraphchi}{graphchi} \end{DoxyCompactItemize} \subsection{Detailed Description} \begin{DoxyAuthor}{Author} Aapo Kyrola \href{mailto:akyrola@cs.cmu.edu}{\tt akyrola@cs.\-cmu.\-edu} \end{DoxyAuthor} \begin{DoxyVersion}{Version} 1.\-0 \end{DoxyVersion} \hypertarget{toplist_8hpp_LICENSE}{}\subsection{L\-I\-C\-E\-N\-S\-E}\label{toplist_8hpp_LICENSE} Copyright \mbox{[}2012\mbox{]} \mbox{[}Aapo Kyrola, Guy Blelloch, Carlos Guestrin / Carnegie Mellon University\mbox{]} Licensed under the Apache License, Version 2.\-0 (the \char`\"{}\-License\char`\"{}); you may not use this file except in compliance with the License. You may obtain a copy of the License at \href{http://www.apache.org/licenses/LICENSE-2.0}{\tt http\-://www.\-apache.\-org/licenses/\-L\-I\-C\-E\-N\-S\-E-\/2.\-0} Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \char`\"{}\-A\-S I\-S\char`\"{} B\-A\-S\-I\-S, W\-I\-T\-H\-O\-U\-T W\-A\-R\-R\-A\-N\-T\-I\-E\-S O\-R C\-O\-N\-D\-I\-T\-I\-O\-N\-S O\-F A\-N\-Y K\-I\-N\-D, either express or implied. See the License for the specific language governing permissions and limitations under the License.\hypertarget{toplist_8hpp_DESCRIPTION}{}\subsection{D\-E\-S\-C\-R\-I\-P\-T\-I\-O\-N}\label{toplist_8hpp_DESCRIPTION} Bitset scheduler.
09jijiangwen-download
docs/latex/bitset__scheduler_8hpp.tex
TeX
asf20
2,006
%!PS-Adobe-2.0 EPSF-2.0 %%Title: ClassName %%Creator: Doxygen %%CreationDate: Time %%For: %Magnification: 1.00 %%Orientation: Portrait %%BoundingBox: 0 0 500 172.413793 %%Pages: 0 %%BeginSetup %%EndSetup %%EndComments % ----- variables ----- /boxwidth 0 def /boxheight 40 def /fontheight 24 def /marginwidth 10 def /distx 20 def /disty 40 def /boundaspect 2.900000 def % aspect ratio of the BoundingBox (width/height) /boundx 500 def /boundy boundx boundaspect div def /xspacing 0 def /yspacing 0 def /rows 2 def /cols 1 def /scalefactor 0 def /boxfont /Times-Roman findfont fontheight scalefont def % ----- procedures ----- /dotted { [1 4] 0 setdash } def /dashed { [5] 0 setdash } def /solid { [] 0 setdash } def /max % result = MAX(arg1,arg2) { /a exch def /b exch def a b gt {a} {b} ifelse } def /xoffset % result = MAX(0,(scalefactor-(boxwidth*cols+distx*(cols-1)))/2) { 0 scalefactor boxwidth cols mul distx cols 1 sub mul add sub 2 div max } def /cw % boxwidth = MAX(boxwidth, stringwidth(arg1)) { /str exch def /boxwidth boxwidth str stringwidth pop max def } def /box % draws a box with text `arg1' at grid pos (arg2,arg3) { gsave 2 setlinewidth newpath exch xspacing mul xoffset add exch yspacing mul moveto boxwidth 0 rlineto 0 boxheight rlineto boxwidth neg 0 rlineto 0 boxheight neg rlineto closepath dup stringwidth pop neg boxwidth add 2 div boxheight fontheight 2 div sub 2 div rmoveto show stroke grestore } def /mark { newpath exch xspacing mul xoffset add boxwidth add exch yspacing mul moveto 0 boxheight 4 div rlineto boxheight neg 4 div boxheight neg 4 div rlineto closepath eofill stroke } def /arrow { newpath moveto 3 -8 rlineto -6 0 rlineto 3 8 rlineto closepath eofill stroke } def /out % draws an output connector for the block at (arg1,arg2) { newpath exch xspacing mul xoffset add boxwidth 2 div add exch yspacing mul boxheight add /y exch def /x exch def x y moveto 0 disty 2 div rlineto stroke 1 eq { x y disty 2 div add arrow } if } def /in % draws an input connector for the block at (arg1,arg2) { newpath exch xspacing mul xoffset add boxwidth 2 div add exch yspacing mul disty 2 div sub /y exch def /x exch def x y moveto 0 disty 2 div rlineto stroke 1 eq { x y disty 2 div add arrow } if } def /hedge { exch xspacing mul xoffset add boxwidth 2 div add exch yspacing mul boxheight 2 div sub /y exch def /x exch def newpath x y moveto boxwidth 2 div distx add 0 rlineto stroke 1 eq { newpath x boxwidth 2 div distx add add y moveto -8 3 rlineto 0 -6 rlineto 8 3 rlineto closepath eofill stroke } if } def /vedge { /ye exch def /ys exch def /xs exch def newpath xs xspacing mul xoffset add boxwidth 2 div add dup ys yspacing mul boxheight 2 div sub moveto ye yspacing mul boxheight 2 div sub lineto stroke } def /conn % connections the blocks from col `arg1' to `arg2' of row `arg3' { /ys exch def /xe exch def /xs exch def newpath xs xspacing mul xoffset add boxwidth 2 div add ys yspacing mul disty 2 div sub moveto xspacing xe xs sub mul 0 rlineto stroke } def % ----- main ------ boxfont setfont 1 boundaspect scale (smoketest_program) cw (graphchi::functional_kernel< int, int >) cw /boxwidth boxwidth marginwidth 2 mul add def /xspacing boxwidth distx add def /yspacing boxheight disty add def /scalefactor boxwidth cols mul distx cols 1 sub mul add boxheight rows mul disty rows 1 sub mul add boundaspect mul max def boundx scalefactor div boundy scalefactor div scale % ----- classes ----- (smoketest_program) 0.000000 0.000000 box (graphchi::functional_kernel< int, int >) 0.000000 1.000000 box % ----- relations ----- solid 0 0.000000 0.000000 out solid 1 0.000000 1.000000 in
09jijiangwen-download
docs/latex/structsmoketest__program.eps
PostScript
asf20
3,854
\hypertarget{als__vertex__program_8hpp}{\section{example\-\_\-apps/matrix\-\_\-factorization/graphlab\-\_\-gas/als\-\_\-vertex\-\_\-program.hpp File Reference} \label{als__vertex__program_8hpp}\index{example\-\_\-apps/matrix\-\_\-factorization/graphlab\-\_\-gas/als\-\_\-vertex\-\_\-program.\-hpp@{example\-\_\-apps/matrix\-\_\-factorization/graphlab\-\_\-gas/als\-\_\-vertex\-\_\-program.\-hpp}} } This file describes the vertex program for the alternating least squares (A\-L\-S) matrix factorization algorithm. See \hyperlink{classals__vertex__program}{als\-\_\-vertex\-\_\-program} for description of the A\-L\-S Algorithm. {\ttfamily \#include $<$Eigen/\-Dense$>$}\\* \subsection*{Classes} \begin{DoxyCompactItemize} \item struct \hyperlink{structvertex__data}{vertex\-\_\-data} \begin{DoxyCompactList}\small\item\em the vertex data type which contains the latent factor. \end{DoxyCompactList}\item struct \hyperlink{structedge__data}{edge\-\_\-data} \begin{DoxyCompactList}\small\item\em The edge data stores the entry in the matrix. \end{DoxyCompactList}\item class \hyperlink{classgather__type}{gather\-\_\-type} \begin{DoxyCompactList}\small\item\em The graph loader function is a line parser used for distributed graph construction. \end{DoxyCompactList}\item class \hyperlink{classals__vertex__program}{als\-\_\-vertex\-\_\-program} \item struct \hyperlink{structerror__aggregator}{error\-\_\-aggregator} \item struct \hyperlink{structprediction__saver}{prediction\-\_\-saver} \end{DoxyCompactItemize} \subsection*{Typedefs} \begin{DoxyCompactItemize} \item \hypertarget{als__vertex__program_8hpp_abff3f3130a5bb5fee0702765ecec0a47}{typedef Eigen\-::\-Vector\-Xd {\bfseries vec\-\_\-type}}\label{als__vertex__program_8hpp_abff3f3130a5bb5fee0702765ecec0a47} \item \hypertarget{als__vertex__program_8hpp_adf6fad225baca18a7d6f1173263ada20}{typedef Eigen\-::\-Matrix\-Xd {\bfseries mat\-\_\-type}}\label{als__vertex__program_8hpp_adf6fad225baca18a7d6f1173263ada20} \item \hypertarget{als__vertex__program_8hpp_ab9cfd2cad1698282b6c7fd7f7e7fd459}{typedef \\* \hyperlink{structgraphlab_1_1distributed__graph}{graphlab\-::distributed\-\_\-graph}\\* $<$ \hyperlink{structvertex__data}{vertex\-\_\-data}, \hyperlink{structedge__data}{edge\-\_\-data} $>$ \hyperlink{als__vertex__program_8hpp_ab9cfd2cad1698282b6c7fd7f7e7fd459}{graph\-\_\-type}}\label{als__vertex__program_8hpp_ab9cfd2cad1698282b6c7fd7f7e7fd459} \begin{DoxyCompactList}\small\item\em The graph type is defined in terms of the vertex and edge data. \end{DoxyCompactList}\end{DoxyCompactItemize} \subsection*{Functions} \begin{DoxyCompactItemize} \item \hypertarget{als__vertex__program_8hpp_a713562b4f44b2663241a3dd6292f0dab}{\hyperlink{structgraphlab_1_1_graph_lab_vertex_wrapper}{graph\-\_\-type\-::vertex\-\_\-type} \hyperlink{als__vertex__program_8hpp_a713562b4f44b2663241a3dd6292f0dab}{get\-\_\-other\-\_\-vertex} (\hyperlink{structgraphlab_1_1_graph_lab_edge_wrapper}{graph\-\_\-type\-::edge\-\_\-type} \&\hyperlink{structedge}{edge}, const \hyperlink{structgraphlab_1_1_graph_lab_vertex_wrapper}{graph\-\_\-type\-::vertex\-\_\-type} \&vertex)}\label{als__vertex__program_8hpp_a713562b4f44b2663241a3dd6292f0dab} \begin{DoxyCompactList}\small\item\em Given a vertex and an edge return the other vertex in the edge. \end{DoxyCompactList}\item \hypertarget{als__vertex__program_8hpp_afb0b8a4655197699932baa2bac0cc465}{double \hyperlink{als__vertex__program_8hpp_afb0b8a4655197699932baa2bac0cc465}{extract\-\_\-l2\-\_\-error} (const \hyperlink{structgraphlab_1_1_graph_lab_edge_wrapper}{graph\-\_\-type\-::edge\-\_\-type} \&\hyperlink{structedge}{edge})}\label{als__vertex__program_8hpp_afb0b8a4655197699932baa2bac0cc465} \begin{DoxyCompactList}\small\item\em Given an edge compute the error associated with that edge. \end{DoxyCompactList}\end{DoxyCompactItemize} \subsection{Detailed Description} This file describes the vertex program for the alternating least squares (A\-L\-S) matrix factorization algorithm. See \hyperlink{classals__vertex__program}{als\-\_\-vertex\-\_\-program} for description of the A\-L\-S Algorithm. Copyright (c) 2009 Carnegie Mellon University. All rights reserved. Licensed under the Apache License, Version 2.\-0 (the \char`\"{}\-License\char`\"{}); you may not use this file except in compliance with the License. You may obtain a copy of the License at \begin{DoxyVerb}http://www.apache.org/licenses/LICENSE-2.0 \end{DoxyVerb} \begin{DoxyVerb}Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. \end{DoxyVerb} For more about this software visit\-: \begin{DoxyVerb} http://www.graphlab.ml.cmu.edu\end{DoxyVerb}
09jijiangwen-download
docs/latex/als__vertex__program_8hpp.tex
TeX
asf20
4,894
%!PS-Adobe-2.0 EPSF-2.0 %%Title: ClassName %%Creator: Doxygen %%CreationDate: Time %%For: %Magnification: 1.00 %%Orientation: Portrait %%BoundingBox: 0 0 500 37.950664 %%Pages: 0 %%BeginSetup %%EndSetup %%EndComments % ----- variables ----- /boxwidth 0 def /boxheight 40 def /fontheight 24 def /marginwidth 10 def /distx 20 def /disty 40 def /boundaspect 13.175000 def % aspect ratio of the BoundingBox (width/height) /boundx 500 def /boundy boundx boundaspect div def /xspacing 0 def /yspacing 0 def /rows 2 def /cols 2 def /scalefactor 0 def /boxfont /Times-Roman findfont fontheight scalefont def % ----- procedures ----- /dotted { [1 4] 0 setdash } def /dashed { [5] 0 setdash } def /solid { [] 0 setdash } def /max % result = MAX(arg1,arg2) { /a exch def /b exch def a b gt {a} {b} ifelse } def /xoffset % result = MAX(0,(scalefactor-(boxwidth*cols+distx*(cols-1)))/2) { 0 scalefactor boxwidth cols mul distx cols 1 sub mul add sub 2 div max } def /cw % boxwidth = MAX(boxwidth, stringwidth(arg1)) { /str exch def /boxwidth boxwidth str stringwidth pop max def } def /box % draws a box with text `arg1' at grid pos (arg2,arg3) { gsave 2 setlinewidth newpath exch xspacing mul xoffset add exch yspacing mul moveto boxwidth 0 rlineto 0 boxheight rlineto boxwidth neg 0 rlineto 0 boxheight neg rlineto closepath dup stringwidth pop neg boxwidth add 2 div boxheight fontheight 2 div sub 2 div rmoveto show stroke grestore } def /mark { newpath exch xspacing mul xoffset add boxwidth add exch yspacing mul moveto 0 boxheight 4 div rlineto boxheight neg 4 div boxheight neg 4 div rlineto closepath eofill stroke } def /arrow { newpath moveto 3 -8 rlineto -6 0 rlineto 3 8 rlineto closepath eofill stroke } def /out % draws an output connector for the block at (arg1,arg2) { newpath exch xspacing mul xoffset add boxwidth 2 div add exch yspacing mul boxheight add /y exch def /x exch def x y moveto 0 disty 2 div rlineto stroke 1 eq { x y disty 2 div add arrow } if } def /in % draws an input connector for the block at (arg1,arg2) { newpath exch xspacing mul xoffset add boxwidth 2 div add exch yspacing mul disty 2 div sub /y exch def /x exch def x y moveto 0 disty 2 div rlineto stroke 1 eq { x y disty 2 div add arrow } if } def /hedge { exch xspacing mul xoffset add boxwidth 2 div add exch yspacing mul boxheight 2 div sub /y exch def /x exch def newpath x y moveto boxwidth 2 div distx add 0 rlineto stroke 1 eq { newpath x boxwidth 2 div distx add add y moveto -8 3 rlineto 0 -6 rlineto 8 3 rlineto closepath eofill stroke } if } def /vedge { /ye exch def /ys exch def /xs exch def newpath xs xspacing mul xoffset add boxwidth 2 div add dup ys yspacing mul boxheight 2 div sub moveto ye yspacing mul boxheight 2 div sub lineto stroke } def /conn % connections the blocks from col `arg1' to `arg2' of row `arg3' { /ys exch def /xe exch def /xs exch def newpath xs xspacing mul xoffset add boxwidth 2 div add ys yspacing mul disty 2 div sub moveto xspacing xe xs sub mul 0 rlineto stroke } def % ----- main ------ boxfont setfont 1 boundaspect scale (als_vertex_program) cw (graphlab::ivertex_program< graph_type, gather_type, graphlab::messages::sum_priority >) cw (graphlab::IS_POD_TYPE) cw /boxwidth boxwidth marginwidth 2 mul add def /xspacing boxwidth distx add def /yspacing boxheight disty add def /scalefactor boxwidth cols mul distx cols 1 sub mul add boxheight rows mul disty rows 1 sub mul add boundaspect mul max def boundx scalefactor div boundy scalefactor div scale % ----- classes ----- (als_vertex_program) 0.500000 0.000000 box (graphlab::ivertex_program< graph_type, gather_type, graphlab::messages::sum_priority >) 0.000000 1.000000 box (graphlab::IS_POD_TYPE) 1.000000 1.000000 box % ----- relations ----- solid 0 0.500000 0.000000 out solid 0.000000 1.000000 1.000000 conn solid 1 0.000000 1.000000 in solid 1 1.000000 1.000000 in
09jijiangwen-download
docs/latex/classals__vertex__program.eps
PostScript
asf20
4,091
\hypertarget{struct_m_d5_context}{\section{M\-D5\-Context Struct Reference} \label{struct_m_d5_context}\index{M\-D5\-Context@{M\-D5\-Context}} } \subsection*{Public Attributes} \begin{DoxyCompactItemize} \item \hypertarget{struct_m_d5_context_a6129b10b90387e1cb1d4cd92e4605c33}{uint32\-\_\-t {\bfseries buf} \mbox{[}4\mbox{]}}\label{struct_m_d5_context_a6129b10b90387e1cb1d4cd92e4605c33} \item \hypertarget{struct_m_d5_context_a48f837fb64afd013f832e3cdab68e5de}{uint32\-\_\-t {\bfseries bits} \mbox{[}2\mbox{]}}\label{struct_m_d5_context_a48f837fb64afd013f832e3cdab68e5de} \item \hypertarget{struct_m_d5_context_ae8be45f236e5cb12b0ae79da77e5f929}{unsigned char {\bfseries in} \mbox{[}64\mbox{]}}\label{struct_m_d5_context_ae8be45f236e5cb12b0ae79da77e5f929} \end{DoxyCompactItemize} The documentation for this struct was generated from the following file\-:\begin{DoxyCompactItemize} \item src/external/vpiotr-\/mongoose-\/cpp/mongoose.\-c\end{DoxyCompactItemize}
09jijiangwen-download
docs/latex/struct_m_d5_context.tex
TeX
asf20
972
%!PS-Adobe-2.0 EPSF-2.0 %%Title: ClassName %%Creator: Doxygen %%CreationDate: Time %%For: %Magnification: 1.00 %%Orientation: Portrait %%BoundingBox: 0 0 500 250.000000 %%Pages: 0 %%BeginSetup %%EndSetup %%EndComments % ----- variables ----- /boxwidth 0 def /boxheight 40 def /fontheight 24 def /marginwidth 10 def /distx 20 def /disty 40 def /boundaspect 2.000000 def % aspect ratio of the BoundingBox (width/height) /boundx 500 def /boundy boundx boundaspect div def /xspacing 0 def /yspacing 0 def /rows 2 def /cols 1 def /scalefactor 0 def /boxfont /Times-Roman findfont fontheight scalefont def % ----- procedures ----- /dotted { [1 4] 0 setdash } def /dashed { [5] 0 setdash } def /solid { [] 0 setdash } def /max % result = MAX(arg1,arg2) { /a exch def /b exch def a b gt {a} {b} ifelse } def /xoffset % result = MAX(0,(scalefactor-(boxwidth*cols+distx*(cols-1)))/2) { 0 scalefactor boxwidth cols mul distx cols 1 sub mul add sub 2 div max } def /cw % boxwidth = MAX(boxwidth, stringwidth(arg1)) { /str exch def /boxwidth boxwidth str stringwidth pop max def } def /box % draws a box with text `arg1' at grid pos (arg2,arg3) { gsave 2 setlinewidth newpath exch xspacing mul xoffset add exch yspacing mul moveto boxwidth 0 rlineto 0 boxheight rlineto boxwidth neg 0 rlineto 0 boxheight neg rlineto closepath dup stringwidth pop neg boxwidth add 2 div boxheight fontheight 2 div sub 2 div rmoveto show stroke grestore } def /mark { newpath exch xspacing mul xoffset add boxwidth add exch yspacing mul moveto 0 boxheight 4 div rlineto boxheight neg 4 div boxheight neg 4 div rlineto closepath eofill stroke } def /arrow { newpath moveto 3 -8 rlineto -6 0 rlineto 3 8 rlineto closepath eofill stroke } def /out % draws an output connector for the block at (arg1,arg2) { newpath exch xspacing mul xoffset add boxwidth 2 div add exch yspacing mul boxheight add /y exch def /x exch def x y moveto 0 disty 2 div rlineto stroke 1 eq { x y disty 2 div add arrow } if } def /in % draws an input connector for the block at (arg1,arg2) { newpath exch xspacing mul xoffset add boxwidth 2 div add exch yspacing mul disty 2 div sub /y exch def /x exch def x y moveto 0 disty 2 div rlineto stroke 1 eq { x y disty 2 div add arrow } if } def /hedge { exch xspacing mul xoffset add boxwidth 2 div add exch yspacing mul boxheight 2 div sub /y exch def /x exch def newpath x y moveto boxwidth 2 div distx add 0 rlineto stroke 1 eq { newpath x boxwidth 2 div distx add add y moveto -8 3 rlineto 0 -6 rlineto 8 3 rlineto closepath eofill stroke } if } def /vedge { /ye exch def /ys exch def /xs exch def newpath xs xspacing mul xoffset add boxwidth 2 div add dup ys yspacing mul boxheight 2 div sub moveto ye yspacing mul boxheight 2 div sub lineto stroke } def /conn % connections the blocks from col `arg1' to `arg2' of row `arg3' { /ys exch def /xe exch def /xs exch def newpath xs xspacing mul xoffset add boxwidth 2 div add ys yspacing mul disty 2 div sub moveto xspacing xe xs sub mul 0 rlineto stroke } def % ----- main ------ boxfont setfont 1 boundaspect scale (error_aggregator) cw (graphlab::IS_POD_TYPE) cw /boxwidth boxwidth marginwidth 2 mul add def /xspacing boxwidth distx add def /yspacing boxheight disty add def /scalefactor boxwidth cols mul distx cols 1 sub mul add boxheight rows mul disty rows 1 sub mul add boundaspect mul max def boundx scalefactor div boundy scalefactor div scale % ----- classes ----- (error_aggregator) 0.000000 0.000000 box (graphlab::IS_POD_TYPE) 0.000000 1.000000 box % ----- relations ----- solid 0 0.000000 0.000000 out solid 1 0.000000 1.000000 in
09jijiangwen-download
docs/latex/structerror__aggregator.eps
PostScript
asf20
3,816
\hypertarget{logger_8hpp}{\section{src/logger/logger.hpp File Reference} \label{logger_8hpp}\index{src/logger/logger.\-hpp@{src/logger/logger.\-hpp}} } {\ttfamily \#include $<$fstream$>$}\\* {\ttfamily \#include $<$sstream$>$}\\* {\ttfamily \#include $<$cstdlib$>$}\\* {\ttfamily \#include $<$iostream$>$}\\* {\ttfamily \#include $<$cassert$>$}\\* {\ttfamily \#include $<$cstring$>$}\\* {\ttfamily \#include $<$cstdarg$>$}\\* {\ttfamily \#include $<$pthread.\-h$>$}\\* \subsection*{Classes} \begin{DoxyCompactItemize} \item struct \hyperlink{structlogger__impl_1_1streambuff__tls__entry}{logger\-\_\-impl\-::streambuff\-\_\-tls\-\_\-entry} \item class \hyperlink{classfile__logger}{file\-\_\-logger} \item struct \hyperlink{structlog__dispatch}{log\-\_\-dispatch$<$ dostuff $>$} \item struct \hyperlink{structlog__dispatch_3_01true_01_4}{log\-\_\-dispatch$<$ true $>$} \item struct \hyperlink{structlog__dispatch_3_01false_01_4}{log\-\_\-dispatch$<$ false $>$} \item struct \hyperlink{structnull__stream}{null\-\_\-stream} \item struct \hyperlink{structlog__stream__dispatch}{log\-\_\-stream\-\_\-dispatch$<$ dostuff $>$} \item struct \hyperlink{structlog__stream__dispatch_3_01true_01_4}{log\-\_\-stream\-\_\-dispatch$<$ true $>$} \item struct \hyperlink{structlog__stream__dispatch_3_01false_01_4}{log\-\_\-stream\-\_\-dispatch$<$ false $>$} \end{DoxyCompactItemize} \subsection*{Macros} \begin{DoxyCompactItemize} \item \#define \hyperlink{logger_8hpp_a1632479322efa3952798f98177b54471}{L\-O\-G\-\_\-\-N\-O\-N\-E}~5 \item \#define \hyperlink{logger_8hpp_ac2164369b4d2bf72296f8ba6ea576ecf}{L\-O\-G\-\_\-\-F\-A\-T\-A\-L}~4 \item \#define \hyperlink{logger_8hpp_aced66975c154ea0e2a8ec3bc818b4e08}{L\-O\-G\-\_\-\-E\-R\-R\-O\-R}~3 \item \#define \hyperlink{logger_8hpp_adf4476a6a4ea6c74231c826e899d7189}{L\-O\-G\-\_\-\-W\-A\-R\-N\-I\-N\-G}~2 \item \#define \hyperlink{logger_8hpp_aeb4f36db01bd128c7afeac5889dac311}{L\-O\-G\-\_\-\-I\-N\-F\-O}~1 \item \#define \hyperlink{logger_8hpp_a6ff63e8955665c4a58b1598f2b07c51a}{L\-O\-G\-\_\-\-D\-E\-B\-U\-G}~0 \item \#define \hyperlink{logger_8hpp_a3d18ed817dcda9f54a4f353ccf9b1b36}{O\-U\-T\-P\-U\-T\-L\-E\-V\-E\-L}~\hyperlink{logger_8hpp_a6ff63e8955665c4a58b1598f2b07c51a}{L\-O\-G\-\_\-\-D\-E\-B\-U\-G} \item \hypertarget{logger_8hpp_a407629ed2d44412adc1a9fd1bf8fc35b}{\#define \hyperlink{logger_8hpp_a407629ed2d44412adc1a9fd1bf8fc35b}{C\-O\-L\-O\-R\-O\-U\-T\-P\-U\-T}}\label{logger_8hpp_a407629ed2d44412adc1a9fd1bf8fc35b} \begin{DoxyCompactList}\small\item\em If set, logs to screen will be printed in color. \end{DoxyCompactList}\item \#define \hyperlink{logger_8hpp_ab58cdd006f6b33cbe171ab32effef95b}{logger}(lvl, fmt,...)~(\hyperlink{structlog__dispatch}{log\-\_\-dispatch}$<$(lvl $>$= \hyperlink{logger_8hpp_a3d18ed817dcda9f54a4f353ccf9b1b36}{O\-U\-T\-P\-U\-T\-L\-E\-V\-E\-L})$>$\-::exec(lvl,\-\_\-\-\_\-\-F\-I\-L\-E\-\_\-\-\_\-, \-\_\-\-\_\-func\-\_\-\-\_\- ,\-\_\-\-\_\-\-L\-I\-N\-E\-\_\-\-\_\-,fmt,\#\#\-\_\-\-\_\-\-V\-A\-\_\-\-A\-R\-G\-S\-\_\-\-\_\-)) \item \#define {\bfseries logbuf}(lvl, buf, len) \item \hypertarget{logger_8hpp_a7fe3c756650e371ad8739b860495106c}{\#define {\bfseries logstream}(lvl)~(\hyperlink{structlog__stream__dispatch}{log\-\_\-stream\-\_\-dispatch}$<$(lvl $>$= \hyperlink{logger_8hpp_a3d18ed817dcda9f54a4f353ccf9b1b36}{O\-U\-T\-P\-U\-T\-L\-E\-V\-E\-L})$>$\-::exec(lvl,\-\_\-\-\_\-\-F\-I\-L\-E\-\_\-\-\_\-, \-\_\-\-\_\-func\-\_\-\-\_\- ,\-\_\-\-\_\-\-L\-I\-N\-E\-\_\-\-\_\-) )}\label{logger_8hpp_a7fe3c756650e371ad8739b860495106c} \item \hypertarget{logger_8hpp_ab702106cf3b3e96750b6845ded4e0299}{\#define {\bfseries R\-E\-S\-E\-T}~0}\label{logger_8hpp_ab702106cf3b3e96750b6845ded4e0299} \item \hypertarget{logger_8hpp_ac7ebe8a74067308019e81190ede166e9}{\#define {\bfseries B\-R\-I\-G\-H\-T}~1}\label{logger_8hpp_ac7ebe8a74067308019e81190ede166e9} \item \hypertarget{logger_8hpp_ac25189db92959bff3c6c2adf4c34b50a}{\#define {\bfseries D\-I\-M}~2}\label{logger_8hpp_ac25189db92959bff3c6c2adf4c34b50a} \item \hypertarget{logger_8hpp_aaec1a65734e33bc49e8dc8d90e9546bc}{\#define {\bfseries U\-N\-D\-E\-R\-L\-I\-N\-E}~3}\label{logger_8hpp_aaec1a65734e33bc49e8dc8d90e9546bc} \item \hypertarget{logger_8hpp_a38eec52a7dccb94ff563e30eda32c891}{\#define {\bfseries B\-L\-I\-N\-K}~4}\label{logger_8hpp_a38eec52a7dccb94ff563e30eda32c891} \item \hypertarget{logger_8hpp_a00548cec6d104932bf79a65bac1c47e8}{\#define {\bfseries R\-E\-V\-E\-R\-S\-E}~7}\label{logger_8hpp_a00548cec6d104932bf79a65bac1c47e8} \item \hypertarget{logger_8hpp_ab42ef41116f8f2fe447484e2844cf0df}{\#define {\bfseries H\-I\-D\-D\-E\-N}~8}\label{logger_8hpp_ab42ef41116f8f2fe447484e2844cf0df} \item \hypertarget{logger_8hpp_a7b3b25cba33b07c303f3060fe41887f6}{\#define {\bfseries B\-L\-A\-C\-K}~0}\label{logger_8hpp_a7b3b25cba33b07c303f3060fe41887f6} \item \hypertarget{logger_8hpp_a8d23feea868a983c8c2b661e1e16972f}{\#define {\bfseries R\-E\-D}~1}\label{logger_8hpp_a8d23feea868a983c8c2b661e1e16972f} \item \hypertarget{logger_8hpp_acfbc006ea433ad708fdee3e82996e721}{\#define {\bfseries G\-R\-E\-E\-N}~2}\label{logger_8hpp_acfbc006ea433ad708fdee3e82996e721} \item \hypertarget{logger_8hpp_abf681265909adf3d3e8116c93c0ba179}{\#define {\bfseries Y\-E\-L\-L\-O\-W}~3}\label{logger_8hpp_abf681265909adf3d3e8116c93c0ba179} \item \hypertarget{logger_8hpp_a79d10e672abb49ad63eeaa8aaef57c38}{\#define {\bfseries B\-L\-U\-E}~4}\label{logger_8hpp_a79d10e672abb49ad63eeaa8aaef57c38} \item \hypertarget{logger_8hpp_a6f699060902f800f12aaae150f3a708e}{\#define {\bfseries M\-A\-G\-E\-N\-T\-A}~5}\label{logger_8hpp_a6f699060902f800f12aaae150f3a708e} \item \hypertarget{logger_8hpp_ad243f93c16bc4c1d3e0a13b84421d760}{\#define {\bfseries C\-Y\-A\-N}~6}\label{logger_8hpp_ad243f93c16bc4c1d3e0a13b84421d760} \item \hypertarget{logger_8hpp_a87b537f5fa5c109d3c05c13d6b18f382}{\#define {\bfseries W\-H\-I\-T\-E}~7}\label{logger_8hpp_a87b537f5fa5c109d3c05c13d6b18f382} \end{DoxyCompactItemize} \subsection*{Functions} \begin{DoxyCompactItemize} \item \hypertarget{logger_8hpp_a820aa548737ed0a5cbce4d20cdbeb73a}{void {\bfseries textcolor} (F\-I\-L\-E $\ast$handle, int attr, int fg)}\label{logger_8hpp_a820aa548737ed0a5cbce4d20cdbeb73a} \item \hypertarget{logger_8hpp_a5f0f93904d279224dd4da107408c1112}{void {\bfseries reset\-\_\-color} (F\-I\-L\-E $\ast$handle)}\label{logger_8hpp_a5f0f93904d279224dd4da107408c1112} \end{DoxyCompactItemize} \subsection{Detailed Description} Copyright (c) 2009 Carnegie Mellon University. All rights reserved. Licensed under the Apache License, Version 2.\-0 (the \char`\"{}\-License\char`\"{}); you may not use this file except in compliance with the License. You may obtain a copy of the License at \begin{DoxyVerb}http://www.apache.org/licenses/LICENSE-2.0 \end{DoxyVerb} \begin{DoxyVerb}Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. \end{DoxyVerb} For more about this software visit\-: \begin{DoxyVerb} http://www.graphlab.ml.cmu.edu\end{DoxyVerb} Usage\-: First include \hyperlink{logger_8hpp}{logger.\-hpp}. To logger, use the \hyperlink{logger_8hpp_ab58cdd006f6b33cbe171ab32effef95b}{logger()} function There are 2 output levels. A \char`\"{}soft\char`\"{} output level which is set by calling global\-\_\-logger.\-set\-\_\-log\-\_\-level(), as well as a \char`\"{}hard\char`\"{} output level O\-U\-T\-P\-U\-T\-L\-E\-V\-E\-L which is set in the source code (logger.\-h). when you call \char`\"{}logger()\char`\"{} with a loglevel and if the loglevel is greater than both of the output levels, the string will be written. written to a logger file. Otherwise, \hyperlink{logger_8hpp_ab58cdd006f6b33cbe171ab32effef95b}{logger()} has no effect. The difference between the hard level and the soft level is that the soft level can be changed at runtime, while the hard level optimizes away logging calls at compile time. \begin{DoxyAuthor}{Author} Yucheng Low (ylow) \end{DoxyAuthor} \subsection{Macro Definition Documentation} \hypertarget{logger_8hpp_a6ff63e8955665c4a58b1598f2b07c51a}{\index{logger.\-hpp@{logger.\-hpp}!L\-O\-G\-\_\-\-D\-E\-B\-U\-G@{L\-O\-G\-\_\-\-D\-E\-B\-U\-G}} \index{L\-O\-G\-\_\-\-D\-E\-B\-U\-G@{L\-O\-G\-\_\-\-D\-E\-B\-U\-G}!logger.hpp@{logger.\-hpp}} \subsubsection[{L\-O\-G\-\_\-\-D\-E\-B\-U\-G}]{\setlength{\rightskip}{0pt plus 5cm}\#define L\-O\-G\-\_\-\-D\-E\-B\-U\-G~0}}\label{logger_8hpp_a6ff63e8955665c4a58b1598f2b07c51a} Debugging purposes only \hypertarget{logger_8hpp_aced66975c154ea0e2a8ec3bc818b4e08}{\index{logger.\-hpp@{logger.\-hpp}!L\-O\-G\-\_\-\-E\-R\-R\-O\-R@{L\-O\-G\-\_\-\-E\-R\-R\-O\-R}} \index{L\-O\-G\-\_\-\-E\-R\-R\-O\-R@{L\-O\-G\-\_\-\-E\-R\-R\-O\-R}!logger.hpp@{logger.\-hpp}} \subsubsection[{L\-O\-G\-\_\-\-E\-R\-R\-O\-R}]{\setlength{\rightskip}{0pt plus 5cm}\#define L\-O\-G\-\_\-\-E\-R\-R\-O\-R~3}}\label{logger_8hpp_aced66975c154ea0e2a8ec3bc818b4e08} Used for errors which are recoverable within the scope of the function \hypertarget{logger_8hpp_ac2164369b4d2bf72296f8ba6ea576ecf}{\index{logger.\-hpp@{logger.\-hpp}!L\-O\-G\-\_\-\-F\-A\-T\-A\-L@{L\-O\-G\-\_\-\-F\-A\-T\-A\-L}} \index{L\-O\-G\-\_\-\-F\-A\-T\-A\-L@{L\-O\-G\-\_\-\-F\-A\-T\-A\-L}!logger.hpp@{logger.\-hpp}} \subsubsection[{L\-O\-G\-\_\-\-F\-A\-T\-A\-L}]{\setlength{\rightskip}{0pt plus 5cm}\#define L\-O\-G\-\_\-\-F\-A\-T\-A\-L~4}}\label{logger_8hpp_ac2164369b4d2bf72296f8ba6ea576ecf} N\-O\-T\-I\-C\-E\-: This file taken from Graph\-Lab (as stated in the license above). I have merged the C\-P\-P and H\-P\-P files. \begin{DoxyAuthor}{Author} Aapo Kyrola \end{DoxyAuthor} Used for fatal and probably irrecoverable conditions \hypertarget{logger_8hpp_aeb4f36db01bd128c7afeac5889dac311}{\index{logger.\-hpp@{logger.\-hpp}!L\-O\-G\-\_\-\-I\-N\-F\-O@{L\-O\-G\-\_\-\-I\-N\-F\-O}} \index{L\-O\-G\-\_\-\-I\-N\-F\-O@{L\-O\-G\-\_\-\-I\-N\-F\-O}!logger.hpp@{logger.\-hpp}} \subsubsection[{L\-O\-G\-\_\-\-I\-N\-F\-O}]{\setlength{\rightskip}{0pt plus 5cm}\#define L\-O\-G\-\_\-\-I\-N\-F\-O~1}}\label{logger_8hpp_aeb4f36db01bd128c7afeac5889dac311} Used for providing general useful information \hypertarget{logger_8hpp_a1632479322efa3952798f98177b54471}{\index{logger.\-hpp@{logger.\-hpp}!L\-O\-G\-\_\-\-N\-O\-N\-E@{L\-O\-G\-\_\-\-N\-O\-N\-E}} \index{L\-O\-G\-\_\-\-N\-O\-N\-E@{L\-O\-G\-\_\-\-N\-O\-N\-E}!logger.hpp@{logger.\-hpp}} \subsubsection[{L\-O\-G\-\_\-\-N\-O\-N\-E}]{\setlength{\rightskip}{0pt plus 5cm}\#define L\-O\-G\-\_\-\-N\-O\-N\-E~5}}\label{logger_8hpp_a1632479322efa3952798f98177b54471} O\-U\-T\-P\-U\-T\-L\-E\-V\-E\-L to L\-O\-G\-\_\-\-N\-O\-N\-E to disable logging \hypertarget{logger_8hpp_adf4476a6a4ea6c74231c826e899d7189}{\index{logger.\-hpp@{logger.\-hpp}!L\-O\-G\-\_\-\-W\-A\-R\-N\-I\-N\-G@{L\-O\-G\-\_\-\-W\-A\-R\-N\-I\-N\-G}} \index{L\-O\-G\-\_\-\-W\-A\-R\-N\-I\-N\-G@{L\-O\-G\-\_\-\-W\-A\-R\-N\-I\-N\-G}!logger.hpp@{logger.\-hpp}} \subsubsection[{L\-O\-G\-\_\-\-W\-A\-R\-N\-I\-N\-G}]{\setlength{\rightskip}{0pt plus 5cm}\#define L\-O\-G\-\_\-\-W\-A\-R\-N\-I\-N\-G~2}}\label{logger_8hpp_adf4476a6a4ea6c74231c826e899d7189} Logs interesting conditions which are probably not fatal \hypertarget{logger_8hpp_ae20b7239b817483f352df7496c34155a}{\index{logger.\-hpp@{logger.\-hpp}!logbuf@{logbuf}} \index{logbuf@{logbuf}!logger.hpp@{logger.\-hpp}} \subsubsection[{logbuf}]{\setlength{\rightskip}{0pt plus 5cm}\#define logbuf( \begin{DoxyParamCaption} \item[{}]{lvl, } \item[{}]{buf, } \item[{}]{len} \end{DoxyParamCaption} )}}\label{logger_8hpp_ae20b7239b817483f352df7496c34155a} {\bfseries Value\-:} \begin{DoxyCode} (\hyperlink{structlog__dispatch}{log\_dispatch<(lvl >}= \hyperlink{logger_8hpp_a3d18ed817dcda9f54a4f353ccf9b1b36}{OUTPUTLEVEL})>::exec(lvl, \_\_FILE\_\_, \(\backslash\) \_\_func\_\_ ,\_\_LINE\_\_,buf,len)) \end{DoxyCode} \hypertarget{logger_8hpp_ab58cdd006f6b33cbe171ab32effef95b}{\index{logger.\-hpp@{logger.\-hpp}!logger@{logger}} \index{logger@{logger}!logger.hpp@{logger.\-hpp}} \subsubsection[{logger}]{\setlength{\rightskip}{0pt plus 5cm}\#define logger( \begin{DoxyParamCaption} \item[{}]{lvl, } \item[{}]{fmt, } \item[{}]{...} \end{DoxyParamCaption} )~({\bf log\-\_\-dispatch}$<$(lvl $>$= {\bf O\-U\-T\-P\-U\-T\-L\-E\-V\-E\-L})$>$\-::exec(lvl,\-\_\-\-\_\-\-F\-I\-L\-E\-\_\-\-\_\-, \-\_\-\-\_\-func\-\_\-\-\_\- ,\-\_\-\-\_\-\-L\-I\-N\-E\-\_\-\-\_\-,fmt,\#\#\-\_\-\-\_\-\-V\-A\-\_\-\-A\-R\-G\-S\-\_\-\-\_\-))}}\label{logger_8hpp_ab58cdd006f6b33cbe171ab32effef95b} extracts the filename, line number and function name and calls \-\_\-log. It will be optimized away if L\-O\-G\-\_\-\-N\-O\-N\-E is set This relies on a few compiler macros. As far as I know, these macros are pretty standard among most other C++ compilers. \hypertarget{logger_8hpp_a3d18ed817dcda9f54a4f353ccf9b1b36}{\index{logger.\-hpp@{logger.\-hpp}!O\-U\-T\-P\-U\-T\-L\-E\-V\-E\-L@{O\-U\-T\-P\-U\-T\-L\-E\-V\-E\-L}} \index{O\-U\-T\-P\-U\-T\-L\-E\-V\-E\-L@{O\-U\-T\-P\-U\-T\-L\-E\-V\-E\-L}!logger.hpp@{logger.\-hpp}} \subsubsection[{O\-U\-T\-P\-U\-T\-L\-E\-V\-E\-L}]{\setlength{\rightskip}{0pt plus 5cm}\#define O\-U\-T\-P\-U\-T\-L\-E\-V\-E\-L~{\bf L\-O\-G\-\_\-\-D\-E\-B\-U\-G}}}\label{logger_8hpp_a3d18ed817dcda9f54a4f353ccf9b1b36} The minimum level to logger at
09jijiangwen-download
docs/latex/logger_8hpp.tex
TeX
asf20
13,386
\hypertarget{stripedio_8hpp}{\section{src/io/stripedio.hpp File Reference} \label{stripedio_8hpp}\index{src/io/stripedio.\-hpp@{src/io/stripedio.\-hpp}} } {\ttfamily \#include $<$iostream$>$}\\* {\ttfamily \#include $<$fcntl.\-h$>$}\\* {\ttfamily \#include $<$unistd.\-h$>$}\\* {\ttfamily \#include $<$assert.\-h$>$}\\* {\ttfamily \#include $<$stdint.\-h$>$}\\* {\ttfamily \#include $<$pthread.\-h$>$}\\* {\ttfamily \#include $<$errno.\-h$>$}\\* {\ttfamily \#include $<$vector$>$}\\* {\ttfamily \#include \char`\"{}logger/logger.\-hpp\char`\"{}}\\* {\ttfamily \#include \char`\"{}metrics/metrics.\-hpp\char`\"{}}\\* {\ttfamily \#include \char`\"{}util/synchronized\-\_\-queue.\-hpp\char`\"{}}\\* {\ttfamily \#include \char`\"{}util/ioutil.\-hpp\char`\"{}}\\* {\ttfamily \#include \char`\"{}util/cmdopts.\-hpp\char`\"{}}\\* \subsection*{Classes} \begin{DoxyCompactItemize} \item struct \hyperlink{structgraphchi_1_1io__descriptor}{graphchi\-::io\-\_\-descriptor} \item struct \hyperlink{structgraphchi_1_1refcountptr}{graphchi\-::refcountptr} \item struct \hyperlink{structgraphchi_1_1iotask}{graphchi\-::iotask} \item struct \hyperlink{structgraphchi_1_1thrinfo}{graphchi\-::thrinfo} \item struct \hyperlink{structgraphchi_1_1stripe__chunk}{graphchi\-::stripe\-\_\-chunk} \item struct \hyperlink{structgraphchi_1_1streaming__task}{graphchi\-::streaming\-\_\-task} \item struct \hyperlink{structgraphchi_1_1pinned__file}{graphchi\-::pinned\-\_\-file} \item class \hyperlink{classgraphchi_1_1stripedio}{graphchi\-::stripedio} \end{DoxyCompactItemize} \subsection*{Namespaces} \begin{DoxyCompactItemize} \item namespace \hyperlink{namespacegraphchi}{graphchi} \end{DoxyCompactItemize} \subsection*{Enumerations} \begin{DoxyCompactItemize} \item enum {\bfseries B\-L\-O\-C\-K\-\_\-\-A\-C\-T\-I\-O\-N} \{ {\bfseries R\-E\-A\-D}, {\bfseries W\-R\-I\-T\-E} \} \end{DoxyCompactItemize} \subsection{Detailed Description} \begin{DoxyAuthor}{Author} Aapo Kyrola \href{mailto:akyrola@cs.cmu.edu}{\tt akyrola@cs.\-cmu.\-edu} \end{DoxyAuthor} \begin{DoxyVersion}{Version} 1.\-0 \end{DoxyVersion} \hypertarget{toplist_8hpp_LICENSE}{}\subsection{L\-I\-C\-E\-N\-S\-E}\label{toplist_8hpp_LICENSE} Copyright \mbox{[}2012\mbox{]} \mbox{[}Aapo Kyrola, Guy Blelloch, Carlos Guestrin / Carnegie Mellon University\mbox{]} Licensed under the Apache License, Version 2.\-0 (the \char`\"{}\-License\char`\"{}); you may not use this file except in compliance with the License. You may obtain a copy of the License at \href{http://www.apache.org/licenses/LICENSE-2.0}{\tt http\-://www.\-apache.\-org/licenses/\-L\-I\-C\-E\-N\-S\-E-\/2.\-0} Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \char`\"{}\-A\-S I\-S\char`\"{} B\-A\-S\-I\-S, W\-I\-T\-H\-O\-U\-T W\-A\-R\-R\-A\-N\-T\-I\-E\-S O\-R C\-O\-N\-D\-I\-T\-I\-O\-N\-S O\-F A\-N\-Y K\-I\-N\-D, either express or implied. See the License for the specific language governing permissions and limitations under the License.\hypertarget{toplist_8hpp_DESCRIPTION}{}\subsection{D\-E\-S\-C\-R\-I\-P\-T\-I\-O\-N}\label{toplist_8hpp_DESCRIPTION} I/\-O manager.
09jijiangwen-download
docs/latex/stripedio_8hpp.tex
TeX
asf20
3,160
\hypertarget{structlog__dispatch_3_01false_01_4}{\section{log\-\_\-dispatch$<$ false $>$ Struct Template Reference} \label{structlog__dispatch_3_01false_01_4}\index{log\-\_\-dispatch$<$ false $>$@{log\-\_\-dispatch$<$ false $>$}} } \subsection*{Static Public Member Functions} \begin{DoxyCompactItemize} \item \hypertarget{structlog__dispatch_3_01false_01_4_a42d2eba1bbcdac86e2159c24635eb47a}{static void {\bfseries exec} (int loglevel, const char $\ast$file, const char $\ast$function, int line, const char $\ast$fmt,...)}\label{structlog__dispatch_3_01false_01_4_a42d2eba1bbcdac86e2159c24635eb47a} \end{DoxyCompactItemize} The documentation for this struct was generated from the following file\-:\begin{DoxyCompactItemize} \item src/logger/\hyperlink{logger_8hpp}{logger.\-hpp}\end{DoxyCompactItemize}
09jijiangwen-download
docs/latex/structlog__dispatch_3_01false_01_4.tex
TeX
asf20
810
\hypertarget{labelanalysis_8hpp}{\section{src/util/labelanalysis.hpp File Reference} \label{labelanalysis_8hpp}\index{src/util/labelanalysis.\-hpp@{src/util/labelanalysis.\-hpp}} } {\ttfamily \#include $<$vector$>$}\\* {\ttfamily \#include $<$algorithm$>$}\\* {\ttfamily \#include $<$errno.\-h$>$}\\* {\ttfamily \#include $<$assert.\-h$>$}\\* {\ttfamily \#include \char`\"{}logger/logger.\-hpp\char`\"{}}\\* {\ttfamily \#include \char`\"{}util/merge.\-hpp\char`\"{}}\\* {\ttfamily \#include \char`\"{}util/ioutil.\-hpp\char`\"{}}\\* {\ttfamily \#include \char`\"{}util/qsort.\-hpp\char`\"{}}\\* {\ttfamily \#include \char`\"{}api/chifilenames.\-hpp\char`\"{}}\\* \subsection*{Classes} \begin{DoxyCompactItemize} \item struct \hyperlink{structlabelcount__tt}{labelcount\-\_\-tt$<$ Label\-Type $>$} \end{DoxyCompactItemize} \subsection*{Functions} \begin{DoxyCompactItemize} \item \hypertarget{labelanalysis_8hpp_ab16ccd0d1ca8553f9960535c5c140347}{{\footnotesize template$<$typename Label\-Type $>$ }\\bool {\bfseries label\-\_\-count\-\_\-greater} (const \hyperlink{structlabelcount__tt}{labelcount\-\_\-tt}$<$ Label\-Type $>$ \&a, const \hyperlink{structlabelcount__tt}{labelcount\-\_\-tt}$<$ Label\-Type $>$ \&b)}\label{labelanalysis_8hpp_ab16ccd0d1ca8553f9960535c5c140347} \item {\footnotesize template$<$typename Label\-Type $>$ }\\void \hyperlink{labelanalysis_8hpp_a7d946005d286e451555dcc32a6b1f862}{analyze\-\_\-labels} (std\-::string base\-\_\-filename, int printtop=20) \end{DoxyCompactItemize} \subsection{Detailed Description} \begin{DoxyAuthor}{Author} Aapo Kyrola \href{mailto:akyrola@cs.cmu.edu}{\tt akyrola@cs.\-cmu.\-edu} \end{DoxyAuthor} \begin{DoxyVersion}{Version} 1.\-0 \end{DoxyVersion} \hypertarget{toplist_8hpp_LICENSE}{}\subsection{L\-I\-C\-E\-N\-S\-E}\label{toplist_8hpp_LICENSE} Copyright \mbox{[}2012\mbox{]} \mbox{[}Aapo Kyrola, Guy Blelloch, Carlos Guestrin / Carnegie Mellon University\mbox{]} Licensed under the Apache License, Version 2.\-0 (the \char`\"{}\-License\char`\"{}); you may not use this file except in compliance with the License. You may obtain a copy of the License at \href{http://www.apache.org/licenses/LICENSE-2.0}{\tt http\-://www.\-apache.\-org/licenses/\-L\-I\-C\-E\-N\-S\-E-\/2.\-0} Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \char`\"{}\-A\-S I\-S\char`\"{} B\-A\-S\-I\-S, W\-I\-T\-H\-O\-U\-T W\-A\-R\-R\-A\-N\-T\-I\-E\-S O\-R C\-O\-N\-D\-I\-T\-I\-O\-N\-S O\-F A\-N\-Y K\-I\-N\-D, either express or implied. See the License for the specific language governing permissions and limitations under the License.\hypertarget{toplist_8hpp_DESCRIPTION}{}\subsection{D\-E\-S\-C\-R\-I\-P\-T\-I\-O\-N}\label{toplist_8hpp_DESCRIPTION} Analyses output of label propagation algorithms such as connected components and community detection. Memory efficient implementation. \begin{DoxyAuthor}{Author} Aapo Kyrola \end{DoxyAuthor} \subsection{Function Documentation} \hypertarget{labelanalysis_8hpp_a7d946005d286e451555dcc32a6b1f862}{\index{labelanalysis.\-hpp@{labelanalysis.\-hpp}!analyze\-\_\-labels@{analyze\-\_\-labels}} \index{analyze\-\_\-labels@{analyze\-\_\-labels}!labelanalysis.hpp@{labelanalysis.\-hpp}} \subsubsection[{analyze\-\_\-labels}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename Label\-Type $>$ void analyze\-\_\-labels ( \begin{DoxyParamCaption} \item[{std\-::string}]{base\-\_\-filename, } \item[{int}]{printtop = {\ttfamily 20}} \end{DoxyParamCaption} )}}\label{labelanalysis_8hpp_a7d946005d286e451555dcc32a6b1f862} N\-O\-T\-E\-: this implementation is quite a mouthful. Cleaner implementation could be done by using a map implementation. But S\-T\-L map takes too much memory, and I want to avoid Boost dependency -\/ which would have boost\-::unordered\-\_\-map.
09jijiangwen-download
docs/latex/labelanalysis_8hpp.tex
TeX
asf20
3,824
\hypertarget{vertex__aggregator_8hpp}{\section{src/api/vertex\-\_\-aggregator.hpp File Reference} \label{vertex__aggregator_8hpp}\index{src/api/vertex\-\_\-aggregator.\-hpp@{src/api/vertex\-\_\-aggregator.\-hpp}} } {\ttfamily \#include $<$errno.\-h$>$}\\* {\ttfamily \#include $<$memory.\-h$>$}\\* {\ttfamily \#include $<$string$>$}\\* {\ttfamily \#include \char`\"{}graphchi\-\_\-types.\-hpp\char`\"{}}\\* {\ttfamily \#include \char`\"{}api/chifilenames.\-hpp\char`\"{}}\\* {\ttfamily \#include \char`\"{}util/ioutil.\-hpp\char`\"{}}\\* \subsection*{Classes} \begin{DoxyCompactItemize} \item class \hyperlink{classgraphchi_1_1_v_callback}{graphchi\-::\-V\-Callback$<$ Vertex\-Data\-Type $>$} \item class \hyperlink{classgraphchi_1_1_sum_callback}{graphchi\-::\-Sum\-Callback$<$ Vertex\-Data\-Type, Sum\-Type $>$} \end{DoxyCompactItemize} \subsection*{Namespaces} \begin{DoxyCompactItemize} \item namespace \hyperlink{namespacegraphchi}{graphchi} \end{DoxyCompactItemize} \subsection*{Functions} \begin{DoxyCompactItemize} \item \hypertarget{namespacegraphchi_ac6c01d4f87a2ce388767492d4c443b18}{{\footnotesize template$<$typename Vertex\-Data\-Type $>$ }\\void {\bfseries graphchi\-::foreach\-\_\-vertices} (std\-::string basefilename, vid\-\_\-t fromv, vid\-\_\-t tov, V\-Callback$<$ \hyperlink{basic__dynamicengine__smoketest_8cpp_acf10237949ab87b83055ff6aa646c565}{Vertex\-Data\-Type} $>$ \&callback)}\label{namespacegraphchi_ac6c01d4f87a2ce388767492d4c443b18} \item \hypertarget{namespacegraphchi_a62940ec3514d9bd91c0b7e6363e7b936}{{\footnotesize template$<$typename Vertex\-Data\-Type , typename Sum\-Type $>$ }\\Sum\-Type {\bfseries graphchi\-::sum\-\_\-vertices} (std\-::string base\-\_\-filename, vid\-\_\-t fromv, vid\-\_\-t tov)}\label{namespacegraphchi_a62940ec3514d9bd91c0b7e6363e7b936} \end{DoxyCompactItemize} \subsection{Detailed Description} \begin{DoxyAuthor}{Author} Aapo Kyrola \href{mailto:akyrola@cs.cmu.edu}{\tt akyrola@cs.\-cmu.\-edu} \end{DoxyAuthor} \begin{DoxyVersion}{Version} 1.\-0 \end{DoxyVersion} \hypertarget{toplist_8hpp_LICENSE}{}\subsection{L\-I\-C\-E\-N\-S\-E}\label{toplist_8hpp_LICENSE} Copyright \mbox{[}2012\mbox{]} \mbox{[}Aapo Kyrola, Guy Blelloch, Carlos Guestrin / Carnegie Mellon University\mbox{]} Licensed under the Apache License, Version 2.\-0 (the \char`\"{}\-License\char`\"{}); you may not use this file except in compliance with the License. You may obtain a copy of the License at \href{http://www.apache.org/licenses/LICENSE-2.0}{\tt http\-://www.\-apache.\-org/licenses/\-L\-I\-C\-E\-N\-S\-E-\/2.\-0} Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \char`\"{}\-A\-S I\-S\char`\"{} B\-A\-S\-I\-S, W\-I\-T\-H\-O\-U\-T W\-A\-R\-R\-A\-N\-T\-I\-E\-S O\-R C\-O\-N\-D\-I\-T\-I\-O\-N\-S O\-F A\-N\-Y K\-I\-N\-D, either express or implied. See the License for the specific language governing permissions and limitations under the License.\hypertarget{toplist_8hpp_DESCRIPTION}{}\subsection{D\-E\-S\-C\-R\-I\-P\-T\-I\-O\-N}\label{toplist_8hpp_DESCRIPTION} Simple vertex-\/aggregators/scanners which allows reductions over all vertices in an I/\-O efficient manner.
09jijiangwen-download
docs/latex/vertex__aggregator_8hpp.tex
TeX
asf20
3,195
%!PS-Adobe-2.0 EPSF-2.0 %%Title: ClassName %%Creator: Doxygen %%CreationDate: Time %%For: %Magnification: 1.00 %%Orientation: Portrait %%BoundingBox: 0 0 500 103.896104 %%Pages: 0 %%BeginSetup %%EndSetup %%EndComments % ----- variables ----- /boxwidth 0 def /boxheight 40 def /fontheight 24 def /marginwidth 10 def /distx 20 def /disty 40 def /boundaspect 4.812500 def % aspect ratio of the BoundingBox (width/height) /boundx 500 def /boundy boundx boundaspect div def /xspacing 0 def /yspacing 0 def /rows 2 def /cols 1 def /scalefactor 0 def /boxfont /Times-Roman findfont fontheight scalefont def % ----- procedures ----- /dotted { [1 4] 0 setdash } def /dashed { [5] 0 setdash } def /solid { [] 0 setdash } def /max % result = MAX(arg1,arg2) { /a exch def /b exch def a b gt {a} {b} ifelse } def /xoffset % result = MAX(0,(scalefactor-(boxwidth*cols+distx*(cols-1)))/2) { 0 scalefactor boxwidth cols mul distx cols 1 sub mul add sub 2 div max } def /cw % boxwidth = MAX(boxwidth, stringwidth(arg1)) { /str exch def /boxwidth boxwidth str stringwidth pop max def } def /box % draws a box with text `arg1' at grid pos (arg2,arg3) { gsave 2 setlinewidth newpath exch xspacing mul xoffset add exch yspacing mul moveto boxwidth 0 rlineto 0 boxheight rlineto boxwidth neg 0 rlineto 0 boxheight neg rlineto closepath dup stringwidth pop neg boxwidth add 2 div boxheight fontheight 2 div sub 2 div rmoveto show stroke grestore } def /mark { newpath exch xspacing mul xoffset add boxwidth add exch yspacing mul moveto 0 boxheight 4 div rlineto boxheight neg 4 div boxheight neg 4 div rlineto closepath eofill stroke } def /arrow { newpath moveto 3 -8 rlineto -6 0 rlineto 3 8 rlineto closepath eofill stroke } def /out % draws an output connector for the block at (arg1,arg2) { newpath exch xspacing mul xoffset add boxwidth 2 div add exch yspacing mul boxheight add /y exch def /x exch def x y moveto 0 disty 2 div rlineto stroke 1 eq { x y disty 2 div add arrow } if } def /in % draws an input connector for the block at (arg1,arg2) { newpath exch xspacing mul xoffset add boxwidth 2 div add exch yspacing mul disty 2 div sub /y exch def /x exch def x y moveto 0 disty 2 div rlineto stroke 1 eq { x y disty 2 div add arrow } if } def /hedge { exch xspacing mul xoffset add boxwidth 2 div add exch yspacing mul boxheight 2 div sub /y exch def /x exch def newpath x y moveto boxwidth 2 div distx add 0 rlineto stroke 1 eq { newpath x boxwidth 2 div distx add add y moveto -8 3 rlineto 0 -6 rlineto 8 3 rlineto closepath eofill stroke } if } def /vedge { /ye exch def /ys exch def /xs exch def newpath xs xspacing mul xoffset add boxwidth 2 div add dup ys yspacing mul boxheight 2 div sub moveto ye yspacing mul boxheight 2 div sub lineto stroke } def /conn % connections the blocks from col `arg1' to `arg2' of row `arg3' { /ys exch def /xe exch def /xs exch def newpath xs xspacing mul xoffset add boxwidth 2 div add ys yspacing mul disty 2 div sub moveto xspacing xe xs sub mul 0 rlineto stroke } def % ----- main ------ boxfont setfont 1 boundaspect scale (CommunityDetectionProgram) cw (graphchi::GraphChiProgram< VertexDataType, EdgeDataType >) cw /boxwidth boxwidth marginwidth 2 mul add def /xspacing boxwidth distx add def /yspacing boxheight disty add def /scalefactor boxwidth cols mul distx cols 1 sub mul add boxheight rows mul disty rows 1 sub mul add boundaspect mul max def boundx scalefactor div boundy scalefactor div scale % ----- classes ----- (CommunityDetectionProgram) 0.000000 0.000000 box (graphchi::GraphChiProgram< VertexDataType, EdgeDataType >) 0.000000 1.000000 box % ----- relations ----- solid 0 0.000000 0.000000 out solid 1 0.000000 1.000000 in
09jijiangwen-download
docs/latex/struct_community_detection_program.eps
PostScript
asf20
3,906
\hypertarget{functional__bulksync_8hpp}{\section{src/api/functional/functional\-\_\-bulksync.hpp File Reference} \label{functional__bulksync_8hpp}\index{src/api/functional/functional\-\_\-bulksync.\-hpp@{src/api/functional/functional\-\_\-bulksync.\-hpp}} } {\ttfamily \#include $<$assert.\-h$>$}\\* {\ttfamily \#include \char`\"{}api/graph\-\_\-objects.\-hpp\char`\"{}}\\* {\ttfamily \#include \char`\"{}api/graphchi\-\_\-context.\-hpp\char`\"{}}\\* {\ttfamily \#include \char`\"{}api/functional/functional\-\_\-defs.\-hpp\char`\"{}}\\* {\ttfamily \#include \char`\"{}metrics/metrics.\-hpp\char`\"{}}\\* {\ttfamily \#include \char`\"{}graphchi\-\_\-types.\-hpp\char`\"{}}\\* \subsection*{Classes} \begin{DoxyCompactItemize} \item class \hyperlink{classgraphchi_1_1functional__vertex__unweighted__bulksync}{graphchi\-::functional\-\_\-vertex\-\_\-unweighted\-\_\-bulksync$<$ K\-E\-R\-N\-E\-L $>$} \item class \hyperlink{classgraphchi_1_1_functional_program_proxy_bulk_sync}{graphchi\-::\-Functional\-Program\-Proxy\-Bulk\-Sync$<$ K\-E\-R\-N\-E\-L $>$} \end{DoxyCompactItemize} \subsection*{Namespaces} \begin{DoxyCompactItemize} \item namespace \hyperlink{namespacegraphchi}{graphchi} \end{DoxyCompactItemize} \subsection{Detailed Description} \begin{DoxyAuthor}{Author} Aapo Kyrola \href{mailto:akyrola@cs.cmu.edu}{\tt akyrola@cs.\-cmu.\-edu} \end{DoxyAuthor} \begin{DoxyVersion}{Version} 1.\-0 \end{DoxyVersion} \hypertarget{toplist_8hpp_LICENSE}{}\subsection{L\-I\-C\-E\-N\-S\-E}\label{toplist_8hpp_LICENSE} Copyright \mbox{[}2012\mbox{]} \mbox{[}Aapo Kyrola, Guy Blelloch, Carlos Guestrin / Carnegie Mellon University\mbox{]} Licensed under the Apache License, Version 2.\-0 (the \char`\"{}\-License\char`\"{}); you may not use this file except in compliance with the License. You may obtain a copy of the License at \href{http://www.apache.org/licenses/LICENSE-2.0}{\tt http\-://www.\-apache.\-org/licenses/\-L\-I\-C\-E\-N\-S\-E-\/2.\-0} Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \char`\"{}\-A\-S I\-S\char`\"{} B\-A\-S\-I\-S, W\-I\-T\-H\-O\-U\-T W\-A\-R\-R\-A\-N\-T\-I\-E\-S O\-R C\-O\-N\-D\-I\-T\-I\-O\-N\-S O\-F A\-N\-Y K\-I\-N\-D, either express or implied. See the License for the specific language governing permissions and limitations under the License.\hypertarget{toplist_8hpp_DESCRIPTION}{}\subsection{D\-E\-S\-C\-R\-I\-P\-T\-I\-O\-N}\label{toplist_8hpp_DESCRIPTION} Bulk-\/synchronous implementation of the functional A\-P\-I. This A\-P\-I can be used to implement Sparse-\/\-Matrix-\/\-Vector-\/\-Multiply programs.\hypertarget{namespacegraphchi_TODO}{}\subsection{T\-O\-D\-O}\label{namespacegraphchi_TODO} There is too much common code with the semi-\/sync version. Consolidate!
09jijiangwen-download
docs/latex/functional__bulksync_8hpp.tex
TeX
asf20
2,783
\hypertarget{structdense__adj}{\section{dense\-\_\-adj Struct Reference} \label{structdense__adj}\index{dense\-\_\-adj@{dense\-\_\-adj}} } \subsection*{Public Member Functions} \begin{DoxyCompactItemize} \item \hypertarget{structdense__adj_ae927c505a018234181040d8f8047c239}{{\bfseries dense\-\_\-adj} (int \-\_\-count, vid\-\_\-t $\ast$\-\_\-adjlist)}\label{structdense__adj_ae927c505a018234181040d8f8047c239} \end{DoxyCompactItemize} \subsection*{Public Attributes} \begin{DoxyCompactItemize} \item \hypertarget{structdense__adj_a1516a6e0a96ca3b0bafc1a190a873815}{int {\bfseries count}}\label{structdense__adj_a1516a6e0a96ca3b0bafc1a190a873815} \item \hypertarget{structdense__adj_a9e42d3e6d58a657806910cc1a6101d79}{vid\-\_\-t $\ast$ {\bfseries adjlist}}\label{structdense__adj_a9e42d3e6d58a657806910cc1a6101d79} \end{DoxyCompactItemize} The documentation for this struct was generated from the following file\-:\begin{DoxyCompactItemize} \item example\-\_\-apps/\hyperlink{trianglecounting_8cpp}{trianglecounting.\-cpp}\end{DoxyCompactItemize}
09jijiangwen-download
docs/latex/structdense__adj.tex
TeX
asf20
1,056
\hypertarget{structedge}{\section{edge Struct Reference} \label{structedge}\index{edge@{edge}} } \subsection*{Public Attributes} \begin{DoxyCompactItemize} \item \hypertarget{structedge_a67f912de70a5da5b5e16a767c52923da}{unsigned int {\bfseries from}}\label{structedge_a67f912de70a5da5b5e16a767c52923da} \item \hypertarget{structedge_a4db084bb02d5108df2736ca5dc79dbc9}{unsigned int {\bfseries to}}\label{structedge_a4db084bb02d5108df2736ca5dc79dbc9} \end{DoxyCompactItemize} \subsection{Detailed Description} Simple tool for creating input for streaming graph demos. An edgelist is read and two files are created\-: base-\/graph and streaming input file. Streaming input is shuffled. N\-O\-T\-E\-: This is unsupported code and requires plenty of memory. The documentation for this struct was generated from the following file\-:\begin{DoxyCompactItemize} \item example\-\_\-apps/demotools/create\-\_\-streaminggraph\-\_\-demofiles.\-cpp\end{DoxyCompactItemize}
09jijiangwen-download
docs/latex/structedge.tex
TeX
asf20
970
\hypertarget{toplist_8hpp}{\section{src/util/toplist.hpp File Reference} \label{toplist_8hpp}\index{src/util/toplist.\-hpp@{src/util/toplist.\-hpp}} } {\ttfamily \#include $<$vector$>$}\\* {\ttfamily \#include $<$algorithm$>$}\\* {\ttfamily \#include $<$errno.\-h$>$}\\* {\ttfamily \#include $<$assert.\-h$>$}\\* {\ttfamily \#include \char`\"{}logger/logger.\-hpp\char`\"{}}\\* {\ttfamily \#include \char`\"{}util/merge.\-hpp\char`\"{}}\\* {\ttfamily \#include \char`\"{}util/ioutil.\-hpp\char`\"{}}\\* {\ttfamily \#include \char`\"{}util/qsort.\-hpp\char`\"{}}\\* {\ttfamily \#include \char`\"{}api/chifilenames.\-hpp\char`\"{}}\\* \subsection*{Classes} \begin{DoxyCompactItemize} \item struct \hyperlink{structgraphchi_1_1vertex__value}{graphchi\-::vertex\-\_\-value$<$ Vertex\-Data\-Type $>$} \end{DoxyCompactItemize} \subsection*{Namespaces} \begin{DoxyCompactItemize} \item namespace \hyperlink{namespacegraphchi}{graphchi} \end{DoxyCompactItemize} \subsection*{Functions} \begin{DoxyCompactItemize} \item \hypertarget{namespacegraphchi_a98550b20ef175af94dafe5f73eaed1ae}{{\footnotesize template$<$typename Vertex\-Data\-Type $>$ }\\bool {\bfseries graphchi\-::vertex\-\_\-value\-\_\-greater} (const vertex\-\_\-value$<$ \hyperlink{basic__dynamicengine__smoketest_8cpp_acf10237949ab87b83055ff6aa646c565}{Vertex\-Data\-Type} $>$ \&a, const vertex\-\_\-value$<$ \hyperlink{basic__dynamicengine__smoketest_8cpp_acf10237949ab87b83055ff6aa646c565}{Vertex\-Data\-Type} $>$ \&b)}\label{namespacegraphchi_a98550b20ef175af94dafe5f73eaed1ae} \item {\footnotesize template$<$typename Vertex\-Data\-Type $>$ }\\std\-::vector$<$ vertex\-\_\-value\\* $<$ \hyperlink{basic__dynamicengine__smoketest_8cpp_acf10237949ab87b83055ff6aa646c565}{Vertex\-Data\-Type} $>$ $>$ \hyperlink{namespacegraphchi_aad644c5b45d81ce334331029e08b24ec}{graphchi\-::get\-\_\-top\-\_\-vertices} (std\-::string basefilename, int ntop) \end{DoxyCompactItemize} \subsection{Detailed Description} \begin{DoxyAuthor}{Author} Aapo Kyrola \href{mailto:akyrola@cs.cmu.edu}{\tt akyrola@cs.\-cmu.\-edu} \end{DoxyAuthor} \begin{DoxyVersion}{Version} 1.\-0 \end{DoxyVersion} \hypertarget{toplist_8hpp_LICENSE}{}\subsection{L\-I\-C\-E\-N\-S\-E}\label{toplist_8hpp_LICENSE} Copyright \mbox{[}2012\mbox{]} \mbox{[}Aapo Kyrola, Guy Blelloch, Carlos Guestrin / Carnegie Mellon University\mbox{]} Licensed under the Apache License, Version 2.\-0 (the \char`\"{}\-License\char`\"{}); you may not use this file except in compliance with the License. You may obtain a copy of the License at \href{http://www.apache.org/licenses/LICENSE-2.0}{\tt http\-://www.\-apache.\-org/licenses/\-L\-I\-C\-E\-N\-S\-E-\/2.\-0} Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \char`\"{}\-A\-S I\-S\char`\"{} B\-A\-S\-I\-S, W\-I\-T\-H\-O\-U\-T W\-A\-R\-R\-A\-N\-T\-I\-E\-S O\-R C\-O\-N\-D\-I\-T\-I\-O\-N\-S O\-F A\-N\-Y K\-I\-N\-D, either express or implied. See the License for the specific language governing permissions and limitations under the License.\hypertarget{toplist_8hpp_DESCRIPTION}{}\subsection{D\-E\-S\-C\-R\-I\-P\-T\-I\-O\-N}\label{toplist_8hpp_DESCRIPTION} Tools for listing the T\-O\-P K values from a verte data file.
09jijiangwen-download
docs/latex/toplist_8hpp.tex
TeX
asf20
3,248
\hypertarget{structlog__stream__dispatch_3_01true_01_4}{\section{log\-\_\-stream\-\_\-dispatch$<$ true $>$ Struct Template Reference} \label{structlog__stream__dispatch_3_01true_01_4}\index{log\-\_\-stream\-\_\-dispatch$<$ true $>$@{log\-\_\-stream\-\_\-dispatch$<$ true $>$}} } \subsection*{Static Public Member Functions} \begin{DoxyCompactItemize} \item \hypertarget{structlog__stream__dispatch_3_01true_01_4_a649cca69c67ae7348851dff62acd75b8}{static \hyperlink{classfile__logger}{file\-\_\-logger} \& {\bfseries exec} (int lineloglevel, const char $\ast$file, const char $\ast$function, int line)}\label{structlog__stream__dispatch_3_01true_01_4_a649cca69c67ae7348851dff62acd75b8} \end{DoxyCompactItemize} The documentation for this struct was generated from the following file\-:\begin{DoxyCompactItemize} \item src/logger/\hyperlink{logger_8hpp}{logger.\-hpp}\end{DoxyCompactItemize}
09jijiangwen-download
docs/latex/structlog__stream__dispatch_3_01true_01_4.tex
TeX
asf20
895
\hypertarget{reps_2file__reporter_8hpp}{\section{src/metrics/reps/file\-\_\-reporter.hpp File Reference} \label{reps_2file__reporter_8hpp}\index{src/metrics/reps/file\-\_\-reporter.\-hpp@{src/metrics/reps/file\-\_\-reporter.\-hpp}} } {\ttfamily \#include $<$fstream$>$}\\* {\ttfamily \#include $<$cstdio$>$}\\* {\ttfamily \#include \char`\"{}metrics/metrics.\-hpp\char`\"{}}\\* \subsection*{Classes} \begin{DoxyCompactItemize} \item class \hyperlink{classgraphchi_1_1file__reporter}{graphchi\-::file\-\_\-reporter} \end{DoxyCompactItemize} \subsection*{Namespaces} \begin{DoxyCompactItemize} \item namespace \hyperlink{namespacegraphchi}{graphchi} \end{DoxyCompactItemize} \subsection{Detailed Description} \begin{DoxyAuthor}{Author} Aapo Kyrola \href{mailto:akyrola@cs.cmu.edu}{\tt akyrola@cs.\-cmu.\-edu} \end{DoxyAuthor} \begin{DoxyVersion}{Version} 1.\-0 \end{DoxyVersion} \hypertarget{toplist_8hpp_LICENSE}{}\subsection{L\-I\-C\-E\-N\-S\-E}\label{toplist_8hpp_LICENSE} Copyright \mbox{[}2012\mbox{]} \mbox{[}Aapo Kyrola, Guy Blelloch, Carlos Guestrin / Carnegie Mellon University\mbox{]} Licensed under the Apache License, Version 2.\-0 (the \char`\"{}\-License\char`\"{}); you may not use this file except in compliance with the License. You may obtain a copy of the License at \href{http://www.apache.org/licenses/LICENSE-2.0}{\tt http\-://www.\-apache.\-org/licenses/\-L\-I\-C\-E\-N\-S\-E-\/2.\-0} Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \char`\"{}\-A\-S I\-S\char`\"{} B\-A\-S\-I\-S, W\-I\-T\-H\-O\-U\-T W\-A\-R\-R\-A\-N\-T\-I\-E\-S O\-R C\-O\-N\-D\-I\-T\-I\-O\-N\-S O\-F A\-N\-Y K\-I\-N\-D, either express or implied. See the License for the specific language governing permissions and limitations under the License.\hypertarget{toplist_8hpp_DESCRIPTION}{}\subsection{D\-E\-S\-C\-R\-I\-P\-T\-I\-O\-N}\label{toplist_8hpp_DESCRIPTION} File metrics reporter.
09jijiangwen-download
docs/latex/reps_2file__reporter_8hpp.tex
TeX
asf20
1,953
\hypertarget{structmgstat}{\section{mgstat Struct Reference} \label{structmgstat}\index{mgstat@{mgstat}} } \subsection*{Public Attributes} \begin{DoxyCompactItemize} \item \hypertarget{structmgstat_aba4026da49a23f5535503be8f367da71}{int {\bfseries is\-\_\-directory}}\label{structmgstat_aba4026da49a23f5535503be8f367da71} \item \hypertarget{structmgstat_a2ae73c69489e86d38793f591f406d86b}{int64\-\_\-t {\bfseries size}}\label{structmgstat_a2ae73c69489e86d38793f591f406d86b} \item \hypertarget{structmgstat_a1b35e1ab69603e81c28de2dd3b3f0c5a}{time\-\_\-t {\bfseries mtime}}\label{structmgstat_a1b35e1ab69603e81c28de2dd3b3f0c5a} \end{DoxyCompactItemize} The documentation for this struct was generated from the following file\-:\begin{DoxyCompactItemize} \item src/external/vpiotr-\/mongoose-\/cpp/mongoose.\-c\end{DoxyCompactItemize}
09jijiangwen-download
docs/latex/structmgstat.tex
TeX
asf20
841
\hypertarget{plotter_8hpp}{\section{src/httpadmin/plotter.hpp File Reference} \label{plotter_8hpp}\index{src/httpadmin/plotter.\-hpp@{src/httpadmin/plotter.\-hpp}} } {\ttfamily \#include $<$cstdio$>$}\\* {\ttfamily \#include $<$stdlib.\-h$>$}\\* {\ttfamily \#include \char`\"{}graphchi\-\_\-basic\-\_\-includes.\-hpp\char`\"{}}\\* \subsection*{Namespaces} \begin{DoxyCompactItemize} \item namespace \hyperlink{namespacegraphchi}{graphchi} \end{DoxyCompactItemize} \subsection*{Functions} \begin{DoxyCompactItemize} \item \hypertarget{namespacegraphchi_afea76a350836cf62d151d68549a3af3c}{{\footnotesize template$<$typename E\-N\-G\-I\-N\-E $>$ }\\void {\bfseries graphchi\-::addval} (E\-N\-G\-I\-N\-E $\ast$engine, std\-::string plotname, double val)}\label{namespacegraphchi_afea76a350836cf62d151d68549a3af3c} \item \hypertarget{namespacegraphchi_a4676c68b68da1a5528fc011747ce022b}{{\footnotesize template$<$typename E\-N\-G\-I\-N\-E $>$ }\\void {\bfseries graphchi\-::update\-\_\-plotdata} (E\-N\-G\-I\-N\-E $\ast$engine)}\label{namespacegraphchi_a4676c68b68da1a5528fc011747ce022b} \end{DoxyCompactItemize} \subsection{Detailed Description} \begin{DoxyAuthor}{Author} Aapo Kyrola \href{mailto:akyrola@cs.cmu.edu}{\tt akyrola@cs.\-cmu.\-edu} \end{DoxyAuthor} \begin{DoxyVersion}{Version} 1.\-0 \end{DoxyVersion} \hypertarget{toplist_8hpp_LICENSE}{}\subsection{L\-I\-C\-E\-N\-S\-E}\label{toplist_8hpp_LICENSE} Copyright \mbox{[}2012\mbox{]} \mbox{[}Aapo Kyrola, Guy Blelloch, Carlos Guestrin / Carnegie Mellon University\mbox{]} Licensed under the Apache License, Version 2.\-0 (the \char`\"{}\-License\char`\"{}); you may not use this file except in compliance with the License. You may obtain a copy of the License at \href{http://www.apache.org/licenses/LICENSE-2.0}{\tt http\-://www.\-apache.\-org/licenses/\-L\-I\-C\-E\-N\-S\-E-\/2.\-0} Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \char`\"{}\-A\-S I\-S\char`\"{} B\-A\-S\-I\-S, W\-I\-T\-H\-O\-U\-T W\-A\-R\-R\-A\-N\-T\-I\-E\-S O\-R C\-O\-N\-D\-I\-T\-I\-O\-N\-S O\-F A\-N\-Y K\-I\-N\-D, either express or implied. See the License for the specific language governing permissions and limitations under the License.\hypertarget{toplist_8hpp_DESCRIPTION}{}\subsection{D\-E\-S\-C\-R\-I\-P\-T\-I\-O\-N}\label{toplist_8hpp_DESCRIPTION} Code that generates periodically engine status and performance related plots using python's matplotlib. Relatively hacky code.
09jijiangwen-download
docs/latex/plotter_8hpp.tex
TeX
asf20
2,496
\hypertarget{edgebuffers_8hpp}{\section{src/engine/dynamic\-\_\-graphs/edgebuffers.hpp File Reference} \label{edgebuffers_8hpp}\index{src/engine/dynamic\-\_\-graphs/edgebuffers.\-hpp@{src/engine/dynamic\-\_\-graphs/edgebuffers.\-hpp}} } {\ttfamily \#include $<$stdlib.\-h$>$}\\* {\ttfamily \#include $<$vector$>$}\\* \subsection*{Classes} \begin{DoxyCompactItemize} \item struct \hyperlink{structgraphchi_1_1created__edge}{graphchi\-::created\-\_\-edge$<$ Edge\-Data\-Type $>$} \item class \hyperlink{classgraphchi_1_1edge__buffer__flat}{graphchi\-::edge\-\_\-buffer\-\_\-flat$<$ E\-T $>$} \end{DoxyCompactItemize} \subsection*{Namespaces} \begin{DoxyCompactItemize} \item namespace \hyperlink{namespacegraphchi}{graphchi} \end{DoxyCompactItemize} \subsection*{Macros} \begin{DoxyCompactItemize} \item \hypertarget{edgebuffers_8hpp_a14ab28cfc2ed32217ee3d24c10bc09ff}{\#define {\bfseries E\-D\-G\-E\-\_\-\-B\-U\-F\-F\-E\-R\-\_\-\-C\-H\-U\-N\-K\-S\-I\-Z\-E}~65536}\label{edgebuffers_8hpp_a14ab28cfc2ed32217ee3d24c10bc09ff} \end{DoxyCompactItemize} \subsection{Detailed Description} \begin{DoxyAuthor}{Author} Aapo Kyrola \href{mailto:akyrola@cs.cmu.edu}{\tt akyrola@cs.\-cmu.\-edu} \end{DoxyAuthor} \begin{DoxyVersion}{Version} 1.\-0 \end{DoxyVersion} \hypertarget{toplist_8hpp_LICENSE}{}\subsection{L\-I\-C\-E\-N\-S\-E}\label{toplist_8hpp_LICENSE} Copyright \mbox{[}2012\mbox{]} \mbox{[}Aapo Kyrola, Guy Blelloch, Carlos Guestrin / Carnegie Mellon University\mbox{]} Licensed under the Apache License, Version 2.\-0 (the \char`\"{}\-License\char`\"{}); you may not use this file except in compliance with the License. You may obtain a copy of the License at \href{http://www.apache.org/licenses/LICENSE-2.0}{\tt http\-://www.\-apache.\-org/licenses/\-L\-I\-C\-E\-N\-S\-E-\/2.\-0} Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \char`\"{}\-A\-S I\-S\char`\"{} B\-A\-S\-I\-S, W\-I\-T\-H\-O\-U\-T W\-A\-R\-R\-A\-N\-T\-I\-E\-S O\-R C\-O\-N\-D\-I\-T\-I\-O\-N\-S O\-F A\-N\-Y K\-I\-N\-D, either express or implied. See the License for the specific language governing permissions and limitations under the License.\hypertarget{toplist_8hpp_DESCRIPTION}{}\subsection{D\-E\-S\-C\-R\-I\-P\-T\-I\-O\-N}\label{toplist_8hpp_DESCRIPTION} Edge buffers used by the dynamic graph engine.
09jijiangwen-download
docs/latex/edgebuffers_8hpp.tex
TeX
asf20
2,353
\hypertarget{engine__factory_8hpp}{\section{src/engine/engine\-\_\-factory.hpp File Reference} \label{engine__factory_8hpp}\index{src/engine/engine\-\_\-factory.\-hpp@{src/engine/engine\-\_\-factory.\-hpp}} } \subsection{Detailed Description} \begin{DoxyAuthor}{Author} Aapo Kyrola \href{mailto:akyrola@cs.cmu.edu}{\tt akyrola@cs.\-cmu.\-edu} \end{DoxyAuthor} \begin{DoxyVersion}{Version} 1.\-0 \end{DoxyVersion} \hypertarget{toplist_8hpp_LICENSE}{}\subsection{L\-I\-C\-E\-N\-S\-E}\label{toplist_8hpp_LICENSE} Copyright \mbox{[}2012\mbox{]} \mbox{[}Aapo Kyrola, Guy Blelloch, Carlos Guestrin / Carnegie Mellon University\mbox{]} Licensed under the Apache License, Version 2.\-0 (the \char`\"{}\-License\char`\"{}); you may not use this file except in compliance with the License. You may obtain a copy of the License at \href{http://www.apache.org/licenses/LICENSE-2.0}{\tt http\-://www.\-apache.\-org/licenses/\-L\-I\-C\-E\-N\-S\-E-\/2.\-0} Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \char`\"{}\-A\-S I\-S\char`\"{} B\-A\-S\-I\-S, W\-I\-T\-H\-O\-U\-T W\-A\-R\-R\-A\-N\-T\-I\-E\-S O\-R C\-O\-N\-D\-I\-T\-I\-O\-N\-S O\-F A\-N\-Y K\-I\-N\-D, either express or implied. See the License for the specific language governing permissions and limitations under the License.\hypertarget{toplist_8hpp_DESCRIPTION}{}\subsection{D\-E\-S\-C\-R\-I\-P\-T\-I\-O\-N}\label{toplist_8hpp_DESCRIPTION} Factory methods for creating Graph\-Chi engines.
09jijiangwen-download
docs/latex/engine__factory_8hpp.tex
TeX
asf20
1,513
\hypertarget{cmdopts_8hpp}{\section{src/util/cmdopts.hpp File Reference} \label{cmdopts_8hpp}\index{src/util/cmdopts.\-hpp@{src/util/cmdopts.\-hpp}} } {\ttfamily \#include $<$string$>$}\\* {\ttfamily \#include $<$iostream$>$}\\* {\ttfamily \#include \char`\"{}api/chifilenames.\-hpp\char`\"{}}\\* {\ttfamily \#include \char`\"{}util/configfile.\-hpp\char`\"{}}\\* \subsection*{Namespaces} \begin{DoxyCompactItemize} \item namespace \hyperlink{namespacegraphchi}{graphchi} \end{DoxyCompactItemize} \subsection*{Macros} \begin{DoxyCompactItemize} \item \#define \hyperlink{cmdopts_8hpp_a374bd2d6076b95bff33ea625a1e25e09}{V\-A\-R\-I\-A\-B\-L\-E\-\_\-\-I\-S\-\_\-\-N\-O\-T\-\_\-\-U\-S\-E\-D} \end{DoxyCompactItemize} \subsection{Detailed Description} \begin{DoxyAuthor}{Author} Aapo Kyrola \href{mailto:akyrola@cs.cmu.edu}{\tt akyrola@cs.\-cmu.\-edu} \end{DoxyAuthor} \begin{DoxyVersion}{Version} 1.\-0 \end{DoxyVersion} \hypertarget{toplist_8hpp_LICENSE}{}\subsection{L\-I\-C\-E\-N\-S\-E}\label{toplist_8hpp_LICENSE} Copyright \mbox{[}2012\mbox{]} \mbox{[}Aapo Kyrola, Guy Blelloch, Carlos Guestrin / Carnegie Mellon University\mbox{]} Licensed under the Apache License, Version 2.\-0 (the \char`\"{}\-License\char`\"{}); you may not use this file except in compliance with the License. You may obtain a copy of the License at \href{http://www.apache.org/licenses/LICENSE-2.0}{\tt http\-://www.\-apache.\-org/licenses/\-L\-I\-C\-E\-N\-S\-E-\/2.\-0} Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \char`\"{}\-A\-S I\-S\char`\"{} B\-A\-S\-I\-S, W\-I\-T\-H\-O\-U\-T W\-A\-R\-R\-A\-N\-T\-I\-E\-S O\-R C\-O\-N\-D\-I\-T\-I\-O\-N\-S O\-F A\-N\-Y K\-I\-N\-D, either express or implied. See the License for the specific language governing permissions and limitations under the License.\hypertarget{toplist_8hpp_DESCRIPTION}{}\subsection{D\-E\-S\-C\-R\-I\-P\-T\-I\-O\-N}\label{toplist_8hpp_DESCRIPTION} Command line options. \subsection{Macro Definition Documentation} \hypertarget{cmdopts_8hpp_a374bd2d6076b95bff33ea625a1e25e09}{\index{cmdopts.\-hpp@{cmdopts.\-hpp}!V\-A\-R\-I\-A\-B\-L\-E\-\_\-\-I\-S\-\_\-\-N\-O\-T\-\_\-\-U\-S\-E\-D@{V\-A\-R\-I\-A\-B\-L\-E\-\_\-\-I\-S\-\_\-\-N\-O\-T\-\_\-\-U\-S\-E\-D}} \index{V\-A\-R\-I\-A\-B\-L\-E\-\_\-\-I\-S\-\_\-\-N\-O\-T\-\_\-\-U\-S\-E\-D@{V\-A\-R\-I\-A\-B\-L\-E\-\_\-\-I\-S\-\_\-\-N\-O\-T\-\_\-\-U\-S\-E\-D}!cmdopts.hpp@{cmdopts.\-hpp}} \subsubsection[{V\-A\-R\-I\-A\-B\-L\-E\-\_\-\-I\-S\-\_\-\-N\-O\-T\-\_\-\-U\-S\-E\-D}]{\setlength{\rightskip}{0pt plus 5cm}\#define V\-A\-R\-I\-A\-B\-L\-E\-\_\-\-I\-S\-\_\-\-N\-O\-T\-\_\-\-U\-S\-E\-D}}\label{cmdopts_8hpp_a374bd2d6076b95bff33ea625a1e25e09} G\-N\-U C\-O\-M\-P\-I\-L\-E\-R H\-A\-C\-K T\-O P\-R\-E\-V\-E\-N\-T I\-T F\-O\-R C\-O\-M\-P\-I\-L\-I\-N\-G M\-E\-T\-H\-O\-D\-S W\-H\-I\-C\-H A\-R\-E N\-O\-T U\-S\-E\-D I\-N T\-H\-E P\-A\-R\-T\-I\-C\-U\-L\-A\-R A\-P\-P B\-E\-I\-N\-G B\-U\-I\-L\-T
09jijiangwen-download
docs/latex/cmdopts_8hpp.tex
TeX
asf20
2,949
\hypertarget{class_mongoose}{\section{Mongoose Class Reference} \label{class_mongoose}\index{Mongoose@{Mongoose}} } \subsection*{Public Member Functions} \begin{DoxyCompactItemize} \item \hypertarget{class_mongoose_a6faf5142a83799767b1b047c72cf166d}{int {\bfseries set\-\_\-option} (string option\-\_\-name, string option\-\_\-value)}\label{class_mongoose_a6faf5142a83799767b1b047c72cf166d} \item \hypertarget{class_mongoose_a5575e630535f24c1a51fdd3575517b68}{string {\bfseries get\-\_\-option} (string option\-\_\-name)}\label{class_mongoose_a5575e630535f24c1a51fdd3575517b68} \item \hypertarget{class_mongoose_a5eee2d793dcdad22d0d5ebdf2230db3a}{void {\bfseries set\-\_\-uri\-\_\-callback} (string uri\-\_\-regex, Mongoose\-Callback func)}\label{class_mongoose_a5eee2d793dcdad22d0d5ebdf2230db3a} \item \hypertarget{class_mongoose_ac5e4299b43815dd43d6e9c0d97a05275}{void {\bfseries set\-\_\-log\-\_\-callback} (Mongoose\-Callback func)}\label{class_mongoose_ac5e4299b43815dd43d6e9c0d97a05275} \end{DoxyCompactItemize} \subsection*{Public Attributes} \begin{DoxyCompactItemize} \item \hypertarget{class_mongoose_a344dc767f800d7cea222e5f21b1470fe}{string {\bfseries version}}\label{class_mongoose_a344dc767f800d7cea222e5f21b1470fe} \end{DoxyCompactItemize} The documentation for this class was generated from the following file\-:\begin{DoxyCompactItemize} \item src/external/vpiotr-\/mongoose-\/cpp/bindings/csharp/mongoose.\-cs\end{DoxyCompactItemize}
09jijiangwen-download
docs/latex/class_mongoose.tex
TeX
asf20
1,465
\hypertarget{imetrics__reporter_8hpp}{\section{src/metrics/imetrics\-\_\-reporter.hpp File Reference} \label{imetrics__reporter_8hpp}\index{src/metrics/imetrics\-\_\-reporter.\-hpp@{src/metrics/imetrics\-\_\-reporter.\-hpp}} } {\ttfamily \#include $<$map$>$}\\* \subsection*{Classes} \begin{DoxyCompactItemize} \item class \hyperlink{classgraphchi_1_1imetrics__reporter}{graphchi\-::imetrics\-\_\-reporter} \end{DoxyCompactItemize} \subsection*{Namespaces} \begin{DoxyCompactItemize} \item namespace \hyperlink{namespacegraphchi}{graphchi} \end{DoxyCompactItemize} \subsection{Detailed Description} \begin{DoxyAuthor}{Author} Aapo Kyrola \href{mailto:akyrola@cs.cmu.edu}{\tt akyrola@cs.\-cmu.\-edu} \end{DoxyAuthor} \begin{DoxyVersion}{Version} 1.\-0 \end{DoxyVersion} \hypertarget{toplist_8hpp_LICENSE}{}\subsection{L\-I\-C\-E\-N\-S\-E}\label{toplist_8hpp_LICENSE} Copyright \mbox{[}2012\mbox{]} \mbox{[}Aapo Kyrola, Guy Blelloch, Carlos Guestrin / Carnegie Mellon University\mbox{]} Licensed under the Apache License, Version 2.\-0 (the \char`\"{}\-License\char`\"{}); you may not use this file except in compliance with the License. You may obtain a copy of the License at \href{http://www.apache.org/licenses/LICENSE-2.0}{\tt http\-://www.\-apache.\-org/licenses/\-L\-I\-C\-E\-N\-S\-E-\/2.\-0} Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \char`\"{}\-A\-S I\-S\char`\"{} B\-A\-S\-I\-S, W\-I\-T\-H\-O\-U\-T W\-A\-R\-R\-A\-N\-T\-I\-E\-S O\-R C\-O\-N\-D\-I\-T\-I\-O\-N\-S O\-F A\-N\-Y K\-I\-N\-D, either express or implied. See the License for the specific language governing permissions and limitations under the License.\hypertarget{toplist_8hpp_DESCRIPTION}{}\subsection{D\-E\-S\-C\-R\-I\-P\-T\-I\-O\-N}\label{toplist_8hpp_DESCRIPTION} Interface for metrics reporters.
09jijiangwen-download
docs/latex/imetrics__reporter_8hpp.tex
TeX
asf20
1,855
\hypertarget{structcgi__env__block}{\section{cgi\-\_\-env\-\_\-block Struct Reference} \label{structcgi__env__block}\index{cgi\-\_\-env\-\_\-block@{cgi\-\_\-env\-\_\-block}} } \subsection*{Public Attributes} \begin{DoxyCompactItemize} \item \hypertarget{structcgi__env__block_a690d939b7e443d589d89803b36a1a20d}{struct \hyperlink{structmg__connection}{mg\-\_\-connection} $\ast$ {\bfseries conn}}\label{structcgi__env__block_a690d939b7e443d589d89803b36a1a20d} \item \hypertarget{structcgi__env__block_acde439ca8be77fbb1061e760e3688d8d}{char {\bfseries buf} \mbox{[}C\-G\-I\-\_\-\-E\-N\-V\-I\-R\-O\-N\-M\-E\-N\-T\-\_\-\-S\-I\-Z\-E\mbox{]}}\label{structcgi__env__block_acde439ca8be77fbb1061e760e3688d8d} \item \hypertarget{structcgi__env__block_a6455757faba75fde382e24e5bea25cb5}{int {\bfseries len}}\label{structcgi__env__block_a6455757faba75fde382e24e5bea25cb5} \item \hypertarget{structcgi__env__block_a292f1d13d56cd7872284da7221bbd8bb}{char $\ast$ {\bfseries vars} \mbox{[}M\-A\-X\-\_\-\-C\-G\-I\-\_\-\-E\-N\-V\-I\-R\-\_\-\-V\-A\-R\-S\mbox{]}}\label{structcgi__env__block_a292f1d13d56cd7872284da7221bbd8bb} \item \hypertarget{structcgi__env__block_ab409c99d6f905fe2e467aba8aa081fc4}{int {\bfseries nvars}}\label{structcgi__env__block_ab409c99d6f905fe2e467aba8aa081fc4} \end{DoxyCompactItemize} The documentation for this struct was generated from the following file\-:\begin{DoxyCompactItemize} \item src/external/vpiotr-\/mongoose-\/cpp/mongoose.\-c\end{DoxyCompactItemize}
09jijiangwen-download
docs/latex/structcgi__env__block.tex
TeX
asf20
1,489
\hypertarget{classfile__logger}{\section{file\-\_\-logger Class Reference} \label{classfile__logger}\index{file\-\_\-logger@{file\-\_\-logger}} } {\ttfamily \#include $<$logger.\-hpp$>$} \subsection*{Public Member Functions} \begin{DoxyCompactItemize} \item void \hyperlink{classfile__logger_afd49e36dd0cb905b9c8de05ec38eec5b}{set\-\_\-log\-\_\-to\-\_\-console} (bool consolelog) \begin{DoxyCompactList}\small\item\em If consolelog is true, subsequent logger output will be written to stderr. \end{DoxyCompactList}\item \hypertarget{classfile__logger_ab1ac2156591d7b04d2d1bfbaf3eb4a69}{std\-::string \hyperlink{classfile__logger_ab1ac2156591d7b04d2d1bfbaf3eb4a69}{get\-\_\-log\-\_\-file} (void)}\label{classfile__logger_ab1ac2156591d7b04d2d1bfbaf3eb4a69} \begin{DoxyCompactList}\small\item\em Returns the current logger file. \end{DoxyCompactList}\item \hypertarget{classfile__logger_acded5e9c6a2b21dfec2c889a9d0e5efd}{bool \hyperlink{classfile__logger_acded5e9c6a2b21dfec2c889a9d0e5efd}{get\-\_\-log\-\_\-to\-\_\-console} ()}\label{classfile__logger_acded5e9c6a2b21dfec2c889a9d0e5efd} \begin{DoxyCompactList}\small\item\em Returns true if output is being written to stderr. \end{DoxyCompactList}\item \hypertarget{classfile__logger_a7e8dbb4fe48aa0983271e50e00406a2e}{int \hyperlink{classfile__logger_a7e8dbb4fe48aa0983271e50e00406a2e}{get\-\_\-log\-\_\-level} ()}\label{classfile__logger_a7e8dbb4fe48aa0983271e50e00406a2e} \begin{DoxyCompactList}\small\item\em Returns the current logger level. \end{DoxyCompactList}\item \hypertarget{classfile__logger_a1af6d913dc8fa9bcad436909c1067414}{{\footnotesize template$<$typename T $>$ }\\\hyperlink{classfile__logger}{file\-\_\-logger} \& {\bfseries operator$<$$<$} (T a)}\label{classfile__logger_a1af6d913dc8fa9bcad436909c1067414} \item \hypertarget{classfile__logger_a74af3648c42696b41fcc1f62d6bba3fa}{\hyperlink{classfile__logger}{file\-\_\-logger} \& {\bfseries operator$<$$<$} (const char $\ast$a)}\label{classfile__logger_a74af3648c42696b41fcc1f62d6bba3fa} \item \hypertarget{classfile__logger_ad3753bbbe5e96733b7cf552442337ecc}{\hyperlink{classfile__logger}{file\-\_\-logger} \& {\bfseries operator$<$$<$} (std\-::ostream \&($\ast$f)(std\-::ostream \&))}\label{classfile__logger_ad3753bbbe5e96733b7cf552442337ecc} \item void \hyperlink{classfile__logger_a21330e11d0d392e86d8d928e9408a4f1}{set\-\_\-log\-\_\-level} (int new\-\_\-log\-\_\-level) \item \hyperlink{classfile__logger_a97b486960a56b3ca3bc657cfa9645cc9}{file\-\_\-logger} () \item \hypertarget{classfile__logger_abe325ad2b332c007e73053f111ff001b}{bool {\bfseries set\-\_\-log\-\_\-file} (std\-::string file)}\label{classfile__logger_abe325ad2b332c007e73053f111ff001b} \item \hypertarget{classfile__logger_a6856b30bc36281bac53a3fef8b9baccc}{void {\bfseries textcolor} (F\-I\-L\-E $\ast$handle, int attr, int fg)}\label{classfile__logger_a6856b30bc36281bac53a3fef8b9baccc} \item \hypertarget{classfile__logger_a8af1687ded9a0c178be3ec9b88d59e48}{void {\bfseries reset\-\_\-color} (F\-I\-L\-E $\ast$handle)}\label{classfile__logger_a8af1687ded9a0c178be3ec9b88d59e48} \item \hypertarget{classfile__logger_a7de028f6b436a6bc0ae84df2d6aa9de7}{void {\bfseries \-\_\-log} (int lineloglevel, const char $\ast$file, const char $\ast$function, int line, const char $\ast$fmt, va\-\_\-list ap)}\label{classfile__logger_a7de028f6b436a6bc0ae84df2d6aa9de7} \item \hypertarget{classfile__logger_ae811969922f3ba1010309bcea33e6866}{void {\bfseries \-\_\-logbuf} (int lineloglevel, const char $\ast$file, const char $\ast$function, int line, const char $\ast$buf, int len)}\label{classfile__logger_ae811969922f3ba1010309bcea33e6866} \item \hypertarget{classfile__logger_ae6b57d652cdaf6c137533e5bac57b835}{void {\bfseries \-\_\-lograw} (int lineloglevel, const char $\ast$buf, int len)}\label{classfile__logger_ae6b57d652cdaf6c137533e5bac57b835} \item \hypertarget{classfile__logger_a4c6deb7527f95f1786f2c4f4501a49b7}{\hyperlink{classfile__logger}{file\-\_\-logger} \& {\bfseries start\-\_\-stream} (int lineloglevel, const char $\ast$file, const char $\ast$function, int line)}\label{classfile__logger_a4c6deb7527f95f1786f2c4f4501a49b7} \item \hypertarget{classfile__logger_a5f8d88ab1aa1db76958edf175edc7c06}{void {\bfseries stream\-\_\-flush} ()}\label{classfile__logger_a5f8d88ab1aa1db76958edf175edc7c06} \end{DoxyCompactItemize} \subsection*{Static Public Member Functions} \begin{DoxyCompactItemize} \item \hypertarget{classfile__logger_a974b6ccd8179876cbe05fec8e0df0bb8}{static void {\bfseries streambuffdestructor} (void $\ast$v)}\label{classfile__logger_a974b6ccd8179876cbe05fec8e0df0bb8} \end{DoxyCompactItemize} \subsection{Detailed Description} logging class. This writes to a file, and/or the system console. \subsection{Constructor \& Destructor Documentation} \hypertarget{classfile__logger_a97b486960a56b3ca3bc657cfa9645cc9}{\index{file\-\_\-logger@{file\-\_\-logger}!file\-\_\-logger@{file\-\_\-logger}} \index{file\-\_\-logger@{file\-\_\-logger}!file_logger@{file\-\_\-logger}} \subsubsection[{file\-\_\-logger}]{\setlength{\rightskip}{0pt plus 5cm}file\-\_\-logger\-::file\-\_\-logger ( \begin{DoxyParamCaption} {} \end{DoxyParamCaption} )\hspace{0.3cm}{\ttfamily [inline]}}}\label{classfile__logger_a97b486960a56b3ca3bc657cfa9645cc9} Default constructor. By default, log\-\_\-to\-\_\-console is off, there is no logger file, and logger level is set to L\-O\-G\-\_\-\-W\-A\-R\-N\-I\-N\-G \subsection{Member Function Documentation} \hypertarget{classfile__logger_a21330e11d0d392e86d8d928e9408a4f1}{\index{file\-\_\-logger@{file\-\_\-logger}!set\-\_\-log\-\_\-level@{set\-\_\-log\-\_\-level}} \index{set\-\_\-log\-\_\-level@{set\-\_\-log\-\_\-level}!file_logger@{file\-\_\-logger}} \subsubsection[{set\-\_\-log\-\_\-level}]{\setlength{\rightskip}{0pt plus 5cm}void file\-\_\-logger\-::set\-\_\-log\-\_\-level ( \begin{DoxyParamCaption} \item[{int}]{new\-\_\-log\-\_\-level} \end{DoxyParamCaption} )\hspace{0.3cm}{\ttfamily [inline]}}}\label{classfile__logger_a21330e11d0d392e86d8d928e9408a4f1} Sets the current logger level. All logging commands below the current logger level will not be written. \hypertarget{classfile__logger_afd49e36dd0cb905b9c8de05ec38eec5b}{\index{file\-\_\-logger@{file\-\_\-logger}!set\-\_\-log\-\_\-to\-\_\-console@{set\-\_\-log\-\_\-to\-\_\-console}} \index{set\-\_\-log\-\_\-to\-\_\-console@{set\-\_\-log\-\_\-to\-\_\-console}!file_logger@{file\-\_\-logger}} \subsubsection[{set\-\_\-log\-\_\-to\-\_\-console}]{\setlength{\rightskip}{0pt plus 5cm}void file\-\_\-logger\-::set\-\_\-log\-\_\-to\-\_\-console ( \begin{DoxyParamCaption} \item[{bool}]{consolelog} \end{DoxyParamCaption} )\hspace{0.3cm}{\ttfamily [inline]}}}\label{classfile__logger_afd49e36dd0cb905b9c8de05ec38eec5b} If consolelog is true, subsequent logger output will be written to stderr. Closes the current logger file if one exists. if 'file' is not an empty string, it will be opened and all subsequent logger output will be written into 'file'. Any existing content of 'file' will be cleared. Return true on success and false on failure. The documentation for this class was generated from the following file\-:\begin{DoxyCompactItemize} \item src/logger/\hyperlink{logger_8hpp}{logger.\-hpp}\end{DoxyCompactItemize}
09jijiangwen-download
docs/latex/classfile__logger.tex
TeX
asf20
7,269
\hypertarget{bulksync__functional__test_8cpp}{\section{src/tests/bulksync\-\_\-functional\-\_\-test.cpp File Reference} \label{bulksync__functional__test_8cpp}\index{src/tests/bulksync\-\_\-functional\-\_\-test.\-cpp@{src/tests/bulksync\-\_\-functional\-\_\-test.\-cpp}} } {\ttfamily \#include $<$string$>$}\\* {\ttfamily \#include $<$fstream$>$}\\* {\ttfamily \#include $<$cmath$>$}\\* {\ttfamily \#include \char`\"{}util/cmdopts.\-hpp\char`\"{}}\\* {\ttfamily \#include \char`\"{}api/graphchi\-\_\-context.\-hpp\char`\"{}}\\* {\ttfamily \#include \char`\"{}api/graph\-\_\-objects.\-hpp\char`\"{}}\\* {\ttfamily \#include \char`\"{}api/ischeduler.\-hpp\char`\"{}}\\* {\ttfamily \#include \char`\"{}api/functional/functional\-\_\-api.\-hpp\char`\"{}}\\* {\ttfamily \#include \char`\"{}metrics/metrics.\-hpp\char`\"{}}\\* {\ttfamily \#include \char`\"{}metrics/reps/basic\-\_\-reporter.\-hpp\char`\"{}}\\* {\ttfamily \#include \char`\"{}util/toplist.\-hpp\char`\"{}}\\* \subsection*{Classes} \begin{DoxyCompactItemize} \item struct \hyperlink{structsmoketest__program}{smoketest\-\_\-program} \end{DoxyCompactItemize} \subsection*{Macros} \begin{DoxyCompactItemize} \item \hypertarget{bulksync__functional__test_8cpp_a5e3939b7192acef3f437bb0edc1c63df}{\#define {\bfseries R\-A\-N\-D\-O\-M\-R\-E\-S\-E\-T\-P\-R\-O\-B}~0.\-15}\label{bulksync__functional__test_8cpp_a5e3939b7192acef3f437bb0edc1c63df} \end{DoxyCompactItemize} \subsection*{Functions} \begin{DoxyCompactItemize} \item \hypertarget{bulksync__functional__test_8cpp_a217dbf8b442f20279ea00b898af96f52}{int {\bfseries main} (int argc, const char $\ast$$\ast$argv)}\label{bulksync__functional__test_8cpp_a217dbf8b442f20279ea00b898af96f52} \end{DoxyCompactItemize} \subsection{Detailed Description} \begin{DoxyAuthor}{Author} Aapo Kyrola \href{mailto:akyrola@cs.cmu.edu}{\tt akyrola@cs.\-cmu.\-edu} \end{DoxyAuthor} \begin{DoxyVersion}{Version} 1.\-0 \end{DoxyVersion} \hypertarget{toplist_8hpp_LICENSE}{}\subsection{L\-I\-C\-E\-N\-S\-E}\label{toplist_8hpp_LICENSE} Copyright \mbox{[}2012\mbox{]} \mbox{[}Aapo Kyrola, Guy Blelloch, Carlos Guestrin / Carnegie Mellon University\mbox{]} Licensed under the Apache License, Version 2.\-0 (the \char`\"{}\-License\char`\"{}); you may not use this file except in compliance with the License. You may obtain a copy of the License at \href{http://www.apache.org/licenses/LICENSE-2.0}{\tt http\-://www.\-apache.\-org/licenses/\-L\-I\-C\-E\-N\-S\-E-\/2.\-0} Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \char`\"{}\-A\-S I\-S\char`\"{} B\-A\-S\-I\-S, W\-I\-T\-H\-O\-U\-T W\-A\-R\-R\-A\-N\-T\-I\-E\-S O\-R C\-O\-N\-D\-I\-T\-I\-O\-N\-S O\-F A\-N\-Y K\-I\-N\-D, either express or implied. See the License for the specific language governing permissions and limitations under the License.\hypertarget{toplist_8hpp_DESCRIPTION}{}\subsection{D\-E\-S\-C\-R\-I\-P\-T\-I\-O\-N}\label{toplist_8hpp_DESCRIPTION} Simple smoke test for the bulk synchronous functional api.
09jijiangwen-download
docs/latex/bulksync__functional__test_8cpp.tex
TeX
asf20
3,038
%!PS-Adobe-2.0 EPSF-2.0 %%Title: ClassName %%Creator: Doxygen %%CreationDate: Time %%For: %Magnification: 1.00 %%Orientation: Portrait %%BoundingBox: 0 0 500 51.948052 %%Pages: 0 %%BeginSetup %%EndSetup %%EndComments % ----- variables ----- /boxwidth 0 def /boxheight 40 def /fontheight 24 def /marginwidth 10 def /distx 20 def /disty 40 def /boundaspect 9.625000 def % aspect ratio of the BoundingBox (width/height) /boundx 500 def /boundy boundx boundaspect div def /xspacing 0 def /yspacing 0 def /rows 2 def /cols 2 def /scalefactor 0 def /boxfont /Times-Roman findfont fontheight scalefont def % ----- procedures ----- /dotted { [1 4] 0 setdash } def /dashed { [5] 0 setdash } def /solid { [] 0 setdash } def /max % result = MAX(arg1,arg2) { /a exch def /b exch def a b gt {a} {b} ifelse } def /xoffset % result = MAX(0,(scalefactor-(boxwidth*cols+distx*(cols-1)))/2) { 0 scalefactor boxwidth cols mul distx cols 1 sub mul add sub 2 div max } def /cw % boxwidth = MAX(boxwidth, stringwidth(arg1)) { /str exch def /boxwidth boxwidth str stringwidth pop max def } def /box % draws a box with text `arg1' at grid pos (arg2,arg3) { gsave 2 setlinewidth newpath exch xspacing mul xoffset add exch yspacing mul moveto boxwidth 0 rlineto 0 boxheight rlineto boxwidth neg 0 rlineto 0 boxheight neg rlineto closepath dup stringwidth pop neg boxwidth add 2 div boxheight fontheight 2 div sub 2 div rmoveto show stroke grestore } def /mark { newpath exch xspacing mul xoffset add boxwidth add exch yspacing mul moveto 0 boxheight 4 div rlineto boxheight neg 4 div boxheight neg 4 div rlineto closepath eofill stroke } def /arrow { newpath moveto 3 -8 rlineto -6 0 rlineto 3 8 rlineto closepath eofill stroke } def /out % draws an output connector for the block at (arg1,arg2) { newpath exch xspacing mul xoffset add boxwidth 2 div add exch yspacing mul boxheight add /y exch def /x exch def x y moveto 0 disty 2 div rlineto stroke 1 eq { x y disty 2 div add arrow } if } def /in % draws an input connector for the block at (arg1,arg2) { newpath exch xspacing mul xoffset add boxwidth 2 div add exch yspacing mul disty 2 div sub /y exch def /x exch def x y moveto 0 disty 2 div rlineto stroke 1 eq { x y disty 2 div add arrow } if } def /hedge { exch xspacing mul xoffset add boxwidth 2 div add exch yspacing mul boxheight 2 div sub /y exch def /x exch def newpath x y moveto boxwidth 2 div distx add 0 rlineto stroke 1 eq { newpath x boxwidth 2 div distx add add y moveto -8 3 rlineto 0 -6 rlineto 8 3 rlineto closepath eofill stroke } if } def /vedge { /ye exch def /ys exch def /xs exch def newpath xs xspacing mul xoffset add boxwidth 2 div add dup ys yspacing mul boxheight 2 div sub moveto ye yspacing mul boxheight 2 div sub lineto stroke } def /conn % connections the blocks from col `arg1' to `arg2' of row `arg3' { /ys exch def /xe exch def /xs exch def newpath xs xspacing mul xoffset add boxwidth 2 div add ys yspacing mul disty 2 div sub moveto xspacing xe xs sub mul 0 rlineto stroke } def % ----- main ------ boxfont setfont 1 boundaspect scale (PagerankProgram) cw (graphchi::GraphChiProgram< VertexDataType, EdgeDataType >) cw (graphchi::GraphChiProgram< VertexDataType, EdgeDataType >) cw /boxwidth boxwidth marginwidth 2 mul add def /xspacing boxwidth distx add def /yspacing boxheight disty add def /scalefactor boxwidth cols mul distx cols 1 sub mul add boxheight rows mul disty rows 1 sub mul add boundaspect mul max def boundx scalefactor div boundy scalefactor div scale % ----- classes ----- (PagerankProgram) 0.500000 0.000000 box (graphchi::GraphChiProgram< VertexDataType, EdgeDataType >) 0.000000 1.000000 box (graphchi::GraphChiProgram< VertexDataType, EdgeDataType >) 1.000000 1.000000 box % ----- relations ----- solid 0 0.500000 0.000000 out solid 0.000000 1.000000 1.000000 conn solid 1 0.000000 1.000000 in solid 1 1.000000 1.000000 in
09jijiangwen-download
docs/latex/struct_pagerank_program.eps
PostScript
asf20
4,098
\hypertarget{structmessage}{\section{message Struct Reference} \label{structmessage}\index{message@{message}} } \subsection*{Public Attributes} \begin{DoxyCompactItemize} \item \hypertarget{structmessage_aea7f9eaa974b509a72f684651ce34bfd}{long {\bfseries id}}\label{structmessage_aea7f9eaa974b509a72f684651ce34bfd} \item \hypertarget{structmessage_a0d304d226d75ce87d92677eb78bb61f2}{char {\bfseries user} \mbox{[}M\-A\-X\-\_\-\-U\-S\-E\-R\-\_\-\-L\-E\-N\mbox{]}}\label{structmessage_a0d304d226d75ce87d92677eb78bb61f2} \item \hypertarget{structmessage_af8e3a96ce056ca1f2118c7407a0f420a}{char {\bfseries text} \mbox{[}M\-A\-X\-\_\-\-M\-E\-S\-S\-A\-G\-E\-\_\-\-L\-E\-N\mbox{]}}\label{structmessage_af8e3a96ce056ca1f2118c7407a0f420a} \item \hypertarget{structmessage_aa05cfe1f12c674a64792b5be8c2b9124}{time\-\_\-t {\bfseries timestamp}}\label{structmessage_aa05cfe1f12c674a64792b5be8c2b9124} \end{DoxyCompactItemize} The documentation for this struct was generated from the following file\-:\begin{DoxyCompactItemize} \item src/external/vpiotr-\/mongoose-\/cpp/examples/chat.\-c\end{DoxyCompactItemize}
09jijiangwen-download
docs/latex/structmessage.tex
TeX
asf20
1,110
\hypertarget{metrics_8hpp}{\section{src/metrics/metrics.hpp File Reference} \label{metrics_8hpp}\index{src/metrics/metrics.\-hpp@{src/metrics/metrics.\-hpp}} } {\ttfamily \#include $<$cstring$>$}\\* {\ttfamily \#include $<$map$>$}\\* {\ttfamily \#include $<$vector$>$}\\* {\ttfamily \#include $<$limits$>$}\\* {\ttfamily \#include $<$assert.\-h$>$}\\* {\ttfamily \#include $<$sys/time.\-h$>$}\\* {\ttfamily \#include \char`\"{}util/pthread\-\_\-tools.\-hpp\char`\"{}}\\* {\ttfamily \#include \char`\"{}util/cmdopts.\-hpp\char`\"{}}\\* \subsection*{Classes} \begin{DoxyCompactItemize} \item struct \hyperlink{structgraphchi_1_1metrics__entry}{graphchi\-::metrics\-\_\-entry} \item class \hyperlink{classgraphchi_1_1imetrics__reporter}{graphchi\-::imetrics\-\_\-reporter} \item class \hyperlink{classgraphchi_1_1metrics}{graphchi\-::metrics} \end{DoxyCompactItemize} \subsection*{Namespaces} \begin{DoxyCompactItemize} \item namespace \hyperlink{namespacegraphchi}{graphchi} \end{DoxyCompactItemize} \subsection*{Enumerations} \begin{DoxyCompactItemize} \item enum {\bfseries metrictype} \{ \\* {\bfseries R\-E\-A\-L}, {\bfseries I\-N\-T\-E\-G\-E\-R}, {\bfseries T\-I\-M\-E}, {\bfseries S\-T\-R\-I\-N\-G}, \\* {\bfseries V\-E\-C\-T\-O\-R} \} \end{DoxyCompactItemize} \subsection{Detailed Description} \begin{DoxyAuthor}{Author} Aapo Kyrola \href{mailto:akyrola@cs.cmu.edu}{\tt akyrola@cs.\-cmu.\-edu} \end{DoxyAuthor} \begin{DoxyVersion}{Version} 1.\-0 \end{DoxyVersion} \hypertarget{toplist_8hpp_LICENSE}{}\subsection{L\-I\-C\-E\-N\-S\-E}\label{toplist_8hpp_LICENSE} Copyright \mbox{[}2012\mbox{]} \mbox{[}Aapo Kyrola, Guy Blelloch, Carlos Guestrin / Carnegie Mellon University\mbox{]} Licensed under the Apache License, Version 2.\-0 (the \char`\"{}\-License\char`\"{}); you may not use this file except in compliance with the License. You may obtain a copy of the License at \href{http://www.apache.org/licenses/LICENSE-2.0}{\tt http\-://www.\-apache.\-org/licenses/\-L\-I\-C\-E\-N\-S\-E-\/2.\-0} Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \char`\"{}\-A\-S I\-S\char`\"{} B\-A\-S\-I\-S, W\-I\-T\-H\-O\-U\-T W\-A\-R\-R\-A\-N\-T\-I\-E\-S O\-R C\-O\-N\-D\-I\-T\-I\-O\-N\-S O\-F A\-N\-Y K\-I\-N\-D, either express or implied. See the License for the specific language governing permissions and limitations under the License.\hypertarget{toplist_8hpp_DESCRIPTION}{}\subsection{D\-E\-S\-C\-R\-I\-P\-T\-I\-O\-N}\label{toplist_8hpp_DESCRIPTION} Metrics.
09jijiangwen-download
docs/latex/metrics_8hpp.tex
TeX
asf20
2,539
\hypertarget{struct_mongoose_header}{\section{Mongoose\-Header Struct Reference} \label{struct_mongoose_header}\index{Mongoose\-Header@{Mongoose\-Header}} } \subsection*{Public Attributes} \begin{DoxyCompactItemize} \item \hypertarget{struct_mongoose_header_aaa35c6b64831a00b678cb7bd0f51ca35}{Int\-Ptr {\bfseries name}}\label{struct_mongoose_header_aaa35c6b64831a00b678cb7bd0f51ca35} \item \hypertarget{struct_mongoose_header_afa27ccc144e348253360db22d473ba0e}{Int\-Ptr {\bfseries value}}\label{struct_mongoose_header_afa27ccc144e348253360db22d473ba0e} \end{DoxyCompactItemize} The documentation for this struct was generated from the following file\-:\begin{DoxyCompactItemize} \item src/external/vpiotr-\/mongoose-\/cpp/bindings/csharp/mongoose.\-cs\end{DoxyCompactItemize}
09jijiangwen-download
docs/latex/struct_mongoose_header.tex
TeX
asf20
783
\hypertarget{struct_community_detection_program}{\section{Community\-Detection\-Program Struct Reference} \label{struct_community_detection_program}\index{Community\-Detection\-Program@{Community\-Detection\-Program}} } Inheritance diagram for Community\-Detection\-Program\-:\begin{figure}[H] \begin{center} \leavevmode \includegraphics[height=2.000000cm]{struct_community_detection_program} \end{center} \end{figure} \subsection*{Public Member Functions} \begin{DoxyCompactItemize} \item void \hyperlink{struct_community_detection_program_aa371bbe8d4e79cb7cc512d9f77e9496c}{update} (\hyperlink{classgraphchi_1_1graphchi__vertex}{graphchi\-\_\-vertex}$<$ Vertex\-Data\-Type, Edge\-Data\-Type $>$ \&vertex, \hyperlink{structgraphchi_1_1graphchi__context}{graphchi\-\_\-context} \&gcontext) \item void \hyperlink{struct_community_detection_program_a3dde791f5dec796cd9c6e0a61da114cc}{before\-\_\-iteration} (int iteration, \hyperlink{structgraphchi_1_1graphchi__context}{graphchi\-\_\-context} \&info) \item void \hyperlink{struct_community_detection_program_ad7a1b4c6b9dcb29a2b4286d123044c2e}{after\-\_\-iteration} (int iteration, \hyperlink{structgraphchi_1_1graphchi__context}{graphchi\-\_\-context} \&ginfo) \item void \hyperlink{struct_community_detection_program_aa8a15b9afd3731712ac3e01a9491d7c1}{before\-\_\-exec\-\_\-interval} (vid\-\_\-t window\-\_\-st, vid\-\_\-t window\-\_\-en, \hyperlink{structgraphchi_1_1graphchi__context}{graphchi\-\_\-context} \&ginfo) \item void \hyperlink{struct_community_detection_program_a76118f786af150806ed45fb4cb1b18e3}{after\-\_\-exec\-\_\-interval} (vid\-\_\-t window\-\_\-st, vid\-\_\-t window\-\_\-en, \hyperlink{structgraphchi_1_1graphchi__context}{graphchi\-\_\-context} \&ginfo) \end{DoxyCompactItemize} \subsection*{Additional Inherited Members} \subsection{Detailed Description} Graph\-Chi programs need to subclass Graph\-Chi\-Program$<$vertex-\/type, edge-\/type$>$ class. The main logic is usually in the update function. \subsection{Member Function Documentation} \hypertarget{struct_community_detection_program_a76118f786af150806ed45fb4cb1b18e3}{\index{Community\-Detection\-Program@{Community\-Detection\-Program}!after\-\_\-exec\-\_\-interval@{after\-\_\-exec\-\_\-interval}} \index{after\-\_\-exec\-\_\-interval@{after\-\_\-exec\-\_\-interval}!CommunityDetectionProgram@{Community\-Detection\-Program}} \subsubsection[{after\-\_\-exec\-\_\-interval}]{\setlength{\rightskip}{0pt plus 5cm}void Community\-Detection\-Program\-::after\-\_\-exec\-\_\-interval ( \begin{DoxyParamCaption} \item[{vid\-\_\-t}]{window\-\_\-st, } \item[{vid\-\_\-t}]{window\-\_\-en, } \item[{{\bf graphchi\-\_\-context} \&}]{ginfo} \end{DoxyParamCaption} )\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}}\label{struct_community_detection_program_a76118f786af150806ed45fb4cb1b18e3} Called after an execution interval has finished. Reimplemented from \hyperlink{classgraphchi_1_1_graph_chi_program_a9be881d1232e530c8d1852188cc8a84d}{graphchi\-::\-Graph\-Chi\-Program$<$ Vertex\-Data\-Type, Edge\-Data\-Type $>$}. \hypertarget{struct_community_detection_program_ad7a1b4c6b9dcb29a2b4286d123044c2e}{\index{Community\-Detection\-Program@{Community\-Detection\-Program}!after\-\_\-iteration@{after\-\_\-iteration}} \index{after\-\_\-iteration@{after\-\_\-iteration}!CommunityDetectionProgram@{Community\-Detection\-Program}} \subsubsection[{after\-\_\-iteration}]{\setlength{\rightskip}{0pt plus 5cm}void Community\-Detection\-Program\-::after\-\_\-iteration ( \begin{DoxyParamCaption} \item[{int}]{iteration, } \item[{{\bf graphchi\-\_\-context} \&}]{ginfo} \end{DoxyParamCaption} )\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}}\label{struct_community_detection_program_ad7a1b4c6b9dcb29a2b4286d123044c2e} Called after an iteration has finished. Reimplemented from \hyperlink{classgraphchi_1_1_graph_chi_program_a24259d43b85d28af16d53a4176d29a07}{graphchi\-::\-Graph\-Chi\-Program$<$ Vertex\-Data\-Type, Edge\-Data\-Type $>$}. \hypertarget{struct_community_detection_program_aa8a15b9afd3731712ac3e01a9491d7c1}{\index{Community\-Detection\-Program@{Community\-Detection\-Program}!before\-\_\-exec\-\_\-interval@{before\-\_\-exec\-\_\-interval}} \index{before\-\_\-exec\-\_\-interval@{before\-\_\-exec\-\_\-interval}!CommunityDetectionProgram@{Community\-Detection\-Program}} \subsubsection[{before\-\_\-exec\-\_\-interval}]{\setlength{\rightskip}{0pt plus 5cm}void Community\-Detection\-Program\-::before\-\_\-exec\-\_\-interval ( \begin{DoxyParamCaption} \item[{vid\-\_\-t}]{window\-\_\-st, } \item[{vid\-\_\-t}]{window\-\_\-en, } \item[{{\bf graphchi\-\_\-context} \&}]{ginfo} \end{DoxyParamCaption} )\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}}\label{struct_community_detection_program_aa8a15b9afd3731712ac3e01a9491d7c1} Called before an execution interval is started. Reimplemented from \hyperlink{classgraphchi_1_1_graph_chi_program_ab2f7244ddb743deb859dbc2fc927078a}{graphchi\-::\-Graph\-Chi\-Program$<$ Vertex\-Data\-Type, Edge\-Data\-Type $>$}. \hypertarget{struct_community_detection_program_a3dde791f5dec796cd9c6e0a61da114cc}{\index{Community\-Detection\-Program@{Community\-Detection\-Program}!before\-\_\-iteration@{before\-\_\-iteration}} \index{before\-\_\-iteration@{before\-\_\-iteration}!CommunityDetectionProgram@{Community\-Detection\-Program}} \subsubsection[{before\-\_\-iteration}]{\setlength{\rightskip}{0pt plus 5cm}void Community\-Detection\-Program\-::before\-\_\-iteration ( \begin{DoxyParamCaption} \item[{int}]{iteration, } \item[{{\bf graphchi\-\_\-context} \&}]{info} \end{DoxyParamCaption} )\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}}\label{struct_community_detection_program_a3dde791f5dec796cd9c6e0a61da114cc} Called before an iteration starts. Reimplemented from \hyperlink{classgraphchi_1_1_graph_chi_program_aec6d16fd6dddf1543afe55360a653cf2}{graphchi\-::\-Graph\-Chi\-Program$<$ Vertex\-Data\-Type, Edge\-Data\-Type $>$}. \hypertarget{struct_community_detection_program_aa371bbe8d4e79cb7cc512d9f77e9496c}{\index{Community\-Detection\-Program@{Community\-Detection\-Program}!update@{update}} \index{update@{update}!CommunityDetectionProgram@{Community\-Detection\-Program}} \subsubsection[{update}]{\setlength{\rightskip}{0pt plus 5cm}void Community\-Detection\-Program\-::update ( \begin{DoxyParamCaption} \item[{{\bf graphchi\-\_\-vertex}$<$ Vertex\-Data\-Type, Edge\-Data\-Type $>$ \&}]{vertex, } \item[{{\bf graphchi\-\_\-context} \&}]{gcontext} \end{DoxyParamCaption} )\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}}\label{struct_community_detection_program_aa371bbe8d4e79cb7cc512d9f77e9496c} Vertex update function. Write my label to my neighbors. Implements \hyperlink{classgraphchi_1_1_graph_chi_program_ad76f8881627e3c039144e261bfc77770}{graphchi\-::\-Graph\-Chi\-Program$<$ Vertex\-Data\-Type, Edge\-Data\-Type $>$}. The documentation for this struct was generated from the following file\-:\begin{DoxyCompactItemize} \item example\-\_\-apps/\hyperlink{communitydetection_8cpp}{communitydetection.\-cpp}\end{DoxyCompactItemize}
09jijiangwen-download
docs/latex/struct_community_detection_program.tex
TeX
asf20
7,090
\hypertarget{structprediction__saver}{\section{prediction\-\_\-saver Struct Reference} \label{structprediction__saver}\index{prediction\-\_\-saver@{prediction\-\_\-saver}} } \subsection*{Public Types} \begin{DoxyCompactItemize} \item \hypertarget{structprediction__saver_aeb6641db876dbe584d00eac7e3035107}{typedef \hyperlink{structgraphlab_1_1_graph_lab_vertex_wrapper}{graph\-\_\-type\-::vertex\-\_\-type} {\bfseries vertex\-\_\-type}}\label{structprediction__saver_aeb6641db876dbe584d00eac7e3035107} \item \hypertarget{structprediction__saver_ab3d21e3919d539d70ee9a08affd672be}{typedef \hyperlink{structgraphlab_1_1_graph_lab_edge_wrapper}{graph\-\_\-type\-::edge\-\_\-type} {\bfseries edge\-\_\-type}}\label{structprediction__saver_ab3d21e3919d539d70ee9a08affd672be} \end{DoxyCompactItemize} \subsection*{Public Member Functions} \begin{DoxyCompactItemize} \item \hypertarget{structprediction__saver_ac3f39b9cfbd98608ce12e9e08770decd}{std\-::string {\bfseries save\-\_\-vertex} (const \hyperlink{structgraphlab_1_1_graph_lab_vertex_wrapper}{vertex\-\_\-type} \&vertex) const }\label{structprediction__saver_ac3f39b9cfbd98608ce12e9e08770decd} \item \hypertarget{structprediction__saver_aeaaae219884dfa49b551ea07db8b9447}{std\-::string {\bfseries save\-\_\-edge} (const \hyperlink{structgraphlab_1_1_graph_lab_edge_wrapper}{edge\-\_\-type} \&edge) const }\label{structprediction__saver_aeaaae219884dfa49b551ea07db8b9447} \end{DoxyCompactItemize} The documentation for this struct was generated from the following file\-:\begin{DoxyCompactItemize} \item example\-\_\-apps/matrix\-\_\-factorization/graphlab\-\_\-gas/\hyperlink{als__vertex__program_8hpp}{als\-\_\-vertex\-\_\-program.\-hpp}\end{DoxyCompactItemize}
09jijiangwen-download
docs/latex/structprediction__saver.tex
TeX
asf20
1,725
\hypertarget{struct_mongoose_request_info}{\section{Mongoose\-Request\-Info Struct Reference} \label{struct_mongoose_request_info}\index{Mongoose\-Request\-Info@{Mongoose\-Request\-Info}} } \subsection*{Public Attributes} \begin{DoxyCompactItemize} \item \hypertarget{struct_mongoose_request_info_a2988d17312ff4f85e8b78edb63a83e46}{string {\bfseries request\-\_\-method}}\label{struct_mongoose_request_info_a2988d17312ff4f85e8b78edb63a83e46} \item \hypertarget{struct_mongoose_request_info_a3f0c3e95ba7436180ab5937a35be5cb0}{string {\bfseries uri}}\label{struct_mongoose_request_info_a3f0c3e95ba7436180ab5937a35be5cb0} \item \hypertarget{struct_mongoose_request_info_a4821b995059f981d411f658a18bd96a7}{string {\bfseries http\-\_\-version}}\label{struct_mongoose_request_info_a4821b995059f981d411f658a18bd96a7} \item \hypertarget{struct_mongoose_request_info_acfbbce91c3683b8931b08d2582b9be19}{string {\bfseries query\-\_\-string}}\label{struct_mongoose_request_info_acfbbce91c3683b8931b08d2582b9be19} \item \hypertarget{struct_mongoose_request_info_a73df254a98a3d33289344a6d628a3c87}{Int\-Ptr {\bfseries post\-\_\-data}}\label{struct_mongoose_request_info_a73df254a98a3d33289344a6d628a3c87} \item \hypertarget{struct_mongoose_request_info_a81714db6d7e928193c8703d2f5718472}{string {\bfseries remote\-\_\-user}}\label{struct_mongoose_request_info_a81714db6d7e928193c8703d2f5718472} \item \hypertarget{struct_mongoose_request_info_a772fd457a7acf7d2d322501d292f1347}{int {\bfseries remote\-\_\-ip}}\label{struct_mongoose_request_info_a772fd457a7acf7d2d322501d292f1347} \item \hypertarget{struct_mongoose_request_info_af1bb31bea7497260d188ba1a05c6c5f1}{int {\bfseries remote\-\_\-port}}\label{struct_mongoose_request_info_af1bb31bea7497260d188ba1a05c6c5f1} \item \hypertarget{struct_mongoose_request_info_a0dfe97d6930924aac99a81994dd8109b}{int {\bfseries post\-\_\-data\-\_\-len}}\label{struct_mongoose_request_info_a0dfe97d6930924aac99a81994dd8109b} \item \hypertarget{struct_mongoose_request_info_add55c8bbb41c0d751af381d09fd297a2}{int {\bfseries status\-\_\-code}}\label{struct_mongoose_request_info_add55c8bbb41c0d751af381d09fd297a2} \item \hypertarget{struct_mongoose_request_info_aa2108b0eaf182b000311e4ccb9f0d5cc}{int {\bfseries num\-\_\-headers}}\label{struct_mongoose_request_info_aa2108b0eaf182b000311e4ccb9f0d5cc} \item \hypertarget{struct_mongoose_request_info_ac9f7aebab0875bf8314cbad42b56884f}{\hyperlink{struct_mongoose_header}{Mongoose\-Header}\mbox{[}$\,$\mbox{]} {\bfseries http\-\_\-headers}}\label{struct_mongoose_request_info_ac9f7aebab0875bf8314cbad42b56884f} \end{DoxyCompactItemize} The documentation for this struct was generated from the following file\-:\begin{DoxyCompactItemize} \item src/external/vpiotr-\/mongoose-\/cpp/bindings/csharp/mongoose.\-cs\end{DoxyCompactItemize}
09jijiangwen-download
docs/latex/struct_mongoose_request_info.tex
TeX
asf20
2,828
\hypertarget{structlog__dispatch}{\section{log\-\_\-dispatch$<$ dostuff $>$ Struct Template Reference} \label{structlog__dispatch}\index{log\-\_\-dispatch$<$ dostuff $>$@{log\-\_\-dispatch$<$ dostuff $>$}} } {\ttfamily \#include $<$logger.\-hpp$>$} \subsection{Detailed Description} \subsubsection*{template$<$bool dostuff$>$struct log\-\_\-dispatch$<$ dostuff $>$} Wrapper to generate 0 code if the output level is lower than the log level The documentation for this struct was generated from the following file\-:\begin{DoxyCompactItemize} \item src/logger/\hyperlink{logger_8hpp}{logger.\-hpp}\end{DoxyCompactItemize}
09jijiangwen-download
docs/latex/structlog__dispatch.tex
TeX
asf20
630
\hypertarget{structlog__dispatch_3_01true_01_4}{\section{log\-\_\-dispatch$<$ true $>$ Struct Template Reference} \label{structlog__dispatch_3_01true_01_4}\index{log\-\_\-dispatch$<$ true $>$@{log\-\_\-dispatch$<$ true $>$}} } \subsection*{Static Public Member Functions} \begin{DoxyCompactItemize} \item \hypertarget{structlog__dispatch_3_01true_01_4_ab4d01f08f0a56986ab6d938865c1c9f5}{static void {\bfseries exec} (int loglevel, const char $\ast$file, const char $\ast$function, int line, const char $\ast$fmt,...)}\label{structlog__dispatch_3_01true_01_4_ab4d01f08f0a56986ab6d938865c1c9f5} \end{DoxyCompactItemize} The documentation for this struct was generated from the following file\-:\begin{DoxyCompactItemize} \item src/logger/\hyperlink{logger_8hpp}{logger.\-hpp}\end{DoxyCompactItemize}
09jijiangwen-download
docs/latex/structlog__dispatch_3_01true_01_4.tex
TeX
asf20
803
\hypertarget{structbidirectional__label}{\section{bidirectional\-\_\-label Struct Reference} \label{structbidirectional__label}\index{bidirectional\-\_\-label@{bidirectional\-\_\-label}} } \subsection*{Public Attributes} \begin{DoxyCompactItemize} \item \hypertarget{structbidirectional__label_a69dbe6415de3b814ee699a5df2ed5702}{vid\-\_\-t {\bfseries smaller\-\_\-one}}\label{structbidirectional__label_a69dbe6415de3b814ee699a5df2ed5702} \item \hypertarget{structbidirectional__label_a6007bbff3e619f639b83b174d9c00fe9}{vid\-\_\-t {\bfseries larger\-\_\-one}}\label{structbidirectional__label_a6007bbff3e619f639b83b174d9c00fe9} \end{DoxyCompactItemize} \subsection{Detailed Description} Unlike in connected components, we need to ensure that neighbors do not overwrite each others values. This is achieved by keeping two values in an edge. In this struct, smaller\-\_\-one is the id of the vertex that has smaller id, and larger\-\_\-one the others. This complexity is due to us ignoring the direction of an edge. The documentation for this struct was generated from the following file\-:\begin{DoxyCompactItemize} \item example\-\_\-apps/\hyperlink{communitydetection_8cpp}{communitydetection.\-cpp}\end{DoxyCompactItemize}
09jijiangwen-download
docs/latex/structbidirectional__label.tex
TeX
asf20
1,233
\hypertarget{ioutil_8hpp}{\section{src/util/ioutil.hpp File Reference} \label{ioutil_8hpp}\index{src/util/ioutil.\-hpp@{src/util/ioutil.\-hpp}} } {\ttfamily \#include $<$unistd.\-h$>$}\\* {\ttfamily \#include $<$assert.\-h$>$}\\* {\ttfamily \#include $<$stdlib.\-h$>$}\\* {\ttfamily \#include $<$errno.\-h$>$}\\* \subsection*{Functions} \begin{DoxyCompactItemize} \item \hypertarget{ioutil_8hpp_a58ecb2d429a7d2be1ab95f0594371af5}{{\footnotesize template$<$typename T $>$ }\\void {\bfseries preada} (int f, T $\ast$tbuf, size\-\_\-t nbytes, size\-\_\-t off)}\label{ioutil_8hpp_a58ecb2d429a7d2be1ab95f0594371af5} \item \hypertarget{ioutil_8hpp_a6fbcf50ad5e47575fd2f2e1d3035bb7d}{{\footnotesize template$<$typename T $>$ }\\void {\bfseries preada\-\_\-trunc} (int f, T $\ast$tbuf, size\-\_\-t nbytes, size\-\_\-t off)}\label{ioutil_8hpp_a6fbcf50ad5e47575fd2f2e1d3035bb7d} \item \hypertarget{ioutil_8hpp_a47c27690b7256e2e323ed2c0952d877d}{{\footnotesize template$<$typename T $>$ }\\size\-\_\-t {\bfseries readfull} (int f, T $\ast$$\ast$buf)}\label{ioutil_8hpp_a47c27690b7256e2e323ed2c0952d877d} \item \hypertarget{ioutil_8hpp_afc2a5e54339ca55173865ab783acdfb2}{{\footnotesize template$<$typename T $>$ }\\void {\bfseries pwritea} (int f, T $\ast$tbuf, size\-\_\-t nbytes, size\-\_\-t off)}\label{ioutil_8hpp_afc2a5e54339ca55173865ab783acdfb2} \item \hypertarget{ioutil_8hpp_aeb6423468a60802c99fe7a7b2952f05d}{{\footnotesize template$<$typename T $>$ }\\void {\bfseries writea} (int f, T $\ast$tbuf, size\-\_\-t nbytes)}\label{ioutil_8hpp_aeb6423468a60802c99fe7a7b2952f05d} \item \hypertarget{ioutil_8hpp_a3bf37672a519a00bc554b0dd7f0ac3e5}{{\footnotesize template$<$typename T $>$ }\\void {\bfseries checkarray\-\_\-filesize} (std\-::string fname, size\-\_\-t nelements)}\label{ioutil_8hpp_a3bf37672a519a00bc554b0dd7f0ac3e5} \end{DoxyCompactItemize} \subsection{Detailed Description} \begin{DoxyAuthor}{Author} Aapo Kyrola \href{mailto:akyrola@cs.cmu.edu}{\tt akyrola@cs.\-cmu.\-edu} \end{DoxyAuthor} \begin{DoxyVersion}{Version} 1.\-0 \end{DoxyVersion} \hypertarget{toplist_8hpp_LICENSE}{}\subsection{L\-I\-C\-E\-N\-S\-E}\label{toplist_8hpp_LICENSE} Copyright \mbox{[}2012\mbox{]} \mbox{[}Aapo Kyrola, Guy Blelloch, Carlos Guestrin / Carnegie Mellon University\mbox{]} Licensed under the Apache License, Version 2.\-0 (the \char`\"{}\-License\char`\"{}); you may not use this file except in compliance with the License. You may obtain a copy of the License at \href{http://www.apache.org/licenses/LICENSE-2.0}{\tt http\-://www.\-apache.\-org/licenses/\-L\-I\-C\-E\-N\-S\-E-\/2.\-0} Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \char`\"{}\-A\-S I\-S\char`\"{} B\-A\-S\-I\-S, W\-I\-T\-H\-O\-U\-T W\-A\-R\-R\-A\-N\-T\-I\-E\-S O\-R C\-O\-N\-D\-I\-T\-I\-O\-N\-S O\-F A\-N\-Y K\-I\-N\-D, either express or implied. See the License for the specific language governing permissions and limitations under the License.\hypertarget{toplist_8hpp_DESCRIPTION}{}\subsection{D\-E\-S\-C\-R\-I\-P\-T\-I\-O\-N}\label{toplist_8hpp_DESCRIPTION} I/\-O Utils.
09jijiangwen-download
docs/latex/ioutil_8hpp.tex
TeX
asf20
3,127
\hypertarget{classals__vertex__program}{\section{als\-\_\-vertex\-\_\-program Class Reference} \label{classals__vertex__program}\index{als\-\_\-vertex\-\_\-program@{als\-\_\-vertex\-\_\-program}} } {\ttfamily \#include $<$als\-\_\-vertex\-\_\-program.\-hpp$>$} Inheritance diagram for als\-\_\-vertex\-\_\-program\-:\begin{figure}[H] \begin{center} \leavevmode \includegraphics[height=1.062619cm]{classals__vertex__program} \end{center} \end{figure} \subsection*{Public Member Functions} \begin{DoxyCompactItemize} \item edge\-\_\-dir\-\_\-type \hyperlink{classals__vertex__program_aa70153f16b28263ed6112d012d7a3e86}{gather\-\_\-edges} (\hyperlink{classgraphlab_1_1icontext}{icontext\-\_\-type} \&context, const \hyperlink{structgraphlab_1_1_graph_lab_vertex_wrapper}{vertex\-\_\-type} \&vertex) const \item gather\-\_\-type \hyperlink{classals__vertex__program_ab6263c7cdde54dea2c1cd50b4c732169}{gather} (\hyperlink{classgraphlab_1_1icontext}{icontext\-\_\-type} \&context, const \hyperlink{structgraphlab_1_1_graph_lab_vertex_wrapper}{vertex\-\_\-type} \&vertex, \hyperlink{structgraphlab_1_1_graph_lab_edge_wrapper}{edge\-\_\-type} \&\hyperlink{structedge}{edge}) const \item void \hyperlink{classals__vertex__program_a38b2ce9db8057202495be03324bba2b5}{apply} (\hyperlink{classgraphlab_1_1icontext}{icontext\-\_\-type} \&context, \hyperlink{structgraphlab_1_1_graph_lab_vertex_wrapper}{vertex\-\_\-type} \&vertex, const gather\-\_\-type \&sum) \item edge\-\_\-dir\-\_\-type \hyperlink{classals__vertex__program_a6854f1ddb0f0bccc3c8e48711320f645}{scatter\-\_\-edges} (\hyperlink{classgraphlab_1_1icontext}{icontext\-\_\-type} \&context, const \hyperlink{structgraphlab_1_1_graph_lab_vertex_wrapper}{vertex\-\_\-type} \&vertex) const \item void \hyperlink{classals__vertex__program_a72eb6fbad2a390df75a023cdf8bbc5fd}{scatter} (\hyperlink{classgraphlab_1_1icontext}{icontext\-\_\-type} \&context, const \hyperlink{structgraphlab_1_1_graph_lab_vertex_wrapper}{vertex\-\_\-type} \&vertex, \hyperlink{structgraphlab_1_1_graph_lab_edge_wrapper}{edge\-\_\-type} \&\hyperlink{structedge}{edge}) const \end{DoxyCompactItemize} \subsection*{Static Public Member Functions} \begin{DoxyCompactItemize} \item \hypertarget{classals__vertex__program_aae00f0768a3086e600178185ae657b2e}{static \hyperlink{structgraphlab_1_1empty}{graphlab\-::empty} \hyperlink{classals__vertex__program_aae00f0768a3086e600178185ae657b2e}{signal\-\_\-left} (\hyperlink{classgraphlab_1_1icontext}{icontext\-\_\-type} \&context, \hyperlink{structgraphlab_1_1_graph_lab_vertex_wrapper}{vertex\-\_\-type} \&vertex)}\label{classals__vertex__program_aae00f0768a3086e600178185ae657b2e} \begin{DoxyCompactList}\small\item\em Signal all vertices on one side of the bipartite graph. \end{DoxyCompactList}\end{DoxyCompactItemize} \subsection*{Static Public Attributes} \begin{DoxyCompactItemize} \item static double \hyperlink{classals__vertex__program_a4d3fe82f9b913c88361646fecea3e181}{T\-O\-L\-E\-R\-A\-N\-C\-E} = 1e-\/3 \item \hypertarget{classals__vertex__program_a253e4627e319193ddb8cba802c925c6f}{static double {\bfseries L\-A\-M\-B\-D\-A} = 0.\-01}\label{classals__vertex__program_a253e4627e319193ddb8cba802c925c6f} \item \hypertarget{classals__vertex__program_a28e4959a34dfe6b3c1905a7b7c3e4a48}{static size\-\_\-t {\bfseries M\-A\-X\-\_\-\-U\-P\-D\-A\-T\-E\-S} = -\/1}\label{classals__vertex__program_a28e4959a34dfe6b3c1905a7b7c3e4a48} \end{DoxyCompactItemize} \subsection*{Additional Inherited Members} \subsection{Detailed Description} A\-L\-S vertex program type \subsection{Member Function Documentation} \hypertarget{classals__vertex__program_a38b2ce9db8057202495be03324bba2b5}{\index{als\-\_\-vertex\-\_\-program@{als\-\_\-vertex\-\_\-program}!apply@{apply}} \index{apply@{apply}!als_vertex_program@{als\-\_\-vertex\-\_\-program}} \subsubsection[{apply}]{\setlength{\rightskip}{0pt plus 5cm}void als\-\_\-vertex\-\_\-program\-::apply ( \begin{DoxyParamCaption} \item[{{\bf icontext\-\_\-type} \&}]{context, } \item[{{\bf vertex\-\_\-type} \&}]{vertex, } \item[{const gather\-\_\-type \&}]{sum} \end{DoxyParamCaption} )\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}}\label{classals__vertex__program_a38b2ce9db8057202495be03324bba2b5} apply collects the sum of Xt\-X and Xy Implements \hyperlink{structgraphlab_1_1ivertex__program_ad1f9db9ebc638f6a9aa22014e8db1854}{graphlab\-::ivertex\-\_\-program$<$ graph\-\_\-type, gather\-\_\-type, graphlab\-::messages\-::sum\-\_\-priority $>$}. \hypertarget{classals__vertex__program_ab6263c7cdde54dea2c1cd50b4c732169}{\index{als\-\_\-vertex\-\_\-program@{als\-\_\-vertex\-\_\-program}!gather@{gather}} \index{gather@{gather}!als_vertex_program@{als\-\_\-vertex\-\_\-program}} \subsubsection[{gather}]{\setlength{\rightskip}{0pt plus 5cm}gather\-\_\-type als\-\_\-vertex\-\_\-program\-::gather ( \begin{DoxyParamCaption} \item[{{\bf icontext\-\_\-type} \&}]{context, } \item[{const {\bf vertex\-\_\-type} \&}]{vertex, } \item[{{\bf edge\-\_\-type} \&}]{edge} \end{DoxyParamCaption} ) const\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}}\label{classals__vertex__program_ab6263c7cdde54dea2c1cd50b4c732169} The gather function computes Xt\-X and Xy Reimplemented from \hyperlink{structgraphlab_1_1ivertex__program_a7ad835ddf125627fcedce3a3172428ef}{graphlab\-::ivertex\-\_\-program$<$ graph\-\_\-type, gather\-\_\-type, graphlab\-::messages\-::sum\-\_\-priority $>$}. \hypertarget{classals__vertex__program_aa70153f16b28263ed6112d012d7a3e86}{\index{als\-\_\-vertex\-\_\-program@{als\-\_\-vertex\-\_\-program}!gather\-\_\-edges@{gather\-\_\-edges}} \index{gather\-\_\-edges@{gather\-\_\-edges}!als_vertex_program@{als\-\_\-vertex\-\_\-program}} \subsubsection[{gather\-\_\-edges}]{\setlength{\rightskip}{0pt plus 5cm}edge\-\_\-dir\-\_\-type als\-\_\-vertex\-\_\-program\-::gather\-\_\-edges ( \begin{DoxyParamCaption} \item[{{\bf icontext\-\_\-type} \&}]{context, } \item[{const {\bf vertex\-\_\-type} \&}]{vertex} \end{DoxyParamCaption} ) const\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}}\label{classals__vertex__program_aa70153f16b28263ed6112d012d7a3e86} The set of edges to gather along Reimplemented from \hyperlink{structgraphlab_1_1ivertex__program_a7b978b86d8c8a47f68f1647b630887f8}{graphlab\-::ivertex\-\_\-program$<$ graph\-\_\-type, gather\-\_\-type, graphlab\-::messages\-::sum\-\_\-priority $>$}. \hypertarget{classals__vertex__program_a72eb6fbad2a390df75a023cdf8bbc5fd}{\index{als\-\_\-vertex\-\_\-program@{als\-\_\-vertex\-\_\-program}!scatter@{scatter}} \index{scatter@{scatter}!als_vertex_program@{als\-\_\-vertex\-\_\-program}} \subsubsection[{scatter}]{\setlength{\rightskip}{0pt plus 5cm}void als\-\_\-vertex\-\_\-program\-::scatter ( \begin{DoxyParamCaption} \item[{{\bf icontext\-\_\-type} \&}]{context, } \item[{const {\bf vertex\-\_\-type} \&}]{vertex, } \item[{{\bf edge\-\_\-type} \&}]{edge} \end{DoxyParamCaption} ) const\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}}\label{classals__vertex__program_a72eb6fbad2a390df75a023cdf8bbc5fd} Scatter reschedules neighbors Reimplemented from \hyperlink{structgraphlab_1_1ivertex__program_a68e93eefb25b31b0df72b4c454a89105}{graphlab\-::ivertex\-\_\-program$<$ graph\-\_\-type, gather\-\_\-type, graphlab\-::messages\-::sum\-\_\-priority $>$}. \hypertarget{classals__vertex__program_a6854f1ddb0f0bccc3c8e48711320f645}{\index{als\-\_\-vertex\-\_\-program@{als\-\_\-vertex\-\_\-program}!scatter\-\_\-edges@{scatter\-\_\-edges}} \index{scatter\-\_\-edges@{scatter\-\_\-edges}!als_vertex_program@{als\-\_\-vertex\-\_\-program}} \subsubsection[{scatter\-\_\-edges}]{\setlength{\rightskip}{0pt plus 5cm}edge\-\_\-dir\-\_\-type als\-\_\-vertex\-\_\-program\-::scatter\-\_\-edges ( \begin{DoxyParamCaption} \item[{{\bf icontext\-\_\-type} \&}]{context, } \item[{const {\bf vertex\-\_\-type} \&}]{vertex} \end{DoxyParamCaption} ) const\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}}\label{classals__vertex__program_a6854f1ddb0f0bccc3c8e48711320f645} The edges to scatter along Reimplemented from \hyperlink{structgraphlab_1_1ivertex__program_aa296513f9727bb48b372a0386c7e0c05}{graphlab\-::ivertex\-\_\-program$<$ graph\-\_\-type, gather\-\_\-type, graphlab\-::messages\-::sum\-\_\-priority $>$}. \subsection{Member Data Documentation} \hypertarget{classals__vertex__program_a4d3fe82f9b913c88361646fecea3e181}{\index{als\-\_\-vertex\-\_\-program@{als\-\_\-vertex\-\_\-program}!T\-O\-L\-E\-R\-A\-N\-C\-E@{T\-O\-L\-E\-R\-A\-N\-C\-E}} \index{T\-O\-L\-E\-R\-A\-N\-C\-E@{T\-O\-L\-E\-R\-A\-N\-C\-E}!als_vertex_program@{als\-\_\-vertex\-\_\-program}} \subsubsection[{T\-O\-L\-E\-R\-A\-N\-C\-E}]{\setlength{\rightskip}{0pt plus 5cm}double als\-\_\-vertex\-\_\-program\-::\-T\-O\-L\-E\-R\-A\-N\-C\-E = 1e-\/3\hspace{0.3cm}{\ttfamily [static]}}}\label{classals__vertex__program_a4d3fe82f9b913c88361646fecea3e181} The convergence tolerance The documentation for this class was generated from the following files\-:\begin{DoxyCompactItemize} \item example\-\_\-apps/matrix\-\_\-factorization/graphlab\-\_\-gas/\hyperlink{als__vertex__program_8hpp}{als\-\_\-vertex\-\_\-program.\-hpp}\item example\-\_\-apps/matrix\-\_\-factorization/graphlab\-\_\-gas/\hyperlink{als__graphlab_8cpp}{als\-\_\-graphlab.\-cpp}\end{DoxyCompactItemize}
09jijiangwen-download
docs/latex/classals__vertex__program.tex
TeX
asf20
9,288
\hypertarget{ischeduler_8hpp}{\section{src/api/ischeduler.hpp File Reference} \label{ischeduler_8hpp}\index{src/api/ischeduler.\-hpp@{src/api/ischeduler.\-hpp}} } {\ttfamily \#include \char`\"{}graphchi\-\_\-types.\-hpp\char`\"{}}\\* \subsection*{Classes} \begin{DoxyCompactItemize} \item class \hyperlink{classgraphchi_1_1ischeduler}{graphchi\-::ischeduler} \end{DoxyCompactItemize} \subsection*{Namespaces} \begin{DoxyCompactItemize} \item namespace \hyperlink{namespacegraphchi}{graphchi} \end{DoxyCompactItemize} \subsection{Detailed Description} \begin{DoxyAuthor}{Author} Aapo Kyrola \href{mailto:akyrola@cs.cmu.edu}{\tt akyrola@cs.\-cmu.\-edu} \end{DoxyAuthor} \begin{DoxyVersion}{Version} 1.\-0 \end{DoxyVersion} \hypertarget{toplist_8hpp_LICENSE}{}\subsection{L\-I\-C\-E\-N\-S\-E}\label{toplist_8hpp_LICENSE} Copyright \mbox{[}2012\mbox{]} \mbox{[}Aapo Kyrola, Guy Blelloch, Carlos Guestrin / Carnegie Mellon University\mbox{]} Licensed under the Apache License, Version 2.\-0 (the \char`\"{}\-License\char`\"{}); you may not use this file except in compliance with the License. You may obtain a copy of the License at \href{http://www.apache.org/licenses/LICENSE-2.0}{\tt http\-://www.\-apache.\-org/licenses/\-L\-I\-C\-E\-N\-S\-E-\/2.\-0} Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \char`\"{}\-A\-S I\-S\char`\"{} B\-A\-S\-I\-S, W\-I\-T\-H\-O\-U\-T W\-A\-R\-R\-A\-N\-T\-I\-E\-S O\-R C\-O\-N\-D\-I\-T\-I\-O\-N\-S O\-F A\-N\-Y K\-I\-N\-D, either express or implied. See the License for the specific language governing permissions and limitations under the License.\hypertarget{toplist_8hpp_DESCRIPTION}{}\subsection{D\-E\-S\-C\-R\-I\-P\-T\-I\-O\-N}\label{toplist_8hpp_DESCRIPTION} Scheduler interface.
09jijiangwen-download
docs/latex/ischeduler_8hpp.tex
TeX
asf20
1,795
%!PS-Adobe-2.0 EPSF-2.0 %%Title: ClassName %%Creator: Doxygen %%CreationDate: Time %%For: %Magnification: 1.00 %%Orientation: Portrait %%BoundingBox: 0 0 500 157.480315 %%Pages: 0 %%BeginSetup %%EndSetup %%EndComments % ----- variables ----- /boxwidth 0 def /boxheight 40 def /fontheight 24 def /marginwidth 10 def /distx 20 def /disty 40 def /boundaspect 3.175000 def % aspect ratio of the BoundingBox (width/height) /boundx 500 def /boundy boundx boundaspect div def /xspacing 0 def /yspacing 0 def /rows 2 def /cols 1 def /scalefactor 0 def /boxfont /Times-Roman findfont fontheight scalefont def % ----- procedures ----- /dotted { [1 4] 0 setdash } def /dashed { [5] 0 setdash } def /solid { [] 0 setdash } def /max % result = MAX(arg1,arg2) { /a exch def /b exch def a b gt {a} {b} ifelse } def /xoffset % result = MAX(0,(scalefactor-(boxwidth*cols+distx*(cols-1)))/2) { 0 scalefactor boxwidth cols mul distx cols 1 sub mul add sub 2 div max } def /cw % boxwidth = MAX(boxwidth, stringwidth(arg1)) { /str exch def /boxwidth boxwidth str stringwidth pop max def } def /box % draws a box with text `arg1' at grid pos (arg2,arg3) { gsave 2 setlinewidth newpath exch xspacing mul xoffset add exch yspacing mul moveto boxwidth 0 rlineto 0 boxheight rlineto boxwidth neg 0 rlineto 0 boxheight neg rlineto closepath dup stringwidth pop neg boxwidth add 2 div boxheight fontheight 2 div sub 2 div rmoveto show stroke grestore } def /mark { newpath exch xspacing mul xoffset add boxwidth add exch yspacing mul moveto 0 boxheight 4 div rlineto boxheight neg 4 div boxheight neg 4 div rlineto closepath eofill stroke } def /arrow { newpath moveto 3 -8 rlineto -6 0 rlineto 3 8 rlineto closepath eofill stroke } def /out % draws an output connector for the block at (arg1,arg2) { newpath exch xspacing mul xoffset add boxwidth 2 div add exch yspacing mul boxheight add /y exch def /x exch def x y moveto 0 disty 2 div rlineto stroke 1 eq { x y disty 2 div add arrow } if } def /in % draws an input connector for the block at (arg1,arg2) { newpath exch xspacing mul xoffset add boxwidth 2 div add exch yspacing mul disty 2 div sub /y exch def /x exch def x y moveto 0 disty 2 div rlineto stroke 1 eq { x y disty 2 div add arrow } if } def /hedge { exch xspacing mul xoffset add boxwidth 2 div add exch yspacing mul boxheight 2 div sub /y exch def /x exch def newpath x y moveto boxwidth 2 div distx add 0 rlineto stroke 1 eq { newpath x boxwidth 2 div distx add add y moveto -8 3 rlineto 0 -6 rlineto 8 3 rlineto closepath eofill stroke } if } def /vedge { /ye exch def /ys exch def /xs exch def newpath xs xspacing mul xoffset add boxwidth 2 div add dup ys yspacing mul boxheight 2 div sub moveto ye yspacing mul boxheight 2 div sub lineto stroke } def /conn % connections the blocks from col `arg1' to `arg2' of row `arg3' { /ys exch def /xe exch def /xs exch def newpath xs xspacing mul xoffset add boxwidth 2 div add ys yspacing mul disty 2 div sub moveto xspacing xe xs sub mul 0 rlineto stroke } def % ----- main ------ boxfont setfont 1 boundaspect scale (pagerank_kernel) cw (graphchi::functional_kernel< float, float >) cw /boxwidth boxwidth marginwidth 2 mul add def /xspacing boxwidth distx add def /yspacing boxheight disty add def /scalefactor boxwidth cols mul distx cols 1 sub mul add boxheight rows mul disty rows 1 sub mul add boundaspect mul max def boundx scalefactor div boundy scalefactor div scale % ----- classes ----- (pagerank_kernel) 0.000000 0.000000 box (graphchi::functional_kernel< float, float >) 0.000000 1.000000 box % ----- relations ----- solid 0 0.000000 0.000000 out solid 1 0.000000 1.000000 in
09jijiangwen-download
docs/latex/structpagerank__kernel.eps
PostScript
asf20
3,858
\hypertarget{graphchi__engine_8hpp}{\section{src/engine/graphchi\-\_\-engine.hpp File Reference} \label{graphchi__engine_8hpp}\index{src/engine/graphchi\-\_\-engine.\-hpp@{src/engine/graphchi\-\_\-engine.\-hpp}} } {\ttfamily \#include $<$iostream$>$}\\* {\ttfamily \#include $<$fstream$>$}\\* {\ttfamily \#include $<$sstream$>$}\\* {\ttfamily \#include $<$cstdio$>$}\\* {\ttfamily \#include $<$fcntl.\-h$>$}\\* {\ttfamily \#include $<$unistd.\-h$>$}\\* {\ttfamily \#include $<$assert.\-h$>$}\\* {\ttfamily \#include $<$omp.\-h$>$}\\* {\ttfamily \#include $<$vector$>$}\\* {\ttfamily \#include $<$sys/time.\-h$>$}\\* {\ttfamily \#include \char`\"{}api/chifilenames.\-hpp\char`\"{}}\\* {\ttfamily \#include \char`\"{}api/graph\-\_\-objects.\-hpp\char`\"{}}\\* {\ttfamily \#include \char`\"{}api/graphchi\-\_\-context.\-hpp\char`\"{}}\\* {\ttfamily \#include \char`\"{}api/graphchi\-\_\-program.\-hpp\char`\"{}}\\* {\ttfamily \#include \char`\"{}engine/auxdata/degree\-\_\-data.\-hpp\char`\"{}}\\* {\ttfamily \#include \char`\"{}engine/auxdata/vertex\-\_\-data.\-hpp\char`\"{}}\\* {\ttfamily \#include \char`\"{}engine/bitset\-\_\-scheduler.\-hpp\char`\"{}}\\* {\ttfamily \#include \char`\"{}io/stripedio.\-hpp\char`\"{}}\\* {\ttfamily \#include \char`\"{}logger/logger.\-hpp\char`\"{}}\\* {\ttfamily \#include \char`\"{}metrics/metrics.\-hpp\char`\"{}}\\* {\ttfamily \#include \char`\"{}shards/memoryshard.\-hpp\char`\"{}}\\* {\ttfamily \#include \char`\"{}shards/slidingshard.\-hpp\char`\"{}}\\* {\ttfamily \#include \char`\"{}util/pthread\-\_\-tools.\-hpp\char`\"{}}\\* \subsection*{Classes} \begin{DoxyCompactItemize} \item class \hyperlink{classgraphchi_1_1graphchi__engine}{graphchi\-::graphchi\-\_\-engine$<$ Vertex\-Data\-Type, Edge\-Data\-Type, svertex\-\_\-t $>$} \end{DoxyCompactItemize} \subsection*{Namespaces} \begin{DoxyCompactItemize} \item namespace \hyperlink{namespacegraphchi}{graphchi} \end{DoxyCompactItemize} \subsection{Detailed Description} \begin{DoxyAuthor}{Author} Aapo Kyrola \href{mailto:akyrola@cs.cmu.edu}{\tt akyrola@cs.\-cmu.\-edu} \end{DoxyAuthor} \begin{DoxyVersion}{Version} 1.\-0 \end{DoxyVersion} \hypertarget{toplist_8hpp_LICENSE}{}\subsection{L\-I\-C\-E\-N\-S\-E}\label{toplist_8hpp_LICENSE} Copyright \mbox{[}2012\mbox{]} \mbox{[}Aapo Kyrola, Guy Blelloch, Carlos Guestrin / Carnegie Mellon University\mbox{]} Licensed under the Apache License, Version 2.\-0 (the \char`\"{}\-License\char`\"{}); you may not use this file except in compliance with the License. You may obtain a copy of the License at \href{http://www.apache.org/licenses/LICENSE-2.0}{\tt http\-://www.\-apache.\-org/licenses/\-L\-I\-C\-E\-N\-S\-E-\/2.\-0} Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \char`\"{}\-A\-S I\-S\char`\"{} B\-A\-S\-I\-S, W\-I\-T\-H\-O\-U\-T W\-A\-R\-R\-A\-N\-T\-I\-E\-S O\-R C\-O\-N\-D\-I\-T\-I\-O\-N\-S O\-F A\-N\-Y K\-I\-N\-D, either express or implied. See the License for the specific language governing permissions and limitations under the License.\hypertarget{toplist_8hpp_DESCRIPTION}{}\subsection{D\-E\-S\-C\-R\-I\-P\-T\-I\-O\-N}\label{toplist_8hpp_DESCRIPTION} The basic Graph\-Chi engine.
09jijiangwen-download
docs/latex/graphchi__engine_8hpp.tex
TeX
asf20
3,215
INCFLAGS = -I/usr/local/include/ -I./src/ CPP = g++ CPPFLAGS = -g -O3 $(INCFLAGS) -fopenmp -Wall -Wno-strict-aliasing LINKERFLAGS = -lz DEBUGFLAGS = -g -ggdb $(INCFLAGS) HEADERS=$(wildcard *.h**) all: apps tests apps: example_apps/connectedcomponents example_apps/pagerank example_apps/pagerank_functional example_apps/communitydetection example_apps/trianglecounting example_apps/randomwalks als: example_apps/matrix_factorization/als_edgefactors example_apps/matrix_factorization/als_vertices_inmem tests: tests/basic_smoketest tests/bulksync_functional_test tests/dynamicdata_smoketest tests/test_dynamicedata_loader clean: @rm -rf bin/* cd toolkits/collaborative_filtering/; make clean; cd ../../ cd toolkits/parsers/; make clean; cd ../../ cd toolkits/graph_analytics/; make clean; cd ../../ blocksplitter: src/preprocessing/blocksplitter.cpp $(HEADERS) $(CPP) $(CPPFLAGS) src/preprocessing/blocksplitter.cpp -o bin/blocksplitter $(LINKERFLAGS) sharder_basic: src/preprocessing/sharder_basic.cpp $(HEADERS) @mkdir -p bin $(CPP) $(CPPFLAGS) src/preprocessing/sharder_basic.cpp -o bin/sharder_basic $(LINKERFLAGS) example_apps/% : example_apps/%.cpp $(HEADERS) @mkdir -p bin/$(@D) $(CPP) $(CPPFLAGS) -Iexample_apps/ $@.cpp -o bin/$@ $(LINKERFLAGS) myapps/% : myapps/%.cpp $(HEADERS) @mkdir -p bin/$(@D) $(CPP) $(CPPFLAGS) -Imyapps/ $@.cpp -o bin/$@ $(LINKERFLAGS) tests/%: src/tests/%.cpp $(HEADERS) @mkdir -p bin/$(@D) $(CPP) $(CPPFLAGS) src/$@.cpp -o bin/$@ $(LINKERFLAGS) graphlab_als: example_apps/matrix_factorization/graphlab_gas/als_graphlab.cpp $(CPP) $(CPPFLAGS) example_apps/matrix_factorization/graphlab_gas/als_graphlab.cpp -o bin/graphlab_als $(LINKERFLAGS) cf: cd toolkits/collaborative_filtering/; bash ./test_eigen.sh; if [ $$? -ne 0 ]; then exit 1; fi cd toolkits/collaborative_filtering/; make cf_test: cd toolkits/collaborative_filtering/; make test; cfd: cd toolkits/collaborative_filtering/; make -f Makefile.debug parsers: cd toolkits/parsers/; make parsersd: cd toolkits/parsers/; make -f Makefile.debug ga: cd toolkits/graph_analytics/; make ta: cd toolkits/text_analysis/; make docs: */** doxygen conf/doxygen/doxygen.config
09jijiangwen-download
Makefile
Makefile
asf20
2,209
./toolkits/collaborative_filtering/gensgd --training=rec_log_train.txt --val_pos=2 --rehash=1 --limit_rating=1000000 --max_iter=10 --gensgd_mult_dec=0.999999 --minval=-1 --maxval=1 --quiet=1 --calc_error=1 --file_columns=4 ./toolkits/collaborative_filtering/gensgd --training=rec_log_train.txt --val_pos=2 --rehash=1 --limit_rating=1000000 --max_iter=100 --gensgd_mult_dec=0.999999 --minval=-1 --maxval=1 --quiet=1 --calc_error=1 --file_columns=4 --features=3 --last_item=1 --user_file=user_profile.txt ./toolkits/collaborative_filtering/gensgd --training=rec_log_train.txt --val_pos=2 --rehash=1 --limit_rating=1000000 --max_iter=100 --gensgd_mult_dec=0.999999 --minval=-1 --maxval=1 --quiet=0 --features=3 --last_item=1 --quiet=1 --user_file=user_profile.txt --item_file=item.txt --gensgd_rate5=1e-5 --calc_error=1 --file_columns=4 ./toolkits/collaborative_filtering/sparse_gensgd --training=kddb --cutoff=0.5 --calc_error=1 --quiet=1 --gensgd_mult_dec=0.99999 --max_iter=100 --validation=kddb.t --gensgd_rate3=1e-4 --D=20 --gensgd_regw=1e-4 --gensgd_regv=1e-4 --gensgd_rate1=1e-4 --gensgd_rate2=1e-4 --gensgd_reg0=1e-3
09jijiangwen-download
unittest2.sh
Shell
asf20
1,127
/** * @file * @author Aapo Kyrola <akyrola@cs.cmu.edu> * @version 1.0 * * @section LICENSE * * Copyright [2012] [Aapo Kyrola, Guy Blelloch, Carlos Guestrin / Carnegie Mellon University] * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * @section DESCRIPTION * * The class manages vertex values (vertex data). */ /* Note: This class shares a lot of code with the degree_data.hpp. It might be useful to have a common base class "sequential-file". */ #ifdef DYNAMICVERTEXDATA #include "engine/auxdata/dynamicdata/vertex_data_dynamic.hpp" #else #ifndef DEF_GRAPHCHI_VERTEXDATA #define DEF_GRAPHCHI_VERTEXDATA #include <stdlib.h> #include <string> #include <assert.h> #include "graphchi_types.hpp" #include "api/chifilenames.hpp" #include "io/stripedio.hpp" #include "util/ioutil.hpp" namespace graphchi { template <typename VertexDataType> class vertex_data_store { protected: stripedio * iomgr; /* Current range of vertices in memory */ vid_t vertex_st; vid_t vertex_en; std::string filename; int filedesc; VertexDataType * loaded_chunk; virtual void open_file(std::string base_filename) { filedesc = iomgr->open_session(filename.c_str(), false); } public: vertex_data_store(std::string base_filename, size_t nvertices, stripedio * iomgr) : iomgr(iomgr), loaded_chunk(NULL){ vertex_st = vertex_en = 0; filename = filename_vertex_data<VertexDataType>(base_filename); check_size(nvertices); iomgr->allow_preloading(filename); open_file(filename); } virtual ~vertex_data_store() { iomgr->close_session(filedesc); iomgr->wait_for_writes(); if (loaded_chunk != NULL) { iomgr->managed_release(filedesc, &loaded_chunk); } } void check_size(size_t nvertices) { checkarray_filesize<VertexDataType>(filename, nvertices); } void clear(size_t nvertices) { check_size(0); check_size(nvertices); } /** * Loads a chunk of vertex values * @param vertex_st first vertex id * @param vertex_en last vertex id, inclusive */ virtual void load(vid_t _vertex_st, vid_t _vertex_en) { assert(_vertex_en >= _vertex_st); vertex_st = _vertex_st; vertex_en = _vertex_en; size_t datasize = (vertex_en - vertex_st + 1)* sizeof(VertexDataType); size_t datastart = vertex_st * sizeof(VertexDataType); if (loaded_chunk != NULL) { iomgr->managed_release(filedesc, &loaded_chunk); } iomgr->managed_malloc(filedesc, &loaded_chunk, datasize, datastart); iomgr->managed_preada_now(filedesc, &loaded_chunk, datasize, datastart); } /** * Saves the current chunk of vertex values */ virtual void save(bool async=false) { assert(loaded_chunk != NULL); size_t datasize = (vertex_en - vertex_st + 1) * sizeof(VertexDataType); size_t datastart = vertex_st * sizeof(VertexDataType); if (async) { iomgr->managed_pwritea_async(filedesc, &loaded_chunk, datasize, datastart, false); } else { iomgr->managed_pwritea_now(filedesc, &loaded_chunk, datasize, datastart); } } /** * Returns id of the first vertex currently in memory. Fails if nothing loaded yet. */ vid_t first_vertex_id() { assert(loaded_chunk != NULL); return vertex_st; } VertexDataType * vertex_data_ptr(vid_t vertexid) { assert(vertexid >= vertex_st && vertexid <= vertex_en); return &loaded_chunk[vertexid - vertex_st]; } }; } #endif #endif
09jijiangwen-download
src/engine/auxdata/vertex_data.hpp
C++
asf20
4,669
/** * @file * @author Aapo Kyrola <akyrola@cs.cmu.edu> * @version 1.0 * * @section LICENSE * * Copyright [2012] [Aapo Kyrola, Guy Blelloch, Carlos Guestrin / Carnegie Mellon University] * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * @section DESCRIPTION * * The class manages vertex values (vertex data) when the * vertex data is dynamic. That is, the vertex data type must * be a chivector. * * To enable dynamically sized data, vertex data must be stored in * small (1 million-vertex) blocks. */ #ifndef DYNAMICVERTEXDATA ERROR(DYNAMICVERTEXDATA NEEDS TO BE DEFINED) #endif #ifndef DEF_GRAPHCHI_VERTEXDATA #define DEF_GRAPHCHI_VERTEXDATA #include <stdlib.h> #include <string> #include <fcntl.h> #include <errno.h> #include <sys/stat.h> #include <assert.h> #include "graphchi_types.hpp" #include "api/chifilenames.hpp" #include "io/stripedio.hpp" #include "util/ioutil.hpp" #include "api/dynamicdata/chivector.hpp" #include "shards/dynamicdata/dynamicblock.hpp" namespace graphchi { template <typename VertexDataType> struct vdblock_t { int blockid; int fd; uint8_t* data; dynamicdata_block<VertexDataType> * dblock; vdblock_t(int bid) : blockid(bid), data(NULL), dblock(NULL) {} }; template <typename VertexDataType> class vertex_data_store { typedef vdblock_t<VertexDataType> vdblock; protected: stripedio * iomgr; /* Current range of vertices in memory */ vid_t vertex_st; vid_t vertex_en; std::string dirname; size_t verticesperblock; VertexDataType * loaded_chunk; std::vector<vdblock> loadedblocks; // Blocks currently in memory public: vertex_data_store(std::string base_filename, size_t nvertices, stripedio * iomgr) : iomgr(iomgr), loaded_chunk(NULL){ vertex_st = vertex_en = 0; verticesperblock = 1024 * 1024; dirname = filename_vertex_data<VertexDataType>(base_filename) + ".dynamic_blockdir"; check_size(nvertices); } virtual ~vertex_data_store() { iomgr->wait_for_writes(); releaseblocks(); } void check_size(size_t nvertices) { int nblocks = (nvertices - 1) / verticesperblock + 1; for(int i=0; i < nblocks; i++) { init_block(i); } } void clear(size_t nvertices) { int nblocks = (nvertices - 1) / verticesperblock + 1; for(int i=0; i < nblocks; i++) { std::string bfilename = blockfilename(i); if (file_exists(bfilename)) { remove(bfilename.c_str()); } delete_block_uncompressed_sizefile(bfilename); } } private: std::string blockfilename(int blockid) { std::stringstream ss; ss << dirname; ss << "/"; ss << blockid; return ss.str(); } void releaseblocks() { for(int i=0; i < (int)loadedblocks.size(); i++) { delete(loadedblocks[i].dblock); iomgr->managed_release(loadedblocks[i].fd, &loadedblocks[i].data); iomgr->close_session(loadedblocks[i].fd); loadedblocks[i].data = NULL; loadedblocks[i].dblock = NULL; } loadedblocks.clear(); } void init_block(int blockid) { std::string bfilename = blockfilename(blockid); if (!file_exists(bfilename)) { mkdir(dirname.c_str(), 0777); size_t initsize = verticesperblock * sizeof(typename VertexDataType::sizeword_t); int f = open(bfilename.c_str(), O_RDWR | O_CREAT, S_IROTH | S_IWOTH | S_IWUSR | S_IRUSR); uint8_t * zeros = (uint8_t *) calloc(verticesperblock, sizeof(typename VertexDataType::sizeword_t)); write_compressed(f, zeros, initsize); free(zeros); write_block_uncompressed_size(bfilename, initsize); close(f); } } vdblock load_block(int blockid) { vdblock db(blockid); std::string blockfname = blockfilename(blockid); db.fd = iomgr->open_session(blockfname, false, true); int realsize = get_block_uncompressed_size(blockfname, -1); assert(realsize > 0); iomgr->managed_malloc(db.fd, &db.data, realsize, 0); iomgr->managed_preada_now(db.fd, &db.data, realsize, 0); db.dblock = new dynamicdata_block<VertexDataType>(verticesperblock, (uint8_t *)db.data, realsize); return db; } void write_block(vdblock &block) { int realsize; uint8_t * outdata; block.dblock->write(&outdata, realsize); std::string blockfname = blockfilename(block.blockid); iomgr->managed_pwritea_now(block.fd, &outdata, realsize, 0); /* Need to write whole block in the compressed regime */ write_block_uncompressed_size(blockfname, realsize); free(outdata); } public: /** * Loads a chunk of vertex values * @param vertex_st first vertex id * @param vertex_en last vertex id, inclusive */ virtual void load(vid_t _vertex_st, vid_t _vertex_en) { assert(_vertex_en >= _vertex_st); vertex_st = _vertex_st; vertex_en = _vertex_en; releaseblocks(); int min_blockid = vertex_st / verticesperblock; int max_blockid = vertex_en / verticesperblock; for(int i=min_blockid; i <= max_blockid; i++) { loadedblocks.push_back(load_block(i)); } } /** * Saves the current chunk of vertex values */ virtual void save(bool async=false) { for(int i=0; i < (int)loadedblocks.size(); i++) { write_block(loadedblocks[i]); } } /** * Returns id of the first vertex currently in memory. Fails if nothing loaded yet. */ vid_t first_vertex_id() { return vertex_st; } VertexDataType * vertex_data_ptr(vid_t vertexid) { int blockid = vertexid / verticesperblock; int firstloaded = loadedblocks[0].blockid; dynamicdata_block<VertexDataType> * dynblock = loadedblocks[blockid - firstloaded].dblock; return dynblock->edgevec(vertexid % verticesperblock); } }; } #endif
09jijiangwen-download
src/engine/auxdata/dynamicdata/vertex_data_dynamic.hpp
C++
asf20
7,484
/** * @file * @author Aapo Kyrola <akyrola@cs.cmu.edu> * @version 1.0 * * @section LICENSE * * Copyright [2012] [Aapo Kyrola, Guy Blelloch, Carlos Guestrin / Carnegie Mellon University] * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * @section DESCRIPTION * * The class manages information about vertex degree, and allows * sequential block access to the degree data file. */ #ifndef DEF_GRAPHCHI_DEGREE_DATA #define DEF_GRAPHCHI_DEGREE_DATA #include <fstream> #include <assert.h> #include <string> #include <stdlib.h> #include "graphchi_types.hpp" #include "io/stripedio.hpp" namespace graphchi { struct degree { int indegree; int outdegree; }; class degree_data { protected: /* Current range of vertices in memory */ vid_t vertex_st; vid_t vertex_en; stripedio * iomgr; /* Current chunk in memory */ degree * loaded_chunk; std::string filename; int filedesc; virtual void open_file(std::string base_filename) { filename = filename_degree_data(base_filename); iomgr->allow_preloading(filename); filedesc = iomgr->open_session(filename.c_str(), false); } public: /** * Constructor * @param base_filename base file prefix */ degree_data(std::string base_filename, stripedio * iomgr) : iomgr(iomgr), loaded_chunk(NULL) { vertex_st = vertex_en = 0; open_file(base_filename); } virtual ~degree_data() { if (loaded_chunk != NULL) { iomgr->managed_release(filedesc, &loaded_chunk); } iomgr->close_session(filedesc); } /** * Loads a chunk of vertex degrees * @param vertex_st first vertex id * @param vertex_en last vertex id, inclusive */ virtual void load(vid_t _vertex_st, vid_t _vertex_en) { assert(_vertex_en >= _vertex_st); vertex_st = _vertex_st; vertex_en = _vertex_en; size_t datasize = (vertex_en - vertex_st + 1) * sizeof(degree); size_t datastart = vertex_st * sizeof(degree); if (loaded_chunk != NULL) { iomgr->managed_release(filedesc, &loaded_chunk); } iomgr->managed_malloc(filedesc, &loaded_chunk, datasize, datastart); iomgr->managed_preada_now(filedesc, &loaded_chunk, datasize, datastart); } /** * Returns id of the first vertex currently in memory. Fails if nothing loaded yet. */ vid_t first_vertex_id() { assert(loaded_chunk != NULL); return vertex_st; } virtual void set_degree(vid_t vertexid, int indegree, int outdegree) { assert(vertexid >= vertex_st && vertexid <= vertex_en); loaded_chunk[vertexid - vertex_st].indegree = indegree; loaded_chunk[vertexid - vertex_st].outdegree = outdegree; } virtual void set_degree(vid_t vertexid, degree d) { assert(vertexid >= vertex_st && vertexid <= vertex_en); loaded_chunk[vertexid - vertex_st] = d; } inline degree get_degree(vid_t vertexid) { assert(vertexid >= vertex_st && vertexid <= vertex_en); return loaded_chunk[vertexid - vertex_st]; } void save() { size_t datasize = (vertex_en - vertex_st + 1) * sizeof(degree); size_t datastart = vertex_st * sizeof(degree); iomgr->managed_pwritea_now(filedesc, &loaded_chunk, datasize, datastart); } void ensure_size(vid_t maxid) { iomgr->truncate(filedesc, (1 + maxid) * sizeof(degree)); } }; } #endif
09jijiangwen-download
src/engine/auxdata/degree_data.hpp
C++
asf20
4,530
/** * @file * @author Aapo Kyrola <akyrola@cs.cmu.edu> * @version 1.0 * * @section LICENSE * * Copyright [2012] [Aapo Kyrola, Guy Blelloch, Carlos Guestrin / Carnegie Mellon University] * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * @section DESCRIPTION * * Engine for the alternative "functional" API for GraphChi. * The functional engine first processes in-edges, then executes "updates", * and then loads and updates out-edges. */ #ifndef GRAPHCHI_FUNCTIONALENGINE_DEF #define GRAPHCHI_FUNCTIONALENGINE_DEF #include "engine/graphchi_engine.hpp" #include "logger/logger.hpp" namespace graphchi { template <typename VertexDataType, typename EdgeDataType, typename fvertex_t> class functional_engine : public graphchi_engine<VertexDataType, EdgeDataType, fvertex_t> { public: functional_engine(std::string base_filename, int nshards, bool selective_scheduling, metrics &_m) : graphchi_engine<VertexDataType, EdgeDataType, fvertex_t>(base_filename, nshards, selective_scheduling, _m){ _m.set("engine", "functional"); } protected: /* Override - load only memory shard (i.e inedges) */ virtual void load_before_updates(std::vector<fvertex_t> &vertices) { logstream(LOG_DEBUG) << "Processing in-edges." << std::endl; /* Load memory shard */ if (!this->memoryshard->loaded()) { this->memoryshard->load(); } /* Load vertex edges from memory shard */ this->memoryshard->load_vertices(this->sub_interval_st, this->sub_interval_en, vertices, true, false); /* Load vertices */ this->vertex_data_handler->load(this->sub_interval_st, this->sub_interval_en); /* Wait for all reads to complete */ this->iomgr->wait_for_reads(); } /* Override - do not allocate edge data */ virtual void init_vertices(std::vector<fvertex_t> &vertices, graphchi_edge<EdgeDataType> * &e) { size_t nvertices = vertices.size(); /* Compute number of edges */ size_t num_edges = this->num_edges_subinterval(this->sub_interval_st, this->sub_interval_en); /* Assign vertex edge array pointers */ size_t ecounter = 0; for(int i=0; i < (int)nvertices; i++) { degree d = this->degree_handler->get_degree(this->sub_interval_st + i); int inc = d.indegree; int outc = d.outdegree; vertices[i] = fvertex_t(this->chicontext, this->sub_interval_st + i, inc, outc); if (this->scheduler != NULL) { bool is_sched = this->scheduler->is_scheduled(this->sub_interval_st + i); if (is_sched) { vertices[i].scheduled = true; this->nupdates++; ecounter += inc + outc; } } else { this->nupdates++; vertices[i].scheduled = true; ecounter += inc + outc; } } this->work += num_edges; } /* Override - now load sliding shards, to write (broadcast) to out vertices */ virtual void load_after_updates(std::vector<fvertex_t> &vertices) { logstream(LOG_DEBUG) << "Processing out-edges (broadcast)." << std::endl; omp_set_num_threads(this->load_threads); #pragma omp parallel for schedule(dynamic, 1) for(int p=0; p < this->nshards; p++) { /* Stream forward other than the window partition */ if (p != this->exec_interval) { this->sliding_shards[p]->read_next_vertices(vertices.size(), this->sub_interval_st, vertices, this->scheduler != NULL && this->iter == 0); } else { this->memoryshard->load_vertices(this->sub_interval_st, this->sub_interval_en, vertices, false, true); // Inedges=false, outedges=true } } } }; // End class }; // End namespace #endif
09jijiangwen-download
src/engine/functional/functional_engine.hpp
C++
asf20
4,869
/** * @file * @author Aapo Kyrola <akyrola@cs.cmu.edu> * @version 1.0 * * @section LICENSE * * Copyright [2012] [Aapo Kyrola, Guy Blelloch, Carlos Guestrin / Carnegie Mellon University] * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * @section DESCRIPTION * * The basic GraphChi engine. */ #ifndef DEF_GRAPHCHI_GRAPHCHI_ENGINE #define DEF_GRAPHCHI_GRAPHCHI_ENGINE #include <iostream> #include <fstream> #include <sstream> #include <cstdio> #include <fcntl.h> #include <unistd.h> #include <assert.h> #include <omp.h> #include <vector> #include <sys/time.h> #include "api/chifilenames.hpp" #include "api/graph_objects.hpp" #include "api/graphchi_context.hpp" #include "api/graphchi_program.hpp" #include "engine/auxdata/degree_data.hpp" #include "engine/auxdata/vertex_data.hpp" #include "engine/bitset_scheduler.hpp" #include "io/stripedio.hpp" #include "logger/logger.hpp" #include "metrics/metrics.hpp" #include "shards/memoryshard.hpp" #include "shards/slidingshard.hpp" #include "util/pthread_tools.hpp" namespace graphchi { template <typename VertexDataType, typename EdgeDataType, typename svertex_t = graphchi_vertex<VertexDataType, EdgeDataType> > class graphchi_engine { public: typedef sliding_shard<VertexDataType, EdgeDataType, svertex_t> slidingshard_t; typedef memory_shard<VertexDataType, EdgeDataType, svertex_t> memshard_t; protected: std::string base_filename; int nshards; /* IO manager */ stripedio * iomgr; /* Shards */ std::vector<slidingshard_t *> sliding_shards; memshard_t * memoryshard; std::vector<std::pair<vid_t, vid_t> > intervals; /* Auxilliary data handlers */ degree_data * degree_handler; vertex_data_store<VertexDataType> * vertex_data_handler; /* Computational context */ graphchi_context chicontext; /* Scheduler */ bitset_scheduler * scheduler; /* Configuration */ bool modifies_outedges; bool modifies_inedges; bool only_adjacency; bool use_selective_scheduling; bool enable_deterministic_parallelism; bool store_inedges; bool disable_vertexdata_storage; bool preload_commit; //alow storing of modified edge data on preloaded data into memory size_t blocksize; int membudget_mb; int load_threads; int exec_threads; /* State */ vid_t sub_interval_st; vid_t sub_interval_en; int iter; int niters; int exec_interval; size_t nupdates; size_t nedges; size_t work; // work is the number of edges processed unsigned int maxwindow; mutex modification_lock; bool reset_vertexdata; /* Metrics */ metrics &m; void print_config() { logstream(LOG_INFO) << "Engine configuration: " << std::endl; logstream(LOG_INFO) << " exec_threads = " << exec_threads << std::endl; logstream(LOG_INFO) << " load_threads = " << load_threads << std::endl; logstream(LOG_INFO) << " membudget_mb = " << membudget_mb << std::endl; logstream(LOG_INFO) << " blocksize = " << blocksize << std::endl; logstream(LOG_INFO) << " scheduler = " << use_selective_scheduling << std::endl; } public: /** * Initialize GraphChi engine * @param base_filename prefix of the graph files * @param nshards number of shards * @param selective_scheduling if true, uses selective scheduling */ graphchi_engine(std::string _base_filename, int _nshards, bool _selective_scheduling, metrics &_m) : base_filename(_base_filename), nshards(_nshards), use_selective_scheduling(_selective_scheduling), m(_m) { /* Initialize IO */ m.start_time("iomgr_init"); iomgr = new stripedio(m); if (disable_preloading()) { iomgr->set_disable_preloading(true); } m.stop_time("iomgr_init"); #ifndef DYNAMICEDATA logstream(LOG_INFO) << "Initializing graphchi_engine. This engine expects " << sizeof(EdgeDataType) << "-byte edge data. " << std::endl; #else logstream(LOG_INFO) << "Initializing graphchi_engine with dynamic edge-data. This engine expects " << sizeof(int) << "-byte edge data. " << std::endl; #endif /* If number of shards is unspecified - discover */ if (nshards < 1) { nshards = get_option_int("nshards", 0); if (nshards < 1) { logstream(LOG_WARNING) << "Number of shards was not specified (command-line argument 'nshards'). Trying to detect. " << std::endl; nshards = discover_shard_num(); } } /* Initialize a plenty of fields */ memoryshard = NULL; modifies_outedges = true; modifies_inedges = true; preload_commit = true; only_adjacency = false; reset_vertexdata = false; blocksize = get_option_long("blocksize", 4096 * 1024); #ifndef DYNAMICEDATA while (blocksize % sizeof(EdgeDataType) != 0) blocksize++; #endif disable_vertexdata_storage = false; membudget_mb = get_option_int("membudget_mb", 1024); nupdates = 0; iter = 0; work = 0; nedges = 0; scheduler = NULL; store_inedges = true; degree_handler = NULL; vertex_data_handler = NULL; enable_deterministic_parallelism = true; load_threads = get_option_int("loadthreads", 2); exec_threads = get_option_int("execthreads", omp_get_max_threads()); maxwindow = 40000000; /* Load graph shard interval information */ _load_vertex_intervals(); _m.set("file", _base_filename); _m.set("engine", "default"); _m.set("nshards", (size_t)nshards); } virtual ~graphchi_engine() { if (degree_handler != NULL) delete degree_handler; if (vertex_data_handler != NULL) delete vertex_data_handler; if (memoryshard != NULL) { delete memoryshard; memoryshard = NULL; } for(int i=0; i < (int)sliding_shards.size(); i++) { if (sliding_shards[i] != NULL) { delete sliding_shards[i]; } sliding_shards[i] = NULL; } degree_handler = NULL; vertex_data_handler = NULL; delete iomgr; } protected: virtual degree_data * create_degree_handler() { return new degree_data(base_filename, iomgr); } virtual bool disable_preloading() { return false; } /** * Try to find suitable shards by trying with different * shard numbers. Looks up to shard number 2000. */ int discover_shard_num() { #ifndef DYNAMICEDATA int _nshards = find_shards<EdgeDataType>(base_filename); #else int _nshards = find_shards<int>(base_filename); #endif if (_nshards == 0) { logstream(LOG_ERROR) << "Could not find suitable shards - maybe you need to run sharder to create them?" << std::endl; logstream(LOG_ERROR) << "Was looking with filename [" << base_filename << "]" << std::endl; logstream(LOG_ERROR) << "You need to create the shards with edge data-type of size " << sizeof(EdgeDataType) << " bytes." << std::endl; logstream(LOG_ERROR) << "To specify the number of shards, use command-line parameter 'nshards'" << std::endl; assert(0); } return _nshards; } virtual void initialize_sliding_shards() { assert(sliding_shards.size() == 0); for(int p=0; p < nshards; p++) { #ifndef DYNAMICEDATA std::string edata_filename = filename_shard_edata<EdgeDataType>(base_filename, p, nshards); std::string adj_filename = filename_shard_adj(base_filename, p, nshards); /* Let the IO manager know that we will be reading these files, and it should decide whether to preload them or not. */ iomgr->allow_preloading(edata_filename); iomgr->allow_preloading(adj_filename); #else std::string edata_filename = filename_shard_edata<int>(base_filename, p, nshards); std::string adj_filename = filename_shard_adj(base_filename, p, nshards); #endif sliding_shards.push_back( new slidingshard_t(iomgr, edata_filename, adj_filename, intervals[p].first, intervals[p].second, blocksize, m, !modifies_outedges, only_adjacency)); if (!only_adjacency) nedges += sliding_shards[sliding_shards.size() - 1]->num_edges(); } } virtual void initialize_scheduler() { if (use_selective_scheduling) { if (scheduler != NULL) delete scheduler; scheduler = new bitset_scheduler((int) num_vertices()); scheduler->add_task_to_all(); } else { scheduler = NULL; } } /** * If the data is only in one shard, we can just * keep running from memory. */ bool is_inmemory_mode() { return nshards == 1; } /** * Extends the window to fill the memory budget, but not over maxvid */ virtual vid_t determine_next_window(vid_t iinterval, vid_t fromvid, vid_t maxvid, size_t membudget) { /* Load degrees */ degree_handler->load(fromvid, maxvid); /* If is in-memory-mode, memory budget is not considered. */ if (is_inmemory_mode()) { return maxvid; } else { size_t memreq = 0; int max_interval = maxvid - fromvid; for(int i=0; i < max_interval; i++) { degree deg = degree_handler->get_degree(fromvid + i); int inc = deg.indegree; int outc = deg.outdegree; // Raw data and object cost included memreq += sizeof(svertex_t) + (sizeof(EdgeDataType) + sizeof(vid_t) + sizeof(graphchi_edge<EdgeDataType>))*(outc + inc); if (memreq > membudget) { logstream(LOG_DEBUG) << "Memory budget exceeded with " << memreq << " bytes." << std::endl; return fromvid + i - 1; // Previous was enough } } return maxvid; } } /** * Calculates the exact number of edges * required to load in the subinterval. */ size_t num_edges_subinterval(vid_t st, vid_t en) { size_t num_edges = 0; int nvertices = en - st + 1; if (scheduler != NULL) { for(int i=0; i < nvertices; i++) { bool is_sched = scheduler->is_scheduled(st + i); if (is_sched) { degree d = degree_handler->get_degree(st + i); num_edges += d.indegree * store_inedges + d.outdegree; } } } else { for(int i=0; i < nvertices; i++) { degree d = degree_handler->get_degree(st + i); num_edges += d.indegree * store_inedges + d.outdegree; } } return num_edges; } virtual void load_before_updates(std::vector<svertex_t> &vertices) { omp_set_num_threads(load_threads); #pragma omp parallel for schedule(dynamic, 1) for(int p=-1; p < nshards; p++) { if (p==(-1)) { /* Load memory shard */ if (!memoryshard->loaded()) { memoryshard->load(); } /* Load vertex edges from memory shard */ memoryshard->load_vertices(sub_interval_st, sub_interval_en, vertices); /* Load vertices */ vertex_data_handler->load(sub_interval_st, sub_interval_en); /* Load vertices */ if (!disable_vertexdata_storage) { vertex_data_handler->load(sub_interval_st, sub_interval_en); } } else { /* Load edges from a sliding shard */ if (p != exec_interval) { sliding_shards[p]->read_next_vertices((int) vertices.size(), sub_interval_st, vertices, scheduler != NULL && chicontext.iteration == 0); } } } /* Wait for all reads to complete */ iomgr->wait_for_reads(); } void exec_updates(GraphChiProgram<VertexDataType, EdgeDataType, svertex_t> &userprogram, std::vector<svertex_t> &vertices) { metrics_entry me = m.start_time(); size_t nvertices = vertices.size(); if (!enable_deterministic_parallelism) { for(int i=0; i < (int)nvertices; i++) vertices[i].parallel_safe = true; } omp_set_num_threads(exec_threads); #pragma omp parallel sections { #pragma omp section { #pragma omp parallel for schedule(dynamic) for(int vid=sub_interval_st; vid <= (int)sub_interval_en; vid++) { svertex_t & v = vertices[vid - sub_interval_st]; if (exec_threads == 1 || v.parallel_safe) { if (!disable_vertexdata_storage) v.dataptr = vertex_data_handler->vertex_data_ptr(vid); if (v.scheduled) userprogram.update(v, chicontext); } } } #pragma omp section { if (exec_threads > 1 && enable_deterministic_parallelism) { int nonsafe_count = 0; for(int vid=sub_interval_st; vid <= (int)sub_interval_en; vid++) { svertex_t & v = vertices[vid - sub_interval_st]; if (!v.parallel_safe && v.scheduled) { if (!disable_vertexdata_storage) v.dataptr = vertex_data_handler->vertex_data_ptr(vid); userprogram.update(v, chicontext); nonsafe_count++; } } m.add("serialized-updates", nonsafe_count); } } } m.stop_time(me, "execute-updates"); } /** Special method for running all iterations with the same vertex-vector. This is a hacky solution. FIXME: this does not work well with deterministic parallelism. Needs a a separate analysis phase to check which vertices can be run in parallel, and then run it in chunks. Not difficult. **/ void exec_updates_inmemory_mode(GraphChiProgram<VertexDataType, EdgeDataType, svertex_t> &userprogram, std::vector<svertex_t> &vertices) { work = nupdates = 0; for(iter=0; iter<niters; iter++) { logstream(LOG_INFO) << "In-memory mode: Iteration " << iter << " starts." << std::endl; chicontext.iteration = iter; userprogram.before_iteration(iter, chicontext); userprogram.before_exec_interval(0, (int)num_vertices(), chicontext); if (use_selective_scheduling) { if (iter > 0 && !scheduler->has_new_tasks) { logstream(LOG_INFO) << "No new tasks to run!" << std::endl; break; } for(int i=0; i < (int)vertices.size(); i++) { // Could, should parallelize if (iter == 0 || scheduler->is_scheduled(i)) { vertices[i].scheduled = true; nupdates++; work += vertices[i].inc + vertices[i].outc; } else { vertices[i].scheduled = false; } } scheduler->has_new_tasks = false; // Kind of misleading since scheduler may still have tasks - but no new tasks. scheduler->remove_tasks(0, (int)num_vertices()); } else { nupdates += num_vertices(); work += num_edges(); } exec_updates(userprogram, vertices); load_after_updates(vertices); userprogram.after_exec_interval(0, (int)num_vertices(), chicontext); userprogram.after_iteration(iter, chicontext); if (chicontext.last_iteration > 0 && chicontext.last_iteration <= iter){ logstream(LOG_INFO)<<"Stopping engine since last iteration was set to: " << chicontext.last_iteration << std::endl; break; } } } virtual void init_vertices(std::vector<svertex_t> &vertices, graphchi_edge<EdgeDataType> * &edata) { size_t nvertices = vertices.size(); /* Compute number of edges */ size_t num_edges = num_edges_subinterval(sub_interval_st, sub_interval_en); /* Allocate edge buffer */ edata = (graphchi_edge<EdgeDataType>*) malloc(num_edges * sizeof(graphchi_edge<EdgeDataType>)); /* Assign vertex edge array pointers */ size_t ecounter = 0; for(int i=0; i < (int)nvertices; i++) { degree d = degree_handler->get_degree(sub_interval_st + i); int inc = d.indegree; int outc = d.outdegree; vertices[i] = svertex_t(sub_interval_st + i, &edata[ecounter], &edata[ecounter + inc * store_inedges], inc, outc); if (scheduler != NULL) { bool is_sched = ( scheduler->is_scheduled(sub_interval_st + i)); if (is_sched) { vertices[i].scheduled = true; nupdates++; ecounter += inc * store_inedges + outc; } } else { nupdates++; vertices[i].scheduled = true; ecounter += inc * store_inedges + outc; } } work += ecounter; assert(ecounter <= num_edges); } void save_vertices(std::vector<svertex_t> &vertices) { if (disable_vertexdata_storage) return; size_t nvertices = vertices.size(); bool modified_any_vertex = false; for(int i=0; i < (int)nvertices; i++) { if (vertices[i].modified) { modified_any_vertex = true; break; } } if (modified_any_vertex) { vertex_data_handler->save(); } } virtual void load_after_updates(std::vector<svertex_t> &vertices) { // Do nothing. } virtual void write_delta_log() { // Write delta log std::string deltafname = iomgr->multiplexprefix(0) + base_filename + ".deltalog"; FILE * df = fopen(deltafname.c_str(), (chicontext.iteration == 0 ? "w" : "a")); fprintf(df, "%d,%lu,%lu,%lf\n", chicontext.iteration, nupdates, work, chicontext.get_delta()); fclose(df); } public: virtual std::pair<vid_t, vid_t> get_interval(int i) { return intervals[i]; } /** * Returns first vertex of i'th interval. */ vid_t get_interval_start(int i) { return get_interval(i).first; } /** * Returns last vertex (inclusive) of i'th interval. */ vid_t get_interval_end(int i) { return get_interval(i).second; } virtual size_t num_vertices() { return 1 + intervals[nshards - 1].second; } graphchi_context &get_context() { return chicontext; } virtual int get_nshards() { return nshards; } size_t num_updates() { return nupdates; } /** * Thread-safe version of num_edges */ virtual size_t num_edges_safe() { return num_edges(); } virtual size_t num_buffered_edges() { return 0; } /** * Counts the number of edges from shard sizes. */ virtual size_t num_edges() { if (sliding_shards.size() == 0) { logstream(LOG_ERROR) << "engine.num_edges() can be called only after engine has been started. To be fixed later. As a workaround, put the engine into a global variable, and query the number afterwards in begin_iteration(), for example." << std::endl; assert(false); } if (only_adjacency) { // TODO: fix. logstream(LOG_ERROR) << "Asked number of edges, but engine was run without edge-data." << std::endl; return 0; } return nedges; } /** * Checks whether any vertex is scheduled in the given interval. * If no scheduler is configured, returns always true. */ // TODO: support for a minimum fraction of scheduled vertices bool is_any_vertex_scheduled(vid_t st, vid_t en) { if (scheduler == NULL) return true; for(vid_t v=st; v<=en; v++) { if (scheduler->is_scheduled(v)) { return true; } } return false; } virtual void initialize_iter() { // Do nothing } virtual void initialize_before_run() { if (reset_vertexdata) { vertex_data_handler->clear(num_vertices()); } } virtual memshard_t * create_memshard(vid_t interval_st, vid_t interval_en) { #ifndef DYNAMICEDATA return new memshard_t(this->iomgr, filename_shard_edata<EdgeDataType>(base_filename, exec_interval, nshards), filename_shard_adj(base_filename, exec_interval, nshards), interval_st, interval_en, blocksize, m); #else return new memshard_t(this->iomgr, filename_shard_edata<int>(base_filename, exec_interval, nshards), filename_shard_adj(base_filename, exec_interval, nshards), interval_st, interval_en, blocksize, m); #endif } /** * Run GraphChi program, specified as a template * parameter. * @param niters number of iterations */ void run(GraphChiProgram<VertexDataType, EdgeDataType, svertex_t> &userprogram, int _niters) { m.start_time("runtime"); if (degree_handler == NULL) degree_handler = create_degree_handler(); niters = _niters; logstream(LOG_INFO) << "GraphChi starting" << std::endl; logstream(LOG_INFO) << "Licensed under the Apache License 2.0" << std::endl; logstream(LOG_INFO) << "Copyright Aapo Kyrola et al., Carnegie Mellon University (2012)" << std::endl; if (vertex_data_handler == NULL) vertex_data_handler = new vertex_data_store<VertexDataType>(base_filename, num_vertices(), iomgr); initialize_before_run(); /* Setup */ if (sliding_shards.size() == 0) { initialize_sliding_shards(); } else { logstream(LOG_DEBUG) << "Engine being restarted, do not reinitialize." << std::endl; } initialize_scheduler(); omp_set_nested(1); /* Install a 'mock'-scheduler to chicontext if scheduler is not used. */ chicontext.scheduler = scheduler; if (scheduler == NULL) { chicontext.scheduler = new non_scheduler(); } /* Print configuration */ print_config(); /* Main loop */ for(iter=0; iter < niters; iter++) { logstream(LOG_INFO) << "Start iteration: " << iter << std::endl; initialize_iter(); /* Check vertex data file has the right size (number of vertices may change) */ if (!disable_vertexdata_storage) vertex_data_handler->check_size(num_vertices()); /* Keep the context object updated */ chicontext.filename = base_filename; chicontext.iteration = iter; chicontext.num_iterations = niters; chicontext.nvertices = num_vertices(); if (!only_adjacency) chicontext.nedges = num_edges(); chicontext.execthreads = exec_threads; chicontext.reset_deltas(exec_threads); /* Call iteration-begin event handler */ if (!is_inmemory_mode()) // Run sepately userprogram.before_iteration(iter, chicontext); /* Check scheduler. If no scheduled tasks, terminate. */ if (use_selective_scheduling) { if (scheduler != NULL) { if (!scheduler->has_new_tasks) { logstream(LOG_INFO) << "No new tasks to run!" << std::endl; break; } scheduler->has_new_tasks = false; // Kind of misleading since scheduler may still have tasks - but no new tasks. } } /* Interval loop */ for(exec_interval=0; exec_interval < nshards; ++exec_interval) { /* Determine interval limits */ vid_t interval_st = get_interval_start(exec_interval); vid_t interval_en = get_interval_end(exec_interval); if (interval_st > interval_en) continue; // Can happen on very very small graphs. if (!is_inmemory_mode()) userprogram.before_exec_interval(interval_st, interval_en, chicontext); /* Flush stream shard for the exec interval */ sliding_shards[exec_interval]->flush(); iomgr->wait_for_writes(); // Actually we would need to only wait for writes of given shard. TODO. /* Initialize memory shard */ if (memoryshard != NULL) delete memoryshard; memoryshard = create_memshard(interval_st, interval_en); memoryshard->only_adjacency = only_adjacency; sub_interval_st = interval_st; logstream(LOG_INFO) << chicontext.runtime() << "s: Starting: " << sub_interval_st << " -- " << interval_en << std::endl; while (sub_interval_st <= interval_en) { modification_lock.lock(); /* Determine the sub interval */ sub_interval_en = determine_next_window(exec_interval, sub_interval_st, std::min(interval_en, sub_interval_st + maxwindow), size_t(membudget_mb) * 1024 * 1024); assert(sub_interval_en >= sub_interval_st); logstream(LOG_INFO) << "Iteration " << iter << "/" << (niters - 1) << ", subinterval: " << sub_interval_st << " - " << sub_interval_en << std::endl; bool any_vertex_scheduled = is_any_vertex_scheduled(sub_interval_st, sub_interval_en); if (!any_vertex_scheduled) { logstream(LOG_INFO) << "No vertices scheduled, skip." << std::endl; sub_interval_st = sub_interval_en + 1; modification_lock.unlock(); continue; } /* Initialize vertices */ int nvertices = sub_interval_en - sub_interval_st + 1; graphchi_edge<EdgeDataType> * edata = NULL; std::vector<svertex_t> vertices(nvertices, svertex_t()); init_vertices(vertices, edata); /* Now clear scheduler bits for the interval */ if (scheduler != NULL) scheduler->remove_tasks(sub_interval_st, sub_interval_en); /* Load data */ load_before_updates(vertices); modification_lock.unlock(); logstream(LOG_INFO) << "Start updates" << std::endl; /* Execute updates */ if (!is_inmemory_mode()) { exec_updates(userprogram, vertices); /* Load phase after updates (used by the functional engine) */ load_after_updates(vertices); } else { exec_updates_inmemory_mode(userprogram, vertices); } logstream(LOG_INFO) << "Finished updates" << std::endl; /* Save vertices */ if (!disable_vertexdata_storage) { save_vertices(vertices); } sub_interval_st = sub_interval_en + 1; /* Delete edge buffer. TODO: reuse. */ if (edata != NULL) { delete edata; edata = NULL; } } // while subintervals if (memoryshard->loaded() && !is_inmemory_mode()) { logstream(LOG_INFO) << "Commit memshard" << std::endl; memoryshard->commit(modifies_inedges, modifies_outedges); sliding_shards[exec_interval]->set_offset(memoryshard->offset_for_stream_cont(), memoryshard->offset_vid_for_stream_cont(), memoryshard->edata_ptr_for_stream_cont()); delete memoryshard; memoryshard = NULL; } if (!is_inmemory_mode()) userprogram.after_exec_interval(interval_st, interval_en, chicontext); } // For exec_interval if (!is_inmemory_mode()) // Run sepately userprogram.after_iteration(iter, chicontext); /* Move the sliding shard of the current interval to correct position and flush writes of all shards for next iteration. */ for(int p=0; p<nshards; p++) { sliding_shards[p]->flush(); sliding_shards[p]->set_offset(0, 0, 0); } iomgr->wait_for_writes(); /* Write progress log */ write_delta_log(); /* Check if user has defined a last iteration */ if (chicontext.last_iteration >= 0) { niters = chicontext.last_iteration + 1; logstream(LOG_DEBUG) << "Last iteration is now: " << (niters-1) << std::endl; } iteration_finished(); } // Iterations // Commit preloaded shards if (preload_commit) iomgr->commit_preloaded(); m.stop_time("runtime"); m.set("updates", nupdates); m.set("work", work); m.set("nvertices", num_vertices()); m.set("execthreads", (size_t)exec_threads); m.set("loadthreads", (size_t)load_threads); #ifndef GRAPHCHI_DISABLE_COMPRESSION m.set("compression", 1); #endif m.set("scheduler", (size_t)use_selective_scheduling); m.set("niters", niters); // Stop HTTP admin } virtual void iteration_finished() { // Do nothing } stripedio * get_iomanager() { return iomgr; } virtual void set_modifies_inedges(bool b) { modifies_inedges = b; } virtual void set_modifies_outedges(bool b) { modifies_outedges = b; } virtual void set_only_adjacency(bool b) { only_adjacency = b; } virtual void set_preload_commit(bool b){ preload_commit = b; } /** * Configure the blocksize used when loading shards. * Default is one megabyte. * @param blocksize_in_bytes the blocksize in bytes */ void set_blocksize(size_t blocksize_in_bytes) { blocksize = blocksize_in_bytes; } /** * Set the amount of memory available for loading graph * data. Default is 1000 megabytes. * @param mbs amount of memory to be used. */ void set_membudget_mb(int mbs) { membudget_mb = mbs; } void set_load_threads(int lt) { load_threads = lt; } void set_exec_threads(int et) { exec_threads = et; } /** * Sets whether the engine is run in the deterministic * mode. Default true. */ void set_enable_deterministic_parallelism(bool b) { #ifdef DYNAMICEDATA if (!b) { logstream(LOG_ERROR) << "With dynamic edge data, you cannot disable determinic parallelism." << std::endl; logstream(LOG_ERROR) << "Otherwise race conditions would corrupt the structure of the data." << std::endl; assert(b); return; } #endif enable_deterministic_parallelism = b; } public: void set_disable_vertexdata_storage() { this->disable_vertexdata_storage = true; } void set_enable_vertexdata_storage() { this->disable_vertexdata_storage = false; } void set_maxwindow(unsigned int _maxwindow){ maxwindow = _maxwindow; }; protected: virtual void _load_vertex_intervals() { load_vertex_intervals(base_filename, nshards, intervals); } protected: mutex httplock; std::map<std::string, std::string> json_params; public: /** * Replace all shards with zero values in edges. */ template<typename ET> void reinitialize_edge_data(ET zerovalue) { for(int p=0; p < nshards; p++) { std::string edatashardname = filename_shard_edata<ET>(base_filename, p, nshards); std::string dirname = dirname_shard_edata_block(edatashardname, blocksize); size_t edatasize = get_shard_edata_filesize<ET>(edatashardname); logstream(LOG_INFO) << "Clearing data: " << edatashardname << " bytes: " << edatasize << std::endl; int nblocks = (edatasize / blocksize) + (edatasize % blocksize == 0 ? 0 : 1); for(int i=0; i < nblocks; i++) { std::string block_filename = filename_shard_edata_block(edatashardname, i, blocksize); int len = (int) std::min(edatasize - i * blocksize, blocksize); int f = open(block_filename.c_str(), O_RDWR | O_CREAT, S_IROTH | S_IWOTH | S_IWUSR | S_IRUSR); ET * buf = (ET *) malloc(len); for(int i=0; i < (int) (len / sizeof(ET)); i++) { buf[i] = zerovalue; } write_compressed(f, buf, len); free(buf); close(f); #ifdef DYNAMICEDATA write_block_uncompressed_size(block_filename, len); #endif } } } /** * If true, the vertex data is initialized before * the engineis started. Default false. */ void set_reset_vertexdata(bool reset) { reset_vertexdata = reset; } /** * HTTP admin management */ void set_json(std::string key, std::string value) { httplock.lock(); json_params[key] = value; httplock.unlock(); } template <typename T> void set_json(std::string key, T val) { std::stringstream ss; ss << val; set_json(key, ss.str()); } std::string get_info_json() { std::stringstream json; json << "{"; json << "\"file\" : \"" << base_filename << "\",\n"; json << "\"numOfShards\": " << nshards << ",\n"; json << "\"iteration\": " << chicontext.iteration << ",\n"; json << "\"numIterations\": " << chicontext.num_iterations << ",\n"; json << "\"runTime\": " << chicontext.runtime() << ",\n"; json << "\"updates\": " << nupdates << ",\n"; json << "\"nvertices\": " << chicontext.nvertices << ",\n"; json << "\"interval\":" << exec_interval << ",\n"; json << "\"windowStart\":" << sub_interval_st << ","; json << "\"windowEnd\": " << sub_interval_en << ","; json << "\"shards\": ["; for(int p=0; p < (int)nshards; p++) { if (p>0) json << ","; json << "{"; json << "\"p\": " << p << ", "; json << sliding_shards[p]->get_info_json(); json << "}"; } json << "]"; json << "}"; return json.str(); } }; }; #endif
09jijiangwen-download
src/engine/graphchi_engine.hpp
C++
asf20
42,477
/** * @file * @author Aapo Kyrola <akyrola@cs.cmu.edu> * @version 1.0 * * @section LICENSE * * Copyright [2012] [Aapo Kyrola, Guy Blelloch, Carlos Guestrin / Carnegie Mellon University] * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * @section DESCRIPTION * * Bitset scheduler. */ #ifndef DEF_GRAPHCHI_BITSETSCHEDULER #define DEF_GRAPHCHI_BITSETSCHEDULER #include "graphchi_types.hpp" #include "api/ischeduler.hpp" #include "util/dense_bitset.hpp" namespace graphchi { class bitset_scheduler : public ischeduler { private: dense_bitset bitset; public: bool has_new_tasks; bitset_scheduler(int nvertices) : bitset(nvertices) { } virtual ~bitset_scheduler() {} inline void add_task(vid_t vertex) { bitset.set_bit(vertex); has_new_tasks = true; } void resize(vid_t maxsize) { bitset.resize(maxsize); } inline bool is_scheduled(vid_t vertex) { return bitset.get(vertex); } inline void remove_task(vid_t vertex) { bitset.clear_bit(vertex); } void remove_tasks(vid_t fromvertex, vid_t tovertex) { bitset.clear_bits(fromvertex, tovertex); } void add_task_to_all() { has_new_tasks = true; bitset.setall(); } }; } #endif
09jijiangwen-download
src/engine/bitset_scheduler.hpp
C++
asf20
1,976
/** * @file * @author Aapo Kyrola <akyrola@cs.cmu.edu> * @version 1.0 * * @section LICENSE * * Copyright [2012] [Aapo Kyrola, Guy Blelloch, Carlos Guestrin / Carnegie Mellon University] * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * @section DESCRIPTION * * Edge buffers used by the dynamic graph engine. */ #ifndef DEF_GRAPHCHI_EDGEBUFFERS #define DEF_GRAPHCHI_EDGEBUFFERS #include <stdlib.h> #include <vector> namespace graphchi { /** * Class for buffered edges. These are edges that * are currently in memory, and waiting to be commited to disk. */ template <typename EdgeDataType> struct created_edge { vid_t src; vid_t dst; EdgeDataType data; bool accounted_for_outc; bool accounted_for_inc; created_edge(vid_t src, vid_t dst, EdgeDataType _data) : src(src), dst(dst), data(_data), accounted_for_outc(false), accounted_for_inc(false) {} }; #define EDGE_BUFFER_CHUNKSIZE 65536 /** * Efficient chunked edge-buffer with very low memory-overhead (compared * to just using a std-vector. */ template <typename ET> class edge_buffer_flat { unsigned int count; std::vector<created_edge<ET> *> bufs; public: edge_buffer_flat() : count(0) { } ~edge_buffer_flat() { clear(); } void clear() { for(int i=0; i< (int)bufs.size(); i++) { free(bufs[i]); } bufs.clear(); count = 0; } unsigned int size() { return count; } created_edge<ET> * operator[](unsigned int i) { return &bufs[i / EDGE_BUFFER_CHUNKSIZE][i % EDGE_BUFFER_CHUNKSIZE]; } void add(vid_t src, vid_t dst, ET data) { add(created_edge<ET>(src, dst, data)); } void add(created_edge<ET> cedge) { int idx = count++; int bufidx = idx / EDGE_BUFFER_CHUNKSIZE; if (bufidx == (int) bufs.size()) { bufs.push_back((created_edge<ET>*)calloc(sizeof(created_edge<ET>), EDGE_BUFFER_CHUNKSIZE)); } bufs[bufidx][idx % EDGE_BUFFER_CHUNKSIZE] = cedge; } private: // Disable value copying edge_buffer_flat(const edge_buffer_flat&); edge_buffer_flat& operator=(const edge_buffer_flat&); }; }; #endif
09jijiangwen-download
src/engine/dynamic_graphs/edgebuffers.hpp
C++
asf20
3,057
/** * @file * @author Aapo Kyrola <akyrola@cs.cmu.edu> * @version 1.0 * * @section LICENSE * * Copyright [2012] [Aapo Kyrola, Guy Blelloch, Carlos Guestrin / Carnegie Mellon University] * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * @section DESCRIPTION * * Engine for graphs that change. This is in alpha-stage now. */ #ifndef GRAPHCHI_DYNAMICGRAPHENGINE_DEF #define GRAPHCHI_DYNAMICGRAPHENGINE_DEF #include <stdlib.h> #include <vector> #include "engine/graphchi_engine.hpp" #include "engine/dynamic_graphs/edgebuffers.hpp" #include "logger/logger.hpp" namespace graphchi { /** * The actual engine */ template <typename VertexDataType, typename EdgeDataType, typename svertex_t = graphchi_vertex<VertexDataType, EdgeDataType> > class graphchi_dynamicgraph_engine : public graphchi_engine<VertexDataType, EdgeDataType, svertex_t> { public: typedef graphchi_engine<VertexDataType, EdgeDataType> base_engine; typedef edge_buffer_flat<EdgeDataType> edge_buffer; graphchi_dynamicgraph_engine(std::string base_filename, int nshards, bool selective_scheduling, metrics &_m) : graphchi_engine<VertexDataType, EdgeDataType, svertex_t>(base_filename, nshards, selective_scheduling, _m){ _m.set("engine", "dynamicgraphs"); added_edges = 0; maxshardsize = 200 * 1024 * 1024; } protected: /** * Bookkeeping of buffered and deleted edges. */ std::vector< std::vector< edge_buffer * > > new_edge_buffers; std::vector<int> deletecounts; std::vector<std::string> shard_suffices; vid_t max_vertex_id; size_t max_edge_buffer; size_t last_commit; size_t added_edges; std::string state; size_t maxshardsize; size_t edges_in_shards; size_t orig_edges; /** * Concurrency control */ mutex schedulerlock; mutex shardlock; /** * Preloading will interfere with the operation. */ virtual bool disable_preloading() { return true; } /** * Create a dynamic version of the degree file. */ virtual degree_data * create_degree_handler() { /* FIXME: This is bad software design - we should not have a filename dependency here. */ std::string orig_degree_file = filename_degree_data(this->base_filename); std::string dynsuffix = ".dynamic"; std::string dynamic_degree_file = filename_degree_data(this->base_filename + dynsuffix); cp(orig_degree_file, dynamic_degree_file); return new degree_data(this->base_filename + dynsuffix, this->iomgr); } virtual size_t num_edges() { shardlock.lock(); size_t ne = 0; for(int i=0; i < this->nshards; i++) { ne += this->sliding_shards[i]->num_edges(); for(int j=0; j < (int) new_edge_buffers[i].size(); j++) ne += new_edge_buffers[i][j]->size(); } shardlock.unlock(); return ne; } public: size_t num_edges_safe() { return added_edges + orig_edges; } size_t num_buffered_edges() { return added_edges - last_commit; } protected: void init_buffers() { max_edge_buffer = get_option_long("max_edgebuffer_mb", 1000) * 1024 * 1024 / sizeof(created_edge<EdgeDataType>); // Save old so if there are existing edges, they can be moved std::vector< std::vector< edge_buffer * > > tmp_new_edge_buffers; for(int i=0; i < this->nshards; i++) { std::vector<edge_buffer *> shardbuffers = std::vector<edge_buffer *>(); for(int j=0; j < this->nshards; j++) { shardbuffers.push_back(new edge_buffer()); } tmp_new_edge_buffers.push_back(shardbuffers); } // Move old edges. This is not the fastest way... but takes only about 0.05 secs // on the twitter experiment int i = 0; for(typename std::vector< std::vector< edge_buffer * > >::iterator oldit = new_edge_buffers.begin(); oldit != new_edge_buffers.end(); ++oldit) { for(typename std::vector< edge_buffer *>::iterator bufit = oldit->begin(); bufit != oldit->end(); ++bufit) { edge_buffer &buffer_for_window = **bufit; for(unsigned int ebi = 0; ebi < buffer_for_window.size(); ebi++ ) { created_edge<EdgeDataType> * edge = buffer_for_window[ebi]; int shard = get_shard_for(edge->dst); int srcshard = get_shard_for(edge->src); i++; tmp_new_edge_buffers[shard][srcshard]->add(*edge); } delete *bufit; } } std::cout << "TRANSFERRED " << i << " EDGES OVER." << std::endl; new_edge_buffers = tmp_new_edge_buffers; } /** * In the beginning of run, we copy the shards into dynamic versions. */ // Should be changed to read the file in smaller chunks size_t cp(std::string origfile, std::string dstfile, bool zeroout=false) { char * buf; int f = open(origfile.c_str(), O_RDONLY); size_t len = readfull(f, &buf); std::cout << "Length: " << len << std::endl; std::cout << origfile << " ----> " << dstfile << std::endl; close(f); remove(dstfile.c_str()); int of = open(dstfile.c_str(), O_WRONLY | O_CREAT, S_IROTH | S_IWOTH | S_IWUSR | S_IRUSR); assert(of >= 0); if (zeroout) { memset(buf, 0, len); } writea(of, buf, len); assert(get_filesize(origfile) == get_filesize(dstfile)); close(of); free(buf); return len; } // Copy the edata directory void cpedata(std::string origfile, std::string dstfile, bool zeroout=false) { cp(origfile + ".size", dstfile + ".size"); std::string dirname = dirname_shard_edata_block(dstfile, base_engine::blocksize); mkdir(dirname.c_str(), 0777); size_t edatasize = get_shard_edata_filesize<EdgeDataType>(origfile); int nblocks = (int) ((edatasize / base_engine::blocksize) + (edatasize % base_engine::blocksize == 0 ? 0 : 1)); for(int i=0; i < nblocks; i++) { std::string origblockname = filename_shard_edata_block(origfile, i, base_engine::blocksize); std::string dstblockname = filename_shard_edata_block(dstfile, i, base_engine::blocksize); cp(origblockname, dstblockname); } } virtual typename base_engine::memshard_t * create_memshard(vid_t interval_st, vid_t interval_en) { int p = this->exec_interval; std::string adj_filename = filename_shard_adj(this->base_filename, 0, 0) + ".dyngraph" + shard_suffices[p]; std::string edata_filename = filename_shard_edata<EdgeDataType>(this->base_filename, 0, 0) + ".dyngraph" + shard_suffices[p]; return new typename base_engine::memshard_t(this->iomgr, edata_filename, adj_filename, interval_st, interval_en, base_engine::blocksize, this->m); } /** * Initialize streaming shards in the start of each iteration. */ virtual void initialize_sliding_shards() { state = "initialize-shards"; shardlock.lock(); if (this->sliding_shards.empty()) { for(int p=0; p < this->nshards; p++) { std::string adj_filename = filename_shard_adj(this->base_filename, 0, 0) + ".dyngraph" + shard_suffices[p]; std::string edata_filename = filename_shard_edata<EdgeDataType>(this->base_filename, 0, 0) + ".dyngraph" + shard_suffices[p]; this->sliding_shards.push_back( new typename base_engine::slidingshard_t(this->iomgr, edata_filename, adj_filename, this->intervals[p].first, this->intervals[p].second, this->blocksize, this->m, !this->modifies_outedges, false)); } } else { for(int p=0; p < this->nshards; p++) { if (this->sliding_shards[p] == NULL) { std::string adj_filename = filename_shard_adj(this->base_filename, 0, 0) + ".dyngraph" + shard_suffices[p]; std::string edata_filename = filename_shard_edata<EdgeDataType>(this->base_filename, 0, 0) + ".dyngraph" + shard_suffices[p]; this->sliding_shards[p] = new typename base_engine::slidingshard_t(this->iomgr, edata_filename, adj_filename, this->intervals[p].first, this->intervals[p].second, this->blocksize, this->m, !this->modifies_outedges, false); } } } shardlock.unlock(); edges_in_shards = num_edges(); if (orig_edges == 0) orig_edges = edges_in_shards; } void prepare_clean_slate() { logstream(LOG_INFO) << "Preparing clean slate..." << std::endl; for(int shard=0; shard < this->nshards; shard++) { shard_suffices.push_back(get_part_str(shard, this->nshards)); std::string edata_filename = filename_shard_edata<EdgeDataType>(this->base_filename, shard, this->nshards); std::string adj_filename = filename_shard_adj(this->base_filename, shard, this->nshards); std::string dest_adj = filename_shard_adj(this->base_filename, 0, 0) + ".dyngraph" + shard_suffices[shard]; std::string dest_edata = filename_shard_edata<EdgeDataType>(this->base_filename, 0, 0) + ".dyngraph" + shard_suffices[shard]; cpedata(edata_filename, dest_edata, true); cp(adj_filename, dest_adj); } } int get_shard_for(vid_t dst) { for(int i=0; i < this->nshards; i++) { if (dst >= this->intervals[i].first && dst <= this->intervals[i].second) { return i; } } return this->nshards - 1; // Last shard } public: bool add_edge(vid_t src, vid_t dst, EdgeDataType edata) { if (src == dst) { logstream(LOG_WARNING) << "WARNING : tried to add self-edge!" << std::endl; return true; } if (this->iter < 1) { logstream(LOG_WARNING) << "Tried to add edge before first iteration has passed" << std::endl; usleep(1000000); return false; } if (added_edges - last_commit > 1.2 * max_edge_buffer) { logstream(LOG_INFO) << "Over 20% of max buffer... hold on...." << std::endl; usleep(1000000); // Sleep 1 sec return false; } this->modification_lock.lock(); added_edges++; int shard = get_shard_for(dst); int srcshard = get_shard_for(src); /* Maintain max vertex id */ vid_t prev_max_id = max_vertex_id; max_vertex_id = std::max(max_vertex_id, dst); max_vertex_id = std::max(max_vertex_id, src); // Extend degree and vertex data files if (max_vertex_id>prev_max_id) { this->degree_handler->ensure_size(this->max_vertex_id); // Expand the file // Expand scheduler if (this->scheduler != NULL) { schedulerlock.lock(); this->scheduler->resize(1 + max_vertex_id); schedulerlock.unlock(); } } // Add edge to buffers new_edge_buffers[shard][srcshard]->add(src, dst, edata); this->modification_lock.unlock(); return true; } void add_task(vid_t vid) { if (this->scheduler != NULL) { this->modification_lock.lock(); this->scheduler->add_task(vid); this->modification_lock.unlock(); } } protected: void incorporate_buffered_edges(int window, vid_t window_st, vid_t window_en, std::vector<svertex_t> & vertices) { // Lock acquired int ncreated = 0; // First outedges for(int shard=0; shard<this->nshards; shard++) { edge_buffer &buffer_for_window = *new_edge_buffers[shard][window]; for(unsigned int ebi=0; ebi<buffer_for_window.size(); ebi++) { created_edge<EdgeDataType> * edge = buffer_for_window[ebi]; if (edge->src >= window_st && edge->src <= window_en) { if (vertices[edge->src-window_st].scheduled) { if (vertices[edge->src-window_st].scheduled) vertices[edge->src-window_st].add_outedge(edge->dst, &edge->data, false); ncreated++; } } } } // Then inedges for(int w=0; w<this->nshards; w++) { edge_buffer &buffer_for_window = *new_edge_buffers[window][w]; for(unsigned int ebi=0; ebi<buffer_for_window.size(); ebi++) { created_edge<EdgeDataType> * edge = buffer_for_window[ebi]; if (edge->dst >= window_st && edge->dst <= window_en) { if (vertices[edge->dst - window_st].scheduled) { assert(edge->data < 1e20); if (vertices[edge->dst-window_st].scheduled) vertices[edge->dst - window_st].add_inedge(edge->src, &edge->data, false); ncreated++; } } } } logstream(LOG_INFO) << "::: Used " << ncreated << " buffered edges." << std::endl; } bool incorporate_new_edge_degrees(int window, vid_t window_st, vid_t window_en) { bool modified = false; // First outedges for(int shard=0; shard < this->nshards; shard++) { edge_buffer &buffer_for_window = *new_edge_buffers[shard][window]; for(unsigned int ebi=0; ebi<buffer_for_window.size(); ebi++) { created_edge<EdgeDataType> * edge = buffer_for_window[ebi]; if (edge->src >= window_st && edge->src <= window_en) { if (!edge->accounted_for_outc) { degree d = this->degree_handler->get_degree(edge->src); d.outdegree++; this->degree_handler->set_degree(edge->src, d); modified = true; edge->accounted_for_outc = true; } } } } // Then inedges for(int w=0; w < this->nshards; w++) { edge_buffer &buffer_for_window = *new_edge_buffers[window][w]; for(unsigned int ebi=0; ebi<buffer_for_window.size(); ebi++) { created_edge<EdgeDataType> * edge = buffer_for_window[ebi]; if (edge->dst >= window_st && edge->dst <= window_en) { if (!edge->accounted_for_inc) { degree d = this->degree_handler->get_degree(edge->dst); d.indegree++; this->degree_handler->set_degree(edge->dst, d); edge->accounted_for_inc = true; modified = true; } } } } return modified; } void adjust_degrees_for_deleted(std::vector< svertex_t > &vertices, vid_t window_st) { #ifdef SUPPORT_DELETIONS bool somechanged = false; for(int i=0; i < (int)vertices.size(); i++) { svertex_t &v = vertices[i]; if (v.scheduled) { this->degree_handler->set_degree(v.id(), v.inc, v.outc); somechanged = somechanged || (v.deleted_inc + v.deleted_outc > 0); degree deg = this->degree_handler->get_degree(v.id()); if (!(deg.indegree >=0 && deg.outdegree >= 0)) { std::cout << "Degree discrepancy: " << deg.indegree << " " << deg.outdegree << std::endl; } assert(deg.indegree >=0 && deg.outdegree >= 0); } } if (somechanged) { this->degree_handler->save(); } #endif } virtual vid_t determine_next_window(vid_t iinterval, vid_t fromvid, vid_t maxvid, size_t membudget) { /* Load degrees */ this->degree_handler->load(fromvid, maxvid); if (incorporate_new_edge_degrees(iinterval, fromvid, maxvid)) { this->degree_handler->save(); } size_t memreq = 0; int max_interval = maxvid - fromvid; for(int i=0; i < max_interval; i++) { degree deg = this->degree_handler->get_degree(fromvid + i); int inc = deg.indegree; int outc = deg.outdegree; // Raw data and object cost included memreq += sizeof(svertex_t) + (sizeof(EdgeDataType) + sizeof(vid_t) + sizeof(graphchi_edge<EdgeDataType>))*(outc + inc); if (memreq > membudget) { return fromvid + i - 1; // Previous was enough } } return maxvid; } virtual void load_before_updates(std::vector<svertex_t> &vertices) { state = "load-edges"; this->base_engine::load_before_updates(vertices); #ifdef SUPPORT_DELETIONS for(unsigned int i=0; i < (unsigned int)vertices.size(); i++) { deletecounts[this->exec_interval] += vertices[i].deleted_inc; } #endif state = "execute-updates"; } virtual void init_vertices(std::vector<svertex_t> &vertices, graphchi_edge<EdgeDataType> * &edata) { base_engine::init_vertices(vertices, edata); incorporate_buffered_edges(this->exec_interval, this->sub_interval_st, this->sub_interval_en, vertices); } virtual void initialize_iter() { this->intervals[this->nshards - 1].second = max_vertex_id; this->vertex_data_handler->check_size(max_vertex_id + 1); initialize_sliding_shards(); /* Deleted edge tracking */ deletecounts.clear(); for(int p=0; p < this->nshards; p++) deletecounts.push_back(0); } virtual void iteration_finished() { if (this->iter < this->niters - 1) { // Flush and restart stream shards before commiting edges for(int p=0; p < this->nshards; p++) { this->sliding_shards[p]->flush(); this->sliding_shards[p]->set_offset(0, 0, 0); } this->iomgr->wait_for_writes(); commit_graph_changes(); } } virtual void initialize_before_run() { prepare_clean_slate(); init_buffers(); max_vertex_id = (vid_t) (this->num_vertices() - 1); this->vertex_data_handler->clear(this->num_vertices()); orig_edges = 0; } /* */ virtual void load_after_updates(std::vector<svertex_t> &vertices) { this->base_engine::load_after_updates(vertices); adjust_degrees_for_deleted(vertices, this->sub_interval_st); } public: void finish_after_iters(int extra_iters) { this->chicontext.last_iteration = this->chicontext.iteration + extra_iters; } protected: #define BBUF 32000000 /** * Code for committing changes to disk. */ void commit_graph_changes() { // Count deleted size_t ndeleted = 0; for(size_t i=0; i < deletecounts.size(); i++) { ndeleted += deletecounts[i]; } // TODO: remove ad hoc limits, move to configuration. // Perhaps do some cost estimation? logstream(LOG_DEBUG) << "Total deleted: " << ndeleted << " total edges: " << this->num_edges() << std::endl; if (added_edges - last_commit < max_edge_buffer * 0.8 && ndeleted < this->num_edges() * 0.1) { std::cout << "==============================" << std::endl; std::cout << "No time to commit yet.... Only " << (added_edges - last_commit) << " / " << max_edge_buffer << " in buffers" << std::endl; return; } bool rangeschanged = false; state = "commit-ingests"; vid_t maxwindow = 4000000; // FIXME: HARDCODE size_t mem_budget = this->membudget_mb * 1024 * 1024; this->modification_lock.lock(); // Clean up sliding shards // NOTE: there is a problem since this will waste // io-sessions std::vector<int> edgespershard; for(int p=0; p < this->nshards; p++) { edgespershard.push_back(this->sliding_shards[p]->num_edges()); } std::vector<std::pair<vid_t, vid_t> > newranges; std::vector<std::string> newsuffices; char iterstr[128]; sprintf(iterstr, "%d", this->iter); size_t min_buffer_in_shard_to_commit = max_edge_buffer / this->nshards / 2; std::vector<bool> was_commited(this->nshards, true); for(int shard=0; shard < this->nshards; shard++) { std::vector<edge_buffer*> &shard_buffer = new_edge_buffers[shard]; // Check there are any new edges size_t bufedges = 0; for(int w=0; w < this->nshards; w++) { bufedges += shard_buffer[w]->size(); } if (bufedges < min_buffer_in_shard_to_commit && deletecounts[shard] * 1.0 / edgespershard[shard] < 0.2) { logstream(LOG_DEBUG) << shard << ": not enough edges for shard: " << bufedges << " deleted:" << deletecounts[shard] << "/" << edgespershard[shard] << std::endl; newranges.push_back(this->intervals[shard]); newsuffices.push_back(shard_suffices[shard]); was_commited[shard] = false; continue; } else { logstream(LOG_DEBUG) << shard << ": going to rewrite, deleted:" << deletecounts[shard] << "/" << edgespershard[shard] << " bufedges: " << bufedges << std::endl; shardlock.lock(); delete this->sliding_shards[shard]; this->sliding_shards[shard] = NULL; shardlock.unlock(); } std::string origshardfile = filename_shard_edata<EdgeDataType>(this->base_filename, 0, 0) + ".dyngraph" + shard_suffices[shard]; std::string origadjfile = filename_shard_adj(this->base_filename, 0, 0) + ".dyngraph" + shard_suffices[shard]; // Get file size off_t sz = get_shard_edata_filesize<EdgeDataType>(origshardfile); int outparts = ( sz >= (off_t) maxshardsize ? 2 : 1); vid_t splitpos = 0; std::cout << "Size: " << sz << " vs. maxshardsize: " << maxshardsize << std::endl; if (sz > (off_t)maxshardsize) { rangeschanged = true; // Compute number edges (not including ingested ones!) size_t halfedges = (sz / sizeof(EdgeDataType)) / 2; // Correct to include estimate of ingested ones for(int w=0; w < this->nshards; w++) { halfedges += new_edge_buffers[shard][w]->size() / 2; } size_t nedges = 0; vid_t st = this->intervals[shard].first; splitpos = st + (this->intervals[shard].second - st) / 2; bool found = false; while(st < this->intervals[shard].second) { vid_t en = std::min(st + maxwindow, this->intervals[shard].second); this->degree_handler->load(st, en); int nv = en - st + 1; for(int i=0; i<nv; i++) { nedges += this->degree_handler->get_degree(st + i).indegree; if (nedges >= halfedges) { splitpos = i+st-1; found = true; break; } } if (found) break; st = en+1; } assert(splitpos > this->intervals[shard].first && splitpos < this->intervals[shard].second); } for(int splits=0; splits<outparts; splits++) { // Note: this is not super-efficient because we do the operation twice in case of split typename base_engine::slidingshard_t * curshard = new typename base_engine::slidingshard_t(this->iomgr, origshardfile, origadjfile, this->intervals[shard].first, this->intervals[shard].second, base_engine::blocksize, this->m, true); std::string suffix = ""; char partstr[128]; sprintf(partstr, "%d", shard); if (splits == 0) { suffix = std::string(partstr); } else { suffix = std::string(partstr) + ".split"; } suffix = suffix + ".i" + std::string(iterstr); newsuffices.push_back(suffix); std::string outfile_edata = filename_shard_edata<EdgeDataType>(this->base_filename, 0, 0) + ".dyngraph" + suffix; std::string outfile_edata_dirname = dirname_shard_edata_block(outfile_edata, base_engine::blocksize); mkdir(outfile_edata_dirname.c_str(), 0777); std::string outfile_adj = filename_shard_adj(this->base_filename, 0, 0) + ".dyngraph" + suffix; vid_t splitstart = this->intervals[shard].first; vid_t splitend = this->intervals[shard].second; if (shard == this->nshards - 1) splitend = max_vertex_id; // This is looking more and more hacky if (outparts == 2) { if (splits==0) splitend = splitpos; else splitstart = splitpos+1; } newranges.push_back(std::pair<vid_t,vid_t>(splitstart, splitend)); // Create the adj file int f = open(outfile_adj.c_str(), O_WRONLY | O_CREAT, S_IROTH | S_IWOTH | S_IWUSR | S_IRUSR); int err = ftruncate(f, 0); if (err != 0) { logstream(LOG_ERROR) << "Error truncating " << outfile_adj << ", error: " << strerror(errno) << std::endl; } assert(err == 0); /* Create edge data file */ int ef = open(outfile_edata.c_str(), O_WRONLY | O_CREAT, S_IROTH | S_IWOTH | S_IWUSR | S_IRUSR); err = ftruncate(ef, 0); if (err != 0) { logstream(LOG_ERROR) << "Error truncating " << outfile_edata << ", error: " << strerror(errno) << std::endl; } assert(err == 0); char * buf = (char*) malloc(BBUF); char * bufptr = buf; char * ebuf = (char*) malloc(BBUF); char * ebufptr = ebuf; size_t tot_edatabytes = 0; // Now create a new shard file window by window for(int window=0; window < this->nshards; window++) { vid_t range_st = this->intervals[window].first; vid_t range_en = this->intervals[window].second; if (window == this->nshards - 1) range_en = max_vertex_id; edge_buffer &buffer_for_window = *new_edge_buffers[shard][window]; for(vid_t window_st=range_st; window_st<range_en; ) { // Check how much we can read vid_t window_en = determine_next_window(window, window_st, std::min(range_en, window_st + (vid_t)maxwindow), mem_budget); // Create vertices int nvertices = window_en-window_st+1; std::vector< svertex_t > vertices(nvertices, svertex_t()); /* Allocate edge data: to do this, need to compute sum of in & out edges */ graphchi_edge<EdgeDataType> * edata = NULL; size_t num_edges=0; for(int i=0; i<nvertices; i++) { degree d = this->degree_handler->get_degree(i + window_st); num_edges += d.indegree+d.outdegree; } size_t ecounter = 0; edata = (graphchi_edge<EdgeDataType>*)malloc(num_edges * sizeof(graphchi_edge<EdgeDataType>)); for(int i=0; i<(int)nvertices; i++) { // int inc = degrees[i].indegree; degree d = this->degree_handler->get_degree(i + window_st); int outc = d.outdegree; vertices[i] = svertex_t(window_st+i, &edata[ecounter], &edata[ecounter+0], 0, outc); vertices[i].scheduled = true; // guarantee that shard will read it ecounter += 0 + outc; } // Read vertices in curshard->read_next_vertices(nvertices, window_st, vertices, false, true); // Incorporate buffered edges for(unsigned int ebi=0; ebi<buffer_for_window.size(); ebi++) { created_edge<EdgeDataType> * edge = buffer_for_window[ebi]; if (edge->src >= window_st && edge->src <= window_en) { vertices[edge->src-window_st].add_outedge(edge->dst, &edge->data, false); } } this->iomgr->wait_for_reads(); // If we are splitting, need to adjust counts std::vector<int> adjusted_counts(vertices.size(), 0); for(int iv=0; iv< (int)vertices.size(); iv++) adjusted_counts[iv] = vertices[iv].outc; if (outparts == 2) { // do actual counts by removing the edges not in this split for(int iv=0; iv< (int)vertices.size(); iv++) { svertex_t &vertex = vertices[iv]; for(int i=0; i<vertex.outc; i++) { if (!(vertex.outedge(i)->vertexid >= splitstart && vertex.outedge(i)->vertexid <= splitend)) { adjusted_counts[iv]--; } } } } #ifdef SUPPORT_DELETIONS // Adjust counts to remove deleted edges for(int iv=0; iv< (int)vertices.size(); iv++) { svertex_t &vertex = vertices[iv]; for(int i=0; i<vertex.outc; i++) { if (is_deleted_edge_value(vertex.outedge(i)->get_data())) { adjusted_counts[iv]--; assert(false); } } } // Adjust degrees // adjust_degrees_for_deleted(vertices, window_st); // Double counting problem, that is why commented out. #endif size_t ne = 0; for(vid_t curvid=window_st; curvid<=window_en;) { int iv = curvid - window_st; svertex_t &vertex = vertices[iv]; int count = adjusted_counts[iv]; if (count == 0) { // Check how many next ones are zeros int nz=0; curvid++; for(; curvid <= window_en && nz<254; curvid++) { if (adjusted_counts[curvid - window_st] == 0) { nz++; } else { break; } } uint8_t nnz = (uint8_t)nz; // Write zero bwrite<uint8_t>(f, buf, bufptr, 0); bwrite<uint8_t>(f, buf, bufptr, nnz); } else { if (count < 255) { uint8_t x = (uint8_t)count; bwrite<uint8_t>(f, buf, bufptr, x); } else { bwrite<uint8_t>(f, buf, bufptr, 0xff); bwrite<uint32_t>(f, buf, bufptr, (uint32_t)count); } for(int i=0; i<vertex.outc; i++) { if (vertex.outedge(i)->vertexid >= splitstart && vertex.outedge(i)->vertexid <= splitend) { #ifdef SUPPORT_DELETIONS if (is_deleted_edge_value(vertex.outedge(i)->get_data())) { assert(false); } #endif bwrite(f, buf, bufptr, vertex.outedge(i)->vertexid); bwrite_edata<EdgeDataType>(ebuf, ebufptr, vertex.outedge(i)->get_data(), tot_edatabytes, outfile_edata); ne++; } else assert(outparts == 2); } curvid++; } } free(edata); window_st = window_en+1; } } // end window // Flush buffers writea(f, buf, bufptr-buf); edata_flush<EdgeDataType>(ebuf, ebufptr, outfile_edata, tot_edatabytes); // Write .size file for the edata firectory std::string sizefilename = outfile_edata + ".size"; std::ofstream ofs(sizefilename.c_str()); ofs << tot_edatabytes; ofs.close(); // Release free(buf); free(ebuf); delete curshard; close(f); close(ef); this->iomgr->wait_for_writes(); } // splits // Delete old shard std::string old_file_adj = filename_shard_adj(this->base_filename, 0, 0) + ".dyngraph" + shard_suffices[shard]; std::string old_file_edata = filename_shard_edata<EdgeDataType>(this->base_filename, 0, 0) + ".dyngraph" + shard_suffices[shard]; std::string old_blockdir = dirname_shard_edata_block(old_file_edata, base_engine::blocksize); remove(old_file_adj.c_str()); remove(old_blockdir.c_str()); std::string old_sizefilename = old_file_edata + ".size"; remove(old_sizefilename.c_str()); } // Clear buffers for(int shard=0; shard < this->nshards; shard++) { if (was_commited[shard]) { for (int win=0; win < this->nshards; win++) { edge_buffer &buffer_for_window = *new_edge_buffers[shard][win]; for(unsigned int ebi=0; ebi<buffer_for_window.size(); ebi++) { created_edge<EdgeDataType> * edge = buffer_for_window[ebi]; if (!edge->accounted_for_outc) { std::cout << "Edge not accounted (out)! " << edge->src << " -- " << edge->dst << std::endl; } if (!edge->accounted_for_inc) { std::cout << "Edge not accounted (in)! " << edge->src << " -- " << edge->dst << std::endl; } assert(edge->accounted_for_inc); assert(edge->accounted_for_outc); } buffer_for_window.clear(); } } } // Update number of shards: last_commit = added_edges; this->intervals = newranges; shard_suffices = newsuffices; this->nshards = (int) this->intervals.size(); /* If the vertex intervals change, need to recreate the shard objects. */ if (rangeschanged) { shardlock.lock(); for (int i=0; i<(int)this->sliding_shards.size(); i++) { if (this->sliding_shards[i] != NULL) delete this->sliding_shards[i]; } this->sliding_shards.clear(); shardlock.unlock(); } /* Write meta-file with the number of vertices */ std::string numv_filename = base_engine::base_filename + ".numvertices"; FILE * f = fopen(numv_filename.c_str(), "w"); fprintf(f, "%lu\n", base_engine::num_vertices()); fclose(f); init_buffers(); this->modification_lock.unlock(); } template <typename T> void bwrite(int f, char * buf, char * &bufptr, T val) { if (bufptr+sizeof(T)-buf>=BBUF) { writea(f, buf, bufptr-buf); bufptr = buf; } *((T*)bufptr) = val; bufptr += sizeof(T); } template <typename T> void edata_flush(char * buf, char * bufptr, std::string & shard_filename, size_t totbytes) { int blockid = (int) ((totbytes - sizeof(T)) / base_engine::blocksize); int len = (int) (bufptr - buf); assert(len <= (int)base_engine::blocksize); std::string block_filename = filename_shard_edata_block(shard_filename, blockid, base_engine::blocksize); int f = open(block_filename.c_str(), O_RDWR | O_CREAT, S_IROTH | S_IWOTH | S_IWUSR | S_IRUSR); write_compressed(f, buf, len); close(f); } template <typename T> void bwrite_edata(char * buf, char * &bufptr, T val, size_t & totbytes, std::string & shard_filename) { if ((int) (bufptr + sizeof(T) - buf) > (int)base_engine::blocksize) { edata_flush<T>(buf, bufptr, shard_filename, totbytes); bufptr = buf; } totbytes += sizeof(T); *((T*)bufptr) = val; bufptr += sizeof(T); } /** * HTTP admin */ public: std::string get_info_json() { std::stringstream json; this->httplock.lock(); /** * FIXME: too much duplicate with graphchi_engine */ json << "{"; json << "\"state\" : \"" << state << "\",\n"; json << "\"file\" : \"" << this->base_filename << "\",\n"; json << "\"numOfShards\": " << this->nshards << ",\n"; json << "\"iteration\": " << this->chicontext.iteration << ",\n"; json << "\"numIterations\": " << this->chicontext.num_iterations << ",\n"; json << "\"runTime\": " << this->chicontext.runtime() << ",\n"; json << "\"updates\": " << this->nupdates << ",\n"; json << "\"nvertices\": " << this->chicontext.nvertices << ",\n"; json << "\"edges\": " << num_edges_safe() << ",\n"; json << "\"edgesInBuffers\": " << added_edges << ",\n"; json << "\"interval\":" << this->exec_interval << ",\n"; json << "\"windowStart\":" << this->sub_interval_st << ","; json << "\"windowEnd\": " << this->sub_interval_en << ","; json << "\"shards\": ["; shardlock.lock(); for(int p=0; p < (int) this->sliding_shards.size(); p++) { if (p>0) json << ","; typename base_engine::slidingshard_t * shard = this->sliding_shards[p]; if (shard != NULL) { json << "{"; json << "\"p\": " << p << ", "; json << shard->get_info_json(); json << "}"; } else { json << "{"; json << "\"p\": " << p << ", "; json << "\"state\": \"recreated\""; json << "}"; } } shardlock.unlock(); json << "]"; std::map<std::string, std::string>::iterator it; for(it=this->json_params.begin(); it != this->json_params.end(); ++it) { json << ", \"" << it->first << "\":\""; json << it->second << "\""; } json << "}"; this->httplock.unlock(); return json.str(); } }; // End class }; // End namespace #endif
09jijiangwen-download
src/engine/dynamic_graphs/graphchi_dynamicgraph_engine.hpp
C++
asf20
48,240
/** * @file * @author Aapo Kyrola <akyrola@cs.cmu.edu> * @version 1.0 * * @section LICENSE * * Copyright [2012] [Aapo Kyrola, Guy Blelloch, Carlos Guestrin / Carnegie Mellon University] * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * @section DESCRIPTION * * Interface for metrics reporters. */ #ifndef DEF_GRAPHCHI_IMETRICS_REPORTER #define DEF_GRAPHCHI_IMETRICS_REPORTER #include <map> namespace graphchi { class imetrics_reporter { public: virtual void do_report(std::string name, std::string id, std::map<std::string, metrics_entry> & entries) = 0; }; }; #endif
09jijiangwen-download
src/metrics/imetrics_reporter.hpp
C++
asf20
1,143
/** * @file * @author Aapo Kyrola <akyrola@cs.cmu.edu> * @version 1.0 * * @section LICENSE * * Copyright [2012] [Aapo Kyrola, Guy Blelloch, Carlos Guestrin / Carnegie Mellon University] * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * @section DESCRIPTION * * Metrics. */ #ifndef DEF_METRICS_HPP #define DEF_METRICS_HPP #include <cstring> #include <map> #include <vector> #include <limits> #include <assert.h> #include <sys/time.h> #include "util/pthread_tools.hpp" #include "util/cmdopts.hpp" namespace graphchi { enum metrictype {REAL, INTEGER, TIME, STRING, VECTOR}; // Data structure for storing metric entries // NOTE: This data structure is not very optimal, should // of course use inheritance. But for this purpose, // it works fine as the number of metrics entry is small. struct metrics_entry { size_t count; double value; double minvalue; double cumvalue; double maxvalue; metrictype valtype; std::string stringval; std::vector<double> v; timeval start_time; double lasttime; metrics_entry() {} inline metrics_entry(double firstvalue, metrictype _valtype) { minvalue = firstvalue; maxvalue = firstvalue; value = firstvalue; valtype = _valtype; cumvalue = value; count = 1; if (valtype == VECTOR) v.push_back(firstvalue); }; inline metrics_entry(std::string svalue) { valtype = STRING; stringval = svalue; } inline metrics_entry(metrictype _valtype) { valtype = _valtype; count = 0; cumvalue = 0; value = 0; minvalue = std::numeric_limits<double>::max(); maxvalue = std::numeric_limits<double>::min(); } inline void adj(double v) { if (count == 0) { minvalue = v; maxvalue = v; } else { minvalue = std::min(v,minvalue); maxvalue = std::max(v,maxvalue); } } inline void add(double x) { adj(x); value += x; cumvalue += x; ++count; if (valtype == VECTOR) { v.push_back(x); } } inline void set(double v) { adj(v); value = v; cumvalue += v; } inline void set(std::string s) { stringval = s; } inline void add_vector_entry(size_t i, double x) { if (v.size() < i + 1) v.resize(i + 1); count = v.size(); value += x; cumvalue += x; v[i] += x; adj(v[i]); } inline void set_vector_entry(size_t i, double x) { if (v.size() < i + 1) v.resize(i + 1); count = v.size(); value = value - v[i] + x; cumvalue = cumvalue - v[i] + x; v[i] = x; minvalue = x; maxvalue = x; for (size_t i = 0; i < v.size(); ++i) { adj(v[i]); } } inline void timer_start() { gettimeofday(&start_time, NULL); } inline void timer_stop() { timeval end; gettimeofday(&end, NULL); lasttime = end.tv_sec - start_time.tv_sec + ((double)(end.tv_usec - start_time.tv_usec)) / 1.0E6; add(lasttime); } }; class imetrics_reporter { public: virtual ~imetrics_reporter() {} virtual void do_report(std::string name, std::string id, std::map<std::string, metrics_entry> & entries) = 0; }; /** * Metrics instance for logging metrics of a single object type. * Name of the metrics instance is set on construction. */ class metrics { std::string name, ident; std::map<std::string, metrics_entry> entries; mutex mlock; public: inline metrics(std::string _name = "", std::string _id = "") : name(_name), ident (_id) { this->set("app", _name); } inline void clear() { entries.clear(); } inline std::string iterkey(std::string key, int iter) { char s[256]; sprintf(s, "%s.%d", key.c_str(), iter); return std::string(s); } /** * Add to an existing value or create new. */ inline void add(std::string key, double value, metrictype type = REAL) { mlock.lock(); if (entries.count(key) == 0) { entries[key] = metrics_entry(value, type); } else { entries[key].add(value); } mlock.unlock(); } inline void add_to_vector(std::string key, double value) { if (entries.count(key) == 0) { entries[key] = metrics_entry(value, VECTOR); } else { entries[key].add(value); } } inline void add_vector_entry(std::string key, size_t idx, double value) { if (entries.count(key) == 0) { entries[key] = metrics_entry(VECTOR); } entries[key].add_vector_entry(idx, value); } inline void set(std::string key, size_t value) { set(key, (double)value, INTEGER); } inline void set(std::string key, int value) { set(key, (double)value, INTEGER); } inline void set(std::string key, double value, metrictype type = REAL) { if (entries.count(key) == 0) { entries[key] = metrics_entry(value, type); } else { entries[key].set(value); } } inline void set_integer(std::string key, size_t value) { if (entries.count(key) == 0) { entries[key] = metrics_entry((double)value, INTEGER); } else { entries[key].set((double)value); } } inline void set(std::string key, std::string s) { if (entries.count(key) == 0) { entries[key] = metrics_entry(s); } else { entries[key].set(s); } } inline void set_vector_entry_integer(std::string key, size_t idx, size_t value) { set_vector_entry(key, idx, (double)(value)); } inline void set_vector_entry(std::string key, size_t idx, double value) { mlock.lock(); if (entries.count(key) == 0) { entries[key] = metrics_entry(VECTOR); } entries[key].set_vector_entry(idx, value); mlock.unlock(); } inline void start_time(std::string key) { mlock.lock(); if (entries.count(key) == 0) { entries[key] = metrics_entry(TIME); } entries[key].timer_start(); mlock.unlock(); } metrics_entry start_time() { metrics_entry me(TIME); me.timer_start(); return me; } inline void stop_time(metrics_entry me, std::string key, bool show=false) { me.timer_stop(); mlock.lock(); if (entries.count(key) == 0) { entries[key] = metrics_entry(TIME); } entries[key].add(me.lasttime); // not thread safe if (show) std::cout << key << ": " << me.lasttime << " secs." << std::endl; mlock.unlock(); } inline void stop_time(metrics_entry me, std::string key, int iternum, bool show=false) { me.timer_stop(); mlock.lock(); double t = me.lasttime; if (entries.count(key) == 0) { entries[key] = metrics_entry(TIME); } entries[key].add(t); // not thread safe if (show) std::cout << key << ": " << me.lasttime << " secs." << std::endl; char s[256]; sprintf(s, "%s.%d", key.c_str(), iternum); std::string ikey(s); if (entries.count(ikey) == 0) { entries[ikey] = metrics_entry(TIME); } entries[ikey].add(t); mlock.unlock(); } inline void stop_time(std::string key, bool show = false) { entries[key].timer_stop(); if (show) std::cout << key << ": " << entries[key].lasttime << " secs." << std::endl; } inline metrics_entry get(std::string key) { return entries[key]; } void report(imetrics_reporter & reporter) { if (name != "") { reporter.do_report(name, ident, entries); } } }; }; #endif
09jijiangwen-download
src/metrics/metrics.hpp
C++
asf20
8,740
/** * @file * @author Aapo Kyrola <akyrola@cs.cmu.edu> * @version 1.0 * * @section LICENSE * * Copyright [2012] [Aapo Kyrola, Guy Blelloch, Carlos Guestrin / Carnegie Mellon University] * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * @section DESCRIPTION * * Simple metrics reporter that dumps metrics to * standard output. */ #ifndef GRAPHCHI_BASIC_REPORTER #define GRAPHCHI_BASIC_REPORTER #include <iostream> #include <map> #include "metrics/metrics.hpp" /** * Simple metrics reporter that dumps metrics to * standard output. */ namespace graphchi { class basic_reporter : public imetrics_reporter { public: virtual ~basic_reporter() {} virtual void do_report(std::string name, std::string ident, std::map<std::string, metrics_entry> & entries) { // TODO: use reporters if (ident != name) { std::cout << std::endl << " === REPORT FOR " << name << "(" << ident << ") ===" << std::endl; } else { std::cout << std::endl << " === REPORT FOR " << name << " ===" << std::endl; } // First write numeral, then timings, then string entries for(int round=0; round<4; round++) { std::map<std::string, metrics_entry>::iterator it; int c = 0; for(it = entries.begin(); it != entries.end(); ++it) { metrics_entry ent = it->second; switch(ent.valtype) { case REAL: case INTEGER: if (round == 0) { if (c++ == 0) std::cout << "[Numeric]" << std::endl; std::cout << it->first << ":\t\t"; if (ent.count > 1) { std::cout << ent.value << "\t(count: " << ent.count << ", min: " << ent.minvalue << ", max: " << ent.maxvalue << ", avg: " << ent.cumvalue/(double)ent.count << ")" << std::endl; } else { std::cout << ent.value << std::endl; } } break; case TIME: if (round == 1) { if (c++ == 0) std::cout << "[Timings]" << std::endl; std::cout << it->first << ":\t\t"; if (ent.count>1) { std::cout << ent.value << "s\t (count: " << ent.count << ", min: " << ent.minvalue << "s, " << "max: " << ent.maxvalue << ", avg: " << ent.cumvalue/(double)ent.count << "s)" << std::endl; } else { std::cout << ent.value << " s" << std::endl; } } break; case STRING: if (round == 2) { if (c++ == 0) std::cout << "[Other]" << std::endl; std::cout << it->first << ":\t"; std::cout << ent.stringval << std::endl; } break; case VECTOR: if (round == 3) { if (c++ == 0) std::cout << "[Numeric]" << std::endl; std::cout << it->first << ":\t\t"; if (ent.count > 1) { std::cout << ent.value << "\t(count: " << ent.count << ", min: " << ent.minvalue << ", max: " << ent.maxvalue << ", avg: " << ent.cumvalue/(double)ent.count << ")" << std::endl; } else { std::cout << ent.value << std::endl; } std::cout << it->first << ".values:\t\t"; for(size_t j=0; j<ent.v.size(); j++) std::cout << ent.v[j] << ","; std::cout << std::endl; } break; } } } }; }; }; #endif
09jijiangwen-download
src/metrics/reps/basic_reporter.hpp
C++
asf20
4,178
/** * @file * @author Aapo Kyrola <akyrola@cs.cmu.edu> * @version 1.0 * * @section LICENSE * * Copyright [2012] [Aapo Kyrola, Guy Blelloch, Carlos Guestrin / Carnegie Mellon University] * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * @section DESCRIPTION * * File metrics reporter. */ #ifndef DEF_GRAPHCHI_FILE_REPORTER #define DEF_GRAPHCHI_FILE_REPORTER #include <fstream> #include <cstdio> #include "metrics/metrics.hpp" #include "util/cmdopts.hpp" namespace graphchi { class file_reporter : public imetrics_reporter { private: file_reporter() {} std::string filename; FILE * f; public: file_reporter(std::string fname) : filename(fname) { // Create new file f = fopen(fname.c_str(), "w"); assert(f != NULL); } virtual ~file_reporter() {} virtual void do_report(std::string name, std::string ident, std::map<std::string, metrics_entry> & entries) { if (ident != name) { fprintf(f, "[%s:%s]\n", name.c_str(), ident.c_str()); } else { fprintf(f, "[%s]\n", name.c_str()); } std::map<std::string, metrics_entry>::iterator it; for(it = entries.begin(); it != entries.end(); ++it) { metrics_entry ent = it->second; switch(ent.valtype) { case INTEGER: fprintf(f, "%s.%s=%ld\n", ident.c_str(), it->first.c_str(), (long int) (ent.value)); fprintf(f, "%s.%s.count=%lu\n", ident.c_str(), it->first.c_str(), ent.count); fprintf(f, "%s.%s.min=%ld\n", ident.c_str(), it->first.c_str(), (long int) (ent.minvalue)); fprintf(f, "%s.%s.max=%ld\n", ident.c_str(), it->first.c_str(), (long int) (ent.maxvalue)); fprintf(f, "%s.%s.avg=%lf\n", ident.c_str(), it->first.c_str(), ent.cumvalue/ent.count); break; case REAL: case TIME: fprintf(f, "%s.%s=%lf\n", ident.c_str(), it->first.c_str(), (ent.value)); fprintf(f, "%s.%s.count=%lu\n", ident.c_str(), it->first.c_str(), ent.count); fprintf(f, "%s.%s.min=%lf\n", ident.c_str(), it->first.c_str(), (ent.minvalue)); fprintf(f, "%s.%s.max=%lf\n", ident.c_str(), it->first.c_str(), (ent.maxvalue)); fprintf(f, "%s.%s.avg=%lf\n", ident.c_str(), it->first.c_str(), ent.cumvalue/ent.count); break; case STRING: fprintf(f, "%s.%s=%s\n", ident.c_str(), it->first.c_str(), it->second.stringval.c_str()); break; case VECTOR: break; } } fflush(f); fclose(f); // Following code used only for research purposes. if (get_option_int("metrics.insert_to_db", 0) == 1) { std::string cmd = "python2.7 benchtodb.py " + filename; int err = system(cmd.c_str()); if (err != 0) { std::cout << "Error running the python script." << std::endl; } } }; }; }; #endif
09jijiangwen-download
src/metrics/reps/file_reporter.hpp
C++
asf20
3,913
/** * @file * @author Aapo Kyrola <akyrola@cs.cmu.edu> * @version 1.0 * * @section LICENSE * * Copyright [2012] [Aapo Kyrola, Guy Blelloch, Carlos Guestrin / Carnegie Mellon University] * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * @section DESCRIPTION * * Empty metrics reporter. */ #ifndef GRAPHLAB_NULL_REPORTER #define GRAPHLAB_NULL_REPORTER #include "metrics/metrics.hpp" /** * Simple metrics reporter that dumps metrics to * standard output. */ namespace graphchi { class null_reporter : public imetrics_reporter { public: virtual ~null_reporter(); virtual void do_report(std::string name, std::string ident, std::map<std::string, metrics_entry> & entries) { } }; } #endif
09jijiangwen-download
src/metrics/reps/null_reporter.hpp
C++
asf20
1,244
/** * @file * @author Aapo Kyrola <akyrola@cs.cmu.edu> * @version 1.0 * * @section LICENSE * * Copyright [2012] [Aapo Kyrola, Guy Blelloch, Carlos Guestrin / Carnegie Mellon University] * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * @section DESCRIPTION * * File metrics reporter. */ #ifndef GRAPHCHI_HTML_REPORTER #define GRAPHCHI_HTML_REPORTER #include <cstdio> #include "metrics/metrics.hpp" /** * Simple metrics reporter that dumps metrics to HTML */ namespace graphchi { class html_reporter : public imetrics_reporter { private: html_reporter() {} std::string filename; FILE * f; public: html_reporter(std::string fname) : filename(fname) { // Create new file f = fopen(fname.c_str(), "w"); assert(f != NULL); fprintf(f, "<html><head><title>GraphCHI Metrics Report</title>"); fprintf(f, "<style>\n"); fprintf(f, "table { border: 1px solid #999999; font: normal 80%%/140%% arial, helvetica, sans-serif; color: #555; background: #fff;} td, th {border: 1px dotted #bbb; padding: .5em; width:100px} "); fprintf(f, "</style></head><body>"); } virtual ~html_reporter() { fprintf(f, "</body></html>"); fclose(f); } virtual void do_report(std::string name, std::string ident, std::map<std::string, metrics_entry> & entries) { if (ident != name) { fprintf(f, "<h3>%s:%s</h3>\n", name.c_str(), ident.c_str()); } else { fprintf(f, "<h3>%s</h3>\n", name.c_str()); } // First write numeral, then timings, then string entries for(int round=0; round<4; round++) { std::map<std::string, metrics_entry>::iterator it; int c = 0; fprintf(f, "<!-- Round %d -->\n", round); fprintf(f, "\n<p>"); for(it = entries.begin(); it != entries.end(); ++it) { metrics_entry ent = it->second; switch(ent.valtype) { case INTEGER: if (round == 0) { if (c++ == 0) fprintf(f, "<table><tr><th>Key</th><th>Value</th><th>Count</th><th>Min</th><th>Max</th><th>Average</th></tr>"); fprintf(f, "<tr><td>%s</td>\n", it->first.c_str()); fprintf(f, "<td>%ld</td>\n", (long int) ent.value); if (ent.count > 1) { fprintf(f, "<td>%ld</td>\n", (long int) ent.count); fprintf(f, "<td>%ld</td>\n", (long int) ent.minvalue); fprintf(f, "<td>%ld</td>\n", (long int) ent.maxvalue); fprintf(f, "<td>%.3lf</td>\n", ent.cumvalue/(double)ent.count); } else fprintf(f, "<td colspan=4>&nbsp;</td>"); fprintf(f, "</tr>"); } break; case REAL: if (round == 0) { if (c++ == 0) fprintf(f, "<table><tr><th>Key</th><th>Value</th><th>Count</th><th>Min</th><th>Max</th><th>Average</th></tr>"); } case TIME: if (ent.valtype == TIME && round == 1) { if (c++ == 0) fprintf(f, "<table><tr><th>Key</th><th>Value (sec)</th><th>Count</th><th>Min (sec)</th><th>Max (sec)</th><th>Average (sec)</th></tr>\n"); } if ((round == 0 && ent.valtype == REAL)||(round == 1 && ent.valtype == TIME)) { fprintf(f, "<tr><td>%s</td>\n", it->first.c_str()); fprintf(f, "<td>%lf</td>\n", ent.value); if (ent.count > 1) { fprintf(f, "<td>%ld</td>\n", (long int) ent.count); fprintf(f, "<td>%.3lf</td>\n", ent.minvalue); fprintf(f, "<td>%.3lf</td>\n", ent.maxvalue); fprintf(f, "<td>%.3lf</td>\n", ent.cumvalue/(double)ent.count); } else fprintf(f, "<td colspan=4>&nbsp;</td>"); fprintf(f, "</tr>"); } break; case STRING: if (round == 2) { if (c++ == 0) fprintf(f, "<table><tr><th>Key</th><th>Value</th></tr>\n"); fprintf(f, "<tr><td>%s</td><td width=400>%s</td>\n", it->first.c_str(), ent.stringval.c_str()); fprintf(f, "</tr>"); } break; case VECTOR: if (round == 3) { // TODO } break; } } if (c>0) fprintf(f, "</table>"); fprintf(f, " </p>"); } fflush(f); }; }; }; #endif
09jijiangwen-download
src/metrics/reps/html_reporter.hpp
C++
asf20
6,754
/** * @file * @author Aapo Kyrola <akyrola@cs.cmu.edu> * @version 1.0 * * @section LICENSE * * Copyright [2012] [Aapo Kyrola, Guy Blelloch, Carlos Guestrin / Carnegie Mellon University] * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * @section DESCRIPTION * * Code that generates periodically engine status and performance * related plots using python's matplotlib. * * Relatively hacky code. */ #ifndef DEF_GRAPHCHI_GNUPLOTTER #define DEF_GRAPHCHI_GNUPLOTTER #include <cstdio> #include <stdlib.h> #include <string> #include "graphchi_basic_includes.hpp" namespace graphchi { static size_t initial_edges = 0; static std::string plotdirectory(); static std::string plotdirectory() { return "conf/adminhtml/plots/";} static void init_plot(std::string plotname); static void init_plot(std::string plotname) { std::string dataname = plotdirectory() + plotname + ".dat"; FILE * df = fopen(dataname.c_str(), "w"); fclose(df); std::cout << "---------- Initialized ------------" << std::endl; } template <typename ENGINE> void addval(ENGINE * engine, std::string plotname, double val) { graphchi_context &context = engine->get_context(); std::string dataname = plotdirectory() + plotname + ".dat"; FILE * df = fopen(dataname.c_str(), "a"); assert(df != NULL); fprintf(df, "%lf %lf\n", context.runtime(), val); fclose(df); } static void drawplot(std::string plotname, size_t lookback_secs); static void drawplot(std::string plotname, size_t lookback_secs) { std::string plotfile = plotdirectory() + plotname + ".dat"; std::stringstream ss; ss << "python2.6 "; ss << plotdirectory() + "plotter.py " + plotfile + " lastsecs "; ss << lookback_secs; std::string cmd = ss.str(); logstream(LOG_DEBUG) << "Executing: " << cmd << std::endl; system(cmd.c_str()); } template <typename ENGINE> static void init_plots(ENGINE * engine) { init_plot("edges"); init_plot("bufedges"); init_plot("updates"); init_plot("ingests"); init_plot("deltas"); initial_edges = engine->num_edges_safe(); } static double last_update_time = 0; static size_t last_edges = 0; static size_t last_updates = 0; static size_t ingested_edges = 0; static void set_ingested_edges(size_t n); static void set_ingested_edges(size_t n) { ingested_edges = n; } template <typename ENGINE> void update_plotdata(ENGINE * engine) { addval(engine, "edges", (double)engine->num_edges_safe()); addval(engine, "bufedges", (double)engine->num_buffered_edges()); double rt = engine->get_context().runtime() - last_update_time; if (last_update_time > 0) { addval(engine, "ingests", (ingested_edges - last_edges) / rt); addval(engine, "updates", (engine->num_updates() - last_updates) / rt); addval(engine, "deltas", engine->get_context().last_deltasum); } if (last_update_time == 0) { last_edges = ingested_edges; last_update_time = engine->get_context().runtime(); last_updates = engine->num_updates(); } } static void drawplots(); static void drawplots() { drawplot("edges", 1800); drawplot("bufedges", 1800); drawplot("updates", 300); drawplot("ingests", 500); drawplot("deltas", 7200); } } #endif
09jijiangwen-download
src/httpadmin/plotter.hpp
C++
asf20
4,131
/* * chi_httpadmin.hpp * graphchi_graphprocessing.π * * Created by Aapo Kyrola on 6/8/12. * Copyright 2012 Carnegie Mellon University. All rights reserved. * */ #ifndef CHI_HTTPADMIN_DEF #define CHI_HTTPADMIN_DEF #include <assert.h> #include <string.h> #include <time.h> #include <stdarg.h> #include <string> #include "external/vpiotr-mongoose-cpp/mongoose.h" extern "C" { #include "external/vpiotr-mongoose-cpp/mongoose.c" } namespace graphchi { class custom_request_handler { public: virtual std::string handle(const char * req) = 0; virtual bool responds_to(const char * req) = 0; }; static std::vector<custom_request_handler *> reqhandlers; static void register_http_request_handler(custom_request_handler * rh) { reqhandlers.push_back(rh); } static const char *ajax_reply_start = "HTTP/1.1 200 OK\r\n" "Cache: no-cache\r\n" "Content-Type: application/x-javascript\r\n" "\r\n"; static const char *options[] = { "document_root", "conf/adminhtml", "listening_ports", "3333", "num_threads", "1", NULL }; static void get_qsvar(const struct mg_request_info *request_info, const char *name, char *dst, size_t dst_len) { const char *qs = request_info->query_string; mg_get_var(qs, strlen(qs == NULL ? "" : qs), name, dst, dst_len); } // If "callback" param is present in query string, this is JSONP call. // Return 1 in this case, or 0 if "callback" is not specified. // Wrap an output in Javascript function call. static int handle_jsonp(struct mg_connection *conn, const struct mg_request_info *request_info) { char cb[64]; get_qsvar(request_info, "callback", cb, sizeof(cb)); if (cb[0] != '\0') { mg_printf(conn, "%s(", cb); } return cb[0] == '\0' ? 0 : 1; } static void send(std::string json_info, struct mg_connection * conn, const struct mg_request_info *request_info) { mg_printf(conn, "%s", ajax_reply_start); const char * cstr = json_info.c_str(); int len = (int)strlen(cstr); int is_jsonp = handle_jsonp(conn, request_info); //mg_printf(conn, "%s", json_info.c_str()); // Send read bytes to the client, exit the loop on error int num_written = 0; while (len > 0) { if ((num_written = mg_write(conn, cstr, (size_t)len)) != len) break; len -= num_written; cstr += num_written; } if (is_jsonp) { mg_printf(conn, "%s", ")"); } } template <typename ENGINE> static void ajax_send_message(struct mg_connection *conn, const struct mg_request_info *request_info) { ENGINE * engine = (ENGINE*) request_info->user_data; std::string json_info = engine->get_info_json(); send(json_info, conn, request_info); } template <typename ENGINE> static void *event_handler(enum mg_event event, struct mg_connection *conn, const struct mg_request_info *request_info) { void *processed = (void*) "yes"; if (event == MG_NEW_REQUEST) { if (strcmp(request_info->uri, "/ajax/getinfo") == 0) { ajax_send_message<ENGINE>(conn, request_info); } else { bool found = false; for(std::vector<custom_request_handler *>::iterator it=reqhandlers.begin(); it != reqhandlers.end(); ++it) { custom_request_handler * rh = *it; if (rh->responds_to(request_info->uri)) { std::string response = rh->handle(request_info->uri); send(response, conn, request_info); found = true; } } // No suitable handler found, mark as not processed. Mongoose will // try to serve the request. if (!found) processed = NULL; } } else { processed = NULL; } return processed; } template <typename ENGINE> void start_httpadmin(ENGINE * engine) { struct mg_context *ctx; ctx = mg_start(&event_handler<ENGINE>, (void*)engine, options); assert(ctx != NULL); std::cout << "Started HTTP admin server. " << std::endl; } }; #endif
09jijiangwen-download
src/httpadmin/chi_httpadmin.hpp
C++
asf20
4,756
/** * Copyright (c) 2009 Carnegie Mellon University. * All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an "AS * IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language * governing permissions and limitations under the License. * * For more about this software visit: * * http://www.graphlab.ml.cmu.edu * */ /** * @file logger.hpp * Usage: * First include logger.hpp. To logger, use the logger() function * There are 2 output levels. A "soft" output level which is * set by calling global_logger.set_log_level(), as well as a "hard" output * level OUTPUTLEVEL which is set in the source code (logger.h). * * when you call "logger()" with a loglevel and if the loglevel is greater than * both of the output levels, the string will be written. * written to a logger file. Otherwise, logger() has no effect. * * The difference between the hard level and the soft level is that the * soft level can be changed at runtime, while the hard level optimizes away * logging calls at compile time. * * @author Yucheng Low (ylow) */ /** * NOTICE: This file taken from GraphLab (as stated in the license above). * I have merged the CPP and HPP files. * @author Aapo Kyrola */ #ifndef GRAPHCHI_LOG_LOG_HPP #define GRAPHCHI_LOG_LOG_HPP #include <fstream> #include <sstream> #include <cstdlib> #include <iostream> #include <cassert> #include <cstring> #include <cstdarg> #include <pthread.h> /** * \def LOG_FATAL * Used for fatal and probably irrecoverable conditions * \def LOG_ERROR * Used for errors which are recoverable within the scope of the function * \def LOG_WARNING * Logs interesting conditions which are probably not fatal * \def LOG_INFO * Used for providing general useful information * \def LOG_DEBUG * Debugging purposes only */ #define LOG_NONE 5 #define LOG_FATAL 4 #define LOG_ERROR 3 #define LOG_WARNING 2 #define LOG_INFO 1 #define LOG_DEBUG 0 /** * \def OUTPUTLEVEL * The minimum level to logger at * \def LOG_NONE * OUTPUTLEVEL to LOG_NONE to disable logging */ #ifndef OUTPUTLEVEL #define OUTPUTLEVEL LOG_DEBUG #endif /// If set, logs to screen will be printed in color #define COLOROUTPUT /** * \def logger(lvl,fmt,...) * extracts the filename, line number * and function name and calls _log. It will be optimized * away if LOG_NONE is set * This relies on a few compiler macros. As far as I know, these * macros are pretty standard among most other C++ compilers. */ #if OUTPUTLEVEL == LOG_NONE // totally disable logging #define logger(lvl,fmt,...) #define logbuf(lvl,fmt,...) #define logstream #else #define logger(lvl,fmt,...) \ (log_dispatch<(lvl >= OUTPUTLEVEL)>::exec(lvl,__FILE__, __func__ ,__LINE__,fmt,##__VA_ARGS__)) #define logbuf(lvl,buf,len) \ (log_dispatch<(lvl >= OUTPUTLEVEL)>::exec(lvl,__FILE__, \ __func__ ,__LINE__,buf,len)) #define logstream(lvl) \ (log_stream_dispatch<(lvl >= OUTPUTLEVEL)>::exec(lvl,__FILE__, __func__ ,__LINE__) ) #endif static const char* messages[] = { "DEBUG: ", "INFO: ", "WARNING: ", "ERROR: ", "FATAL: "}; namespace logger_impl { struct streambuff_tls_entry { std::stringstream streambuffer; bool streamactive; }; } /** logging class. This writes to a file, and/or the system console. */ class file_logger{ public: /** Closes the current logger file if one exists. if 'file' is not an empty string, it will be opened and all subsequent logger output will be written into 'file'. Any existing content of 'file' will be cleared. Return true on success and false on failure. */ /// If consolelog is true, subsequent logger output will be written to stderr void set_log_to_console(bool consolelog) { log_to_console = consolelog; } /// Returns the current logger file. std::string get_log_file(void) { return log_file; } /// Returns true if output is being written to stderr bool get_log_to_console() { return log_to_console; } /// Returns the current logger level int get_log_level() { return log_level; } template <typename T> file_logger& operator<<(T a) { // get the stream buffer logger_impl::streambuff_tls_entry* streambufentry = reinterpret_cast<logger_impl::streambuff_tls_entry*>( pthread_getspecific(streambuffkey)); if (streambufentry != NULL) { std::stringstream& streambuffer = streambufentry->streambuffer; bool& streamactive = streambufentry->streamactive; if (streamactive) streambuffer << a; } return *this; } file_logger& operator<<(const char* a) { // get the stream buffer logger_impl::streambuff_tls_entry* streambufentry = reinterpret_cast<logger_impl::streambuff_tls_entry*>( pthread_getspecific(streambuffkey)); if (streambufentry != NULL) { std::stringstream& streambuffer = streambufentry->streambuffer; bool& streamactive = streambufentry->streamactive; if (streamactive) { streambuffer << a; if (a[strlen(a)-1] == '\n') { stream_flush(); } } } return *this; } file_logger& operator<<(std::ostream& (*f)(std::ostream&)){ // get the stream buffer logger_impl::streambuff_tls_entry* streambufentry = reinterpret_cast<logger_impl::streambuff_tls_entry*>( pthread_getspecific(streambuffkey)); if (streambufentry != NULL) { std::stringstream& streambuffer = streambufentry->streambuffer; bool& streamactive = streambufentry->streamactive; typedef std::ostream& (*endltype)(std::ostream&); if (streamactive) { if (endltype(f) == endltype(std::endl)) { streambuffer << "\n"; stream_flush(); if(streamloglevel == LOG_FATAL) { throw "log fatal"; // exit(EXIT_FAILURE); } } } } return *this; } /** Sets the current logger level. All logging commands below the current logger level will not be written. */ void set_log_level(int new_log_level) { log_level = new_log_level; } static void streambuffdestructor(void* v){ logger_impl::streambuff_tls_entry* t = reinterpret_cast<logger_impl::streambuff_tls_entry*>(v); delete t; } /** Default constructor. By default, log_to_console is off, there is no logger file, and logger level is set to LOG_WARNING */ file_logger() { log_file = ""; log_to_console = true; log_level = LOG_DEBUG; pthread_mutex_init(&mut, NULL); pthread_key_create(&streambuffkey, streambuffdestructor); } ~file_logger() { if (fout.good()) { fout.flush(); fout.close(); } pthread_mutex_destroy(&mut); } bool set_log_file(std::string file) { // close the file if it is open if (fout.good()) { fout.flush(); fout.close(); log_file = ""; } // if file is not an empty string, open the new file if (file.length() > 0) { fout.open(file.c_str()); if (fout.fail()) return false; log_file = file; } return true; } #define RESET 0 #define BRIGHT 1 #define DIM 2 #define UNDERLINE 3 #define BLINK 4 #define REVERSE 7 #define HIDDEN 8 #define BLACK 0 #define RED 1 #define GREEN 2 #define YELLOW 3 #define BLUE 4 #define MAGENTA 5 #define CYAN 6 #define WHITE 7 void textcolor(FILE* handle, int attr, int fg) { char command[13]; /* Command is the control command to the terminal */ sprintf(command, "%c[%d;%dm", 0x1B, attr, fg + 30); fprintf(handle, "%s", command); } void reset_color(FILE* handle) { char command[20]; /* Command is the control command to the terminal */ sprintf(command, "%c[0m", 0x1B); fprintf(handle, "%s", command); } void _log(int lineloglevel,const char* file,const char* function, int line,const char* fmt, va_list ap ){ // if the logger level fits if (lineloglevel >= 0 && lineloglevel <= 3 && lineloglevel >= log_level){ // get just the filename. this line found on a forum on line. // claims to be from google. file = ((strrchr(file, '/') ? : file- 1) + 1); char str[1024]; // write the actual header int byteswritten = snprintf(str,1024, "%s%s(%s:%d): ", messages[lineloglevel],file,function,line); // write the actual logger byteswritten += vsnprintf(str + byteswritten,1024 - byteswritten,fmt,ap); str[byteswritten] = '\n'; str[byteswritten+1] = 0; // write the output if (fout.good()) { pthread_mutex_lock(&mut); fout << str;; pthread_mutex_unlock(&mut); } if (log_to_console) { #ifdef COLOROUTPUT if (lineloglevel == LOG_FATAL) { textcolor(stderr, BRIGHT, RED); } else if (lineloglevel == LOG_ERROR) { textcolor(stderr, BRIGHT, RED); } else if (lineloglevel == LOG_WARNING) { textcolor(stderr, BRIGHT, GREEN); } #endif std::cerr << str;; #ifdef COLOROUTPUT reset_color(stderr); #endif } } } void _logbuf(int lineloglevel,const char* file,const char* function, int line,const char* buf, int len) { // if the logger level fits if (lineloglevel >= 0 && lineloglevel <= 3 && lineloglevel >= log_level){ // get just the filename. this line found on a forum on line. // claims to be from google. file = ((strrchr(file, '/') ? : file- 1) + 1); // length of the 'head' of the string size_t headerlen = snprintf(NULL,0,"%s%s(%s:%d): ", messages[lineloglevel],file,function,line); if (headerlen> 2047) { std::cerr << "Header length exceed buffer length!"; } else { char str[2048]; const char *newline="\n"; // write the actual header int byteswritten = snprintf(str,2047,"%s%s(%s:%d): ", messages[lineloglevel],file,function,line); _lograw(lineloglevel,str, byteswritten); _lograw(lineloglevel,buf, len); _lograw(lineloglevel,newline, (int)strlen(newline)); } } } void _lograw(int lineloglevel, const char* buf, int len) { if (fout.good()) { pthread_mutex_lock(&mut); fout.write(buf,len); pthread_mutex_unlock(&mut); } if (log_to_console) { #ifdef COLOROUTPUT if (lineloglevel == LOG_FATAL) { textcolor(stderr, BRIGHT, RED); } else if (lineloglevel == LOG_ERROR) { textcolor(stderr, BRIGHT, RED); } else if (lineloglevel == LOG_WARNING) { textcolor(stderr, BRIGHT, GREEN); } else if (lineloglevel == LOG_DEBUG) { textcolor(stderr, BRIGHT, YELLOW); } #endif std::cerr.write(buf,len); #ifdef COLOROUTPUT reset_color(stderr); #endif } } file_logger& start_stream(int lineloglevel,const char* file,const char* function, int line) { // get the stream buffer logger_impl::streambuff_tls_entry* streambufentry = reinterpret_cast<logger_impl::streambuff_tls_entry*>( pthread_getspecific(streambuffkey)); // create the key if it doesn't exist if (streambufentry == NULL) { streambufentry = new logger_impl::streambuff_tls_entry; pthread_setspecific(streambuffkey, streambufentry); } std::stringstream& streambuffer = streambufentry->streambuffer; bool& streamactive = streambufentry->streamactive; file = ((strrchr(file, '/') ? : file- 1) + 1); if (lineloglevel >= log_level){ if (streambuffer.str().length() == 0) { streambuffer << messages[lineloglevel] << file << "(" << function << ":" <<line<<"): "; } streamactive = true; streamloglevel = lineloglevel; } else { streamactive = false; } return *this; } void stream_flush() { // get the stream buffer logger_impl::streambuff_tls_entry* streambufentry = reinterpret_cast<logger_impl::streambuff_tls_entry*>( pthread_getspecific(streambuffkey)); if (streambufentry != NULL) { std::stringstream& streambuffer = streambufentry->streambuffer; streambuffer.flush(); _lograw(streamloglevel, streambuffer.str().c_str(), (int)(streambuffer.str().length())); streambuffer.str(""); } } private: std::ofstream fout; std::string log_file; pthread_key_t streambuffkey; int streamloglevel; pthread_mutex_t mut; bool log_to_console; int log_level; }; static file_logger& global_logger(); /** Wrapper to generate 0 code if the output level is lower than the log level */ template <bool dostuff> struct log_dispatch {}; template <> struct log_dispatch<true> { inline static void exec(int loglevel,const char* file,const char* function, int line,const char* fmt, ... ) { va_list argp; va_start(argp, fmt); global_logger()._log(loglevel, file, function, line, fmt, argp); va_end(argp); } }; template <> struct log_dispatch<false> { inline static void exec(int loglevel,const char* file,const char* function, int line,const char* fmt, ... ) {} }; struct null_stream { template<typename T> inline null_stream operator<<(T t) { return null_stream(); } inline null_stream operator<<(const char* a) { return null_stream(); } inline null_stream operator<<(std::ostream& (*f)(std::ostream&)) { return null_stream(); } }; template <bool dostuff> struct log_stream_dispatch {}; template <> struct log_stream_dispatch<true> { inline static file_logger& exec(int lineloglevel,const char* file,const char* function, int line) { return global_logger().start_stream(lineloglevel, file, function, line); } }; template <> struct log_stream_dispatch<false> { inline static null_stream exec(int lineloglevel,const char* file,const char* function, int line) { return null_stream(); } }; void textcolor(FILE* handle, int attr, int fg); void reset_color(FILE* handle); static file_logger& global_logger() { static file_logger l; return l; } #endif
09jijiangwen-download
src/logger/logger.hpp
C++
asf20
16,002
/** * @file * @author Aapo Kyrola <akyrola@cs.cmu.edu> * @version 1.0 * * @section LICENSE * * Copyright [2012] [Aapo Kyrola, Guy Blelloch, Carlos Guestrin / Carnegie Mellon University] * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * @section DESCRIPTION * * Simple smoketest for the dynamic graph graphchi engine. */ #include <string> #include "graphchi_basic_includes.hpp" #include "engine/dynamic_graphs/graphchi_dynamicgraph_engine.hpp" using namespace graphchi; /** * Type definitions. Remember to create suitable graph shards using the * Sharder-program. */ typedef vid_t VertexDataType; typedef vid_t EdgeDataType; /** * Smoke test. On every iteration, each vertex sets its id to be * id + iteration number. Vertices check whether their neighbors were * set correctly. This assumes that the vertices are executed in round-robin order. */ struct SmokeTestProgram : public GraphChiProgram<VertexDataType, EdgeDataType> { /** * Vertex update function. */ void update(graphchi_vertex<VertexDataType, EdgeDataType> &vertex, graphchi_context &gcontext) { if (gcontext.iteration == 0) { for(int i=0; i < vertex.num_outedges(); i++) { vertex.outedge(i)->set_data(vertex.id()); } } else { for(int i=0; i < vertex.num_inedges(); i++) { graphchi_edge<vid_t> * edge = vertex.inedge(i); vid_t inedgedata = edge->get_data(); vid_t expected = edge->vertex_id() + gcontext.iteration - (edge->vertex_id() > vertex.id()); if (inedgedata != expected) { assert(false); } } for(int i=0; i < vertex.num_outedges(); i++) { vertex.outedge(i)->set_data(vertex.id() + gcontext.iteration); } } vertex.set_data(gcontext.iteration + 1); } /** * Called before an iteration starts. */ void before_iteration(int iteration, graphchi_context &gcontext) { } /** * Called after an iteration has finished. */ void after_iteration(int iteration, graphchi_context &gcontext) { } /** * Called before an execution interval is started. */ void before_exec_interval(vid_t window_st, vid_t window_en, graphchi_context &gcontext) { } /** * Called after an execution interval has finished. */ void after_exec_interval(vid_t window_st, vid_t window_en, graphchi_context &gcontext) { } }; /** * Vertex callback that checks the vertex data is ok. */ class VertexDataChecker : public VCallback<VertexDataType> { int iters; public: size_t total; VertexDataChecker(int iters) : iters(iters), total(0) {} void callback(vid_t vertex_id, VertexDataType &vecvalue) { assert(vecvalue == iters); total += iters; } }; int main(int argc, const char ** argv) { /* GraphChi initialization will read the command line arguments and the configuration file. */ graphchi_init(argc, argv); /* Metrics object for keeping track of performance counters and other information. Currently required. */ metrics m("smoketest-dynamic-engine"); /* Basic arguments for application */ std::string filename = get_option_string("file"); // Base filename int niters = get_option_int("niters", 4); // Number of iterations bool scheduler = false; // Whether to use selective scheduling /* Detect the number of shards or preprocess an input to creae them */ int nshards = convert_if_notexists<EdgeDataType>(filename, get_option_string("nshards", "auto")); /* Run */ SmokeTestProgram program; graphchi_dynamicgraph_engine<VertexDataType, EdgeDataType> engine(filename, nshards, scheduler, m); engine.run(program, niters); /* Check also the vertex data is ok */ VertexDataChecker vchecker(niters); foreach_vertices(filename, 0, engine.num_vertices(), vchecker); assert(vchecker.total == engine.num_vertices() * niters); /* Report execution metrics */ metrics_report(m); logstream(LOG_INFO) << "Dynamic Engine Smoketest passed successfully! Your system is working!" << std::endl; return 0; }
09jijiangwen-download
src/tests/basic_dynamicengine_smoketest.cpp
C++
asf20
4,958
/** * @file * @author Aapo Kyrola <akyrola@cs.cmu.edu> * @version 1.0 * * @section LICENSE * * Copyright [2012] [Aapo Kyrola, Guy Blelloch, Carlos Guestrin / Carnegie Mellon University] * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * @section DESCRIPTION * * Simple smoke test for the bulk synchronous functional api. */ #define RANDOMRESETPROB 0.15 #include <string> #include <fstream> #include <cmath> #include "util/cmdopts.hpp" #include "api/graphchi_context.hpp" #include "api/graph_objects.hpp" #include "api/ischeduler.hpp" #include "api/functional/functional_api.hpp" #include "metrics/metrics.hpp" #include "metrics/reps/basic_reporter.hpp" #include "util/toplist.hpp" using namespace graphchi; struct smoketest_program : public functional_kernel<int, int> { /* Initial value - on first iteration */ int initial_value(graphchi_context &info, vertex_info& myvertex) { return 0; } /* Called before first "gather" */ int reset() { return 0; } // Note: Unweighted version, edge value should also be passed // "Gather" int op_neighborval(graphchi_context &info, vertex_info& myvertex, vid_t nbid, int nbval) { assert(nbval == (int) info.iteration - 1); return nbval; } // "Sum" int plus(int curval, int toadd) { assert(curval == 0 || toadd == curval); return toadd; } // "Apply" int compute_vertexvalue(graphchi_context &ginfo, vertex_info& myvertex, int nbvalsum) { return ginfo.iteration; } // "Scatter int value_to_neighbor(graphchi_context &info, vertex_info& myvertex, vid_t nbid, int myval) { assert(myval == (int) info.iteration); return myval; } }; int main(int argc, const char ** argv) { graphchi_init(argc, argv); metrics m("test-functional"); std::string filename = get_option_string("file"); int niters = get_option_int("niters", 5); std::string mode = get_option_string("mode", "semisync"); logstream(LOG_INFO) << "Running bulk sync smoke test." << std::endl; run_functional_unweighted_synchronous<smoketest_program>(filename, niters, m); logstream(LOG_INFO) << "Smoketest passed successfully! Your system is working!" << std::endl; return 0; }
09jijiangwen-download
src/tests/bulksync_functional_test.cpp
C++
asf20
2,837
/** * @file * @author Aapo Kyrola <akyrola@cs.cmu.edu> * @version 1.0 * * @section LICENSE * * Copyright [2012] [Aapo Kyrola, Guy Blelloch, Carlos Guestrin / Carnegie Mellon University] * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * @section DESCRIPTION * * Smoketest to test dynamically extended edge values. */ #define DYNAMICEDATA 1 #include <string> #include "graphchi_basic_includes.hpp" #include "api/dynamicdata/chivector.hpp" using namespace graphchi; /** * Type definitions. Remember to create suitable graph shards using the * Sharder-program. */ typedef vid_t VertexDataType; typedef chivector<vid_t> EdgeDataType; /** * Smoke test. */ struct DynamicDataSmokeTestProgram : public GraphChiProgram<VertexDataType, EdgeDataType> { /** * Vertex update function. */ void update(graphchi_vertex<VertexDataType, EdgeDataType > &vertex, graphchi_context &gcontext) { if (gcontext.iteration == 0) { for(int i=0; i < vertex.num_outedges(); i++) { chivector<vid_t> * evector = vertex.outedge(i)->get_vector(); evector->clear(); assert(evector->size() == 0); evector->add(vertex.id()); assert(evector->size() == 1); assert(evector->get(0) == vertex.id()); } } else { for(int i=0; i < vertex.num_inedges(); i++) { graphchi_edge<EdgeDataType> * edge = vertex.inedge(i); chivector<vid_t> * evector = edge->get_vector(); assert(evector->size() >= gcontext.iteration); for(int j=0; j < evector->size(); j++) { vid_t expected = edge->vertex_id() + j; vid_t has = evector->get(j); if (has != expected) { std::cout << "Mismatch: " << has << " != " << expected << std::endl; } assert(has == expected); } } for(int i=0; i < vertex.num_outedges(); i++) { vertex.outedge(i)->get_vector()->add(vertex.id() + gcontext.iteration); } } vertex.set_data(gcontext.iteration + 1); } /** * Called before an iteration starts. */ void before_iteration(int iteration, graphchi_context &gcontext) { } /** * Called after an iteration has finished. */ void after_iteration(int iteration, graphchi_context &gcontext) { } /** * Called before an execution interval is started. */ void before_exec_interval(vid_t window_st, vid_t window_en, graphchi_context &gcontext) { } /** * Called after an execution interval has finished. */ void after_exec_interval(vid_t window_st, vid_t window_en, graphchi_context &gcontext) { } }; /** * Vertex callback that checks the vertex data is ok. */ class VertexDataChecker : public VCallback<VertexDataType> { int iters; public: size_t total; VertexDataChecker(int iters) : iters(iters), total(0) {} void callback(vid_t vertex_id, VertexDataType &vecvalue) { assert(vecvalue == (VertexDataType)iters); total += (size_t) iters; } }; int main(int argc, const char ** argv) { /* GraphChi initialization will read the command line arguments and the configuration file. */ graphchi_init(argc, argv); /* Metrics object for keeping track of performance counters and other information. Currently required. */ metrics m("dynamicdata-smoketest"); /* Basic arguments for application */ std::string filename = get_option_string("file"); // Base filename int niters = get_option_int("niters", 4); // Number of iterations bool scheduler = false; // Whether to use selective scheduling /* Detect the number of shards or preprocess an input to create them */ int nshards = convert_if_notexists<vid_t>(filename, get_option_string("nshards", "auto")); /* Run */ DynamicDataSmokeTestProgram program; graphchi_engine<VertexDataType, EdgeDataType> engine(filename, nshards, scheduler, m); engine.run(program, niters); /* Check also the vertex data is ok */ VertexDataChecker vchecker(niters); foreach_vertices(filename, 0, engine.num_vertices(), vchecker); assert(vchecker.total == engine.num_vertices() * niters); /* Report execution metrics */ metrics_report(m); logstream(LOG_INFO) << "Smoketest passed successfully! Your system is working!" << std::endl; return 0; }
09jijiangwen-download
src/tests/dynamicdata_smoketest.cpp
C++
asf20
5,216
/** * @file * @author Aapo Kyrola <akyrola@cs.cmu.edu> * @version 1.0 * * @section LICENSE * * Copyright [2012] [Aapo Kyrola, Guy Blelloch, Carlos Guestrin / Carnegie Mellon University] * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * @section DESCRIPTION * * Simple smoketest for the graphchi engine. */ #include <string> #include "graphchi_basic_includes.hpp" using namespace graphchi; /** * Type definitions. Remember to create suitable graph shards using the * Sharder-program. */ typedef vid_t VertexDataType; typedef vid_t EdgeDataType; /** * Smoke test. On every iteration, each vertex sets its id to be * id + iteration number. Vertices check whether their neighbors were * set correctly. This assumes that the vertices are executed in round-robin order. */ struct SmokeTestProgram : public GraphChiProgram<VertexDataType, EdgeDataType> { /** * Vertex update function. */ void update(graphchi_vertex<VertexDataType, EdgeDataType> &vertex, graphchi_context &gcontext) { if (gcontext.iteration == 0) { for(int i=0; i < vertex.num_outedges(); i++) { vertex.outedge(i)->set_data(vertex.id()); } } else { for(int i=0; i < vertex.num_inedges(); i++) { graphchi_edge<vid_t> * edge = vertex.inedge(i); vid_t inedgedata = edge->get_data(); vid_t expected = edge->vertex_id() + gcontext.iteration - (edge->vertex_id() > vertex.id()); if (inedgedata != expected) { assert(false); } } for(int i=0; i < vertex.num_outedges(); i++) { vertex.outedge(i)->set_data(vertex.id() + gcontext.iteration); } } vertex.set_data(gcontext.iteration + 1); } /** * Called before an iteration starts. */ void before_iteration(int iteration, graphchi_context &gcontext) { } /** * Called after an iteration has finished. */ void after_iteration(int iteration, graphchi_context &gcontext) { } /** * Called before an execution interval is started. */ void before_exec_interval(vid_t window_st, vid_t window_en, graphchi_context &gcontext) { } /** * Called after an execution interval has finished. */ void after_exec_interval(vid_t window_st, vid_t window_en, graphchi_context &gcontext) { } }; /** * Vertex callback that checks the vertex data is ok. */ class VertexDataChecker : public VCallback<VertexDataType> { int iters; public: size_t total; VertexDataChecker(int iters) : iters(iters), total(0) {} void callback(vid_t vertex_id, VertexDataType &vecvalue) { assert(vecvalue == (VertexDataType)iters); total += (size_t) iters; } }; int main(int argc, const char ** argv) { /* GraphChi initialization will read the command line arguments and the configuration file. */ graphchi_init(argc, argv); /* Metrics object for keeping track of performance counters and other information. Currently required. */ metrics m("smoketest"); /* Basic arguments for application */ std::string filename = get_option_string("file"); // Base filename int niters = get_option_int("niters", 4); // Number of iterations bool scheduler = false; // Whether to use selective scheduling /* Detect the number of shards or preprocess an input to creae them */ int nshards = convert_if_notexists<EdgeDataType>(filename, get_option_string("nshards", "auto")); /* Run */ SmokeTestProgram program; graphchi_engine<VertexDataType, EdgeDataType> engine(filename, nshards, scheduler, m); engine.run(program, niters); /* Check also the vertex data is ok */ VertexDataChecker vchecker(niters); foreach_vertices(filename, 0, engine.num_vertices(), vchecker); assert(vchecker.total == engine.num_vertices() * niters); /* Report execution metrics */ metrics_report(m); logstream(LOG_INFO) << "Smoketest passed successfully! Your system is working!" << std::endl; return 0; }
09jijiangwen-download
src/tests/basic_smoketest.cpp
C++
asf20
4,860
/** * @file * @author Aapo Kyrola <akyrola@cs.cmu.edu> * @version 1.0 * * @section LICENSE * * Copyright [2012] [Aapo Kyrola, Guy Blelloch, Carlos Guestrin / Carnegie Mellon University] * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * @section DESCRIPTION * * Creates a graph with edge data for each edge and loads it and checks * the initial values were read correctly. */ #define DYNAMICEDATA 1 #define DYNAMICVERTEXDATA 1 #include <string> #include "graphchi_basic_includes.hpp" #include "api/dynamicdata/chivector.hpp" using namespace graphchi; /** * Type definitions. Remember to create suitable graph shards using the * Sharder-program. */ typedef chivector<size_t> VertexDataType; typedef chivector<vid_t> EdgeDataType; size_t checksum = 0; size_t shouldbe = 0; /** * Smoke test. */ struct DynamicDataLoaderTestProgram : public GraphChiProgram<VertexDataType, EdgeDataType> { mutex lock; /** * Vertex update function. */ void update(graphchi_vertex<VertexDataType, EdgeDataType > &vertex, graphchi_context &gcontext) { for(int i=0; i < vertex.num_edges(); i++) { chivector<vid_t> * evector = vertex.edge(i)->get_vector(); assert(evector != NULL); // Each edge has three or one values in the chi vector int numelems = ((vertex.id() + vertex.edge(i)->vertex_id()) % 3 == 1 ? 3 : 1); for(int k=0; k < numelems ; k++) { vid_t expected = vertex.id() + vertex.edge(i)->vertex_id() + k; if (expected != evector->get(k)) { logstream(LOG_ERROR) << "Vertex " << vertex.id() << ", edge dst: " << vertex.edge(i)->vertex_id() << std::endl; logstream(LOG_ERROR) << "Mismatch (" << k << "): expected " << expected << " but had " << evector->get(k) << std::endl; } assert(evector->get(k) == expected); } lock.lock(); checksum += evector->get(0); lock.unlock(); } // Modify vertex data by adding values there */ chivector<size_t> * vvector = vertex.get_vector(); int numitems = vertex.id() % 10; for(int i=0; i<numitems; i++) { vvector->add(vertex.id() * 982192l + i); // Arbitrary } /* Check vertex data immediatelly */ for(int i=0; i<numitems; i++) { size_t x = vvector->get(i); size_t expected = vertex.id() * 982192l + i; assert(x == expected); } } /** * Called before an iteration starts. */ void before_iteration(int iteration, graphchi_context &gcontext) { } /** * Called after an iteration has finished. */ void after_iteration(int iteration, graphchi_context &gcontext) { } /** * Called before an execution interval is started. */ void before_exec_interval(vid_t window_st, vid_t window_en, graphchi_context &gcontext) { } /** * Called after an execution interval has finished. */ void after_exec_interval(vid_t window_st, vid_t window_en, graphchi_context &gcontext) { } }; void generatedata(std::string filename); void generatedata(std::string filename) { std::cout << "Generating data..." << std::endl; const char * fname = filename.c_str(); FILE * f = fopen(fname, "w"); set_conf("filetype", "edgelist"); shouldbe = 0; int totalVertices = 200000; // 2 million for(int i=0; i < totalVertices; i++) { int nedges = random() % 50; for(int j=0; j < nedges; j++) { int dst = (totalVertices / nedges) * j + i % nedges; if (dst != i) { if ((i + dst) % 3 == 1) { fprintf(f, "%d\t%d\t%d:%d:%d\n", i, dst, i + dst, i + dst + 1, i + dst + 2); } else { fprintf(f, "%d\t%d\t%d\n", i, dst, i + dst); } shouldbe += 2 * (i + dst); } } } fclose(f); } class VertexValidator : public VCallback<chivector<size_t> > { public: virtual void callback(vid_t vertex_id, chivector<size_t> &vec) { int numitems = vertex_id % 10; assert(vec.size() == numitems); for(int j=0; j < numitems; j++) { size_t x = vec.get(j); assert(x == vertex_id * 982192l + (size_t)j); } } }; int main(int argc, const char ** argv) { /* GraphChi initialization will read the command line arguments and the configuration file. */ graphchi_init(argc, argv); /* Metrics object for keeping track of performance counters and other information. Currently required. */ metrics m("test-dynamicedata"); /* Basic arguments for application */ std::string filename = "/tmp/__chi_dyntest/testgraph"; // Base filename mkdir("/tmp/__chi_dyntest", 0777); int niters = 1; // Number of iterations bool scheduler = false; // Whether to use selective scheduling /* Generate data */ generatedata(filename); set_conf("filetype", "multivalueedgelist"); int nshards = convert_if_notexists<vid_t>(filename, "3"); checksum = 0; /* Run */ DynamicDataLoaderTestProgram program; graphchi_engine<VertexDataType, EdgeDataType> engine(filename, nshards, scheduler, m); engine.set_reset_vertexdata(true); engine.run(program, niters); /* Check */ std::cout << "Checksum: " << checksum << ", expecting: " << shouldbe << std::endl; assert(shouldbe == checksum); /* Check vertex values */ VertexValidator validator; foreach_vertices(filename, 0, engine.num_vertices(), validator); /* Clean up */ delete_shards<EdgeDataType>(filename, 3); /* Report execution metrics */ metrics_report(m); logstream(LOG_INFO) << "Test passed successfully! Your system is working!" << std::endl; return 0; }
09jijiangwen-download
src/tests/test_dynamicedata_loader.cpp
C++
asf20
6,634