Skip to content

Commit

Permalink
Update the COp section to reflect the current API.
Browse files Browse the repository at this point in the history
  • Loading branch information
abergeron committed Jan 31, 2017
1 parent 2237428 commit c69fe85
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions advanced.tex
Original file line number Diff line number Diff line change
Expand Up @@ -302,15 +302,15 @@ \section{How to Make an Op (C)}

\begin{frame}{Constructor Arguments}
\begin{itemize}
\item Basically you just pass two arguments to the constructor of COp
\item Basically you just pass arguments to the constructor of COp
\begin{itemize}
\item Either by calling the constructor directly \code{COp.__init__(self, ...)}
\item Or via the superclass \code{super(MyOp, self).__init__(...)}
\end{itemize}
\item The two arguments are:
\item The arguments are:
\begin{itemize}
\item the name of the C code file
\item the name of the function to call to make the computation
\item a list of file names with code sections (relative to the location of the op class)
\item the name of a function to call to make the computation (optional)
\end{itemize}
\end{itemize}
\end{frame}
Expand Down
2 changes: 1 addition & 1 deletion cop.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class MyOp(COp):
__props__ = ()

def __init__(self, ...):
COp.__init__(self, c_file, func_name)
COp.__init__(self, c_files, func_name)
# Other init code if needed

def make_node(self, ...):
Expand Down
2 changes: 1 addition & 1 deletion doublecop.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class DoubleCOp(COp):
__props__ = ()

def __init__(self):
COp.__init__(self, "./doublecop.c",
COp.__init__(self, ["doublecop.c"],
"APPLY_SPECIFIC(doublecop)")

def make_node(self, x):
Expand Down

0 comments on commit c69fe85

Please sign in to comment.