Minsky
civita::anonymous_namespace{tensorOp.cc} Namespace Reference

Functions

TensorPtr createReductionOp (ravel::Op::ReductionOp op)
 factory method for creating reduction operations More...
 

Function Documentation

◆ createReductionOp()

TensorPtr civita::anonymous_namespace{tensorOp.cc}::createReductionOp ( ravel::Op::ReductionOp  op)

factory method for creating reduction operations

Definition at line 398 of file tensorOp.cc.

References minsky::op, and minsky::to_string().

Referenced by civita::createRavelChain().

399  {
400  switch (op)
401  {
402  case ravel::Op::sum: return make_shared<Sum>();
403  case ravel::Op::prod: return make_shared<Product>();
404  case ravel::Op::av: return make_shared<civita::Average>();
405  case ravel::Op::stddev: return make_shared<civita::StdDeviation>();
406  case ravel::Op::min: return make_shared<Min>();
407  case ravel::Op::max: return make_shared<Max>();
408  default: throw runtime_error("Reduction "+to_string(op)+" not understood");
409  }
410  }
string to_string(CONST84 char *x)
Definition: minskyTCLObj.h:33
Here is the call graph for this function:
Here is the caller graph for this function: