Commit f3cec5ef authored by Paul's avatar Paul
Browse files

Formatting

parent 52826e0c
......@@ -15,7 +15,8 @@ namespace migraph {
/// constructed by a target during compilation and passed to the operations
/// during `eval`.
struct context
{};
{
};
#else
......
......@@ -27,16 +27,19 @@ struct operation
shape compute_shape(std::vector<shape> input) const;
/**
* @brief This performs the operation's computation
*
* @param ctx This is the context created by the `target` during compilation. Implementations can use the target's `context` class rather than the `context` interface class.
* @param output This is the output shape. It is equivalent to running `compute_shape` with each `shape` of the `argument`.
*
* @param ctx This is the context created by the `target` during compilation. Implementations
* can use the target's `context` class rather than the `context` interface class.
* @param output This is the output shape. It is equivalent to running `compute_shape` with each
* `shape` of the `argument`.
* @param input This is the `argument` result from the previous instuction's computation.
* @return Return an `argument` of the result computation. The `shape` of `argument` should be the same the `output` shape.
* @return Return an `argument` of the result computation. The `shape` of `argument` should be
* the same the `output` shape.
*/
argument compute(context& ctx, shape output, std::vector<argument> input) const;
/// An optional stream operator to print the operation. When this is not
/// implemented, it will just print the operation's name.
friend std::ostream & operator<<(std::ostream & os, const operation & op);
friend std::ostream& operator<<(std::ostream& os, const operation& op);
};
#else
......
......@@ -19,7 +19,7 @@ struct pass
/// A unique name used to identify the pass
std::string name() const;
/// Run the pass on the program
void apply(program & p) const;
void apply(program& p) const;
};
#else
......
......@@ -23,7 +23,7 @@ struct target
/**
* @brief The transformation pass to be run during compilation.
* @details [long description]
*
*
* @param ctx This is the target-dependent context that is created by `get_context`
* @return The passes to be ran
*/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment