default: AS_REAL(1)
    - THTensor self
    - arg: real alpha
      default: AS_REAL(1)
    - THTensor mat
    - THTensor* vec
]]
``
The architecture of the cwrap tool is very simple. It reads in a file, and then processes it with a series of **plugins.** Seetools/cwrap/plugins/init.py` for documentation on all the ways a plugin can alter the code.
The source code generation occurs in a series of passes. First, the YAML "declaration" is parsed and processed. Then the source code is generated piece-by-piece - adding things like argument checks and extractions, defining the method header, and the actual call to the underlying library such as TH. Finally, the cwrap tool allows for processing the entire file at a time. The resulting output for addmv_ can be explored here.