MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / base

Class base

tensorflow/core/kernels/cwise_ops.h:704–732  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

702// output scalar type is R.
703template <typename T, typename F, typename R = T>
704struct base {
705 // func defines operator() and its vectorized version packetOp().
706 typedef F func;
707
708 // If true, the functor's corresponding binary op will instantiate
709 // specialized kernels to perform an optimized broadcast
710 // operation. Each functor for which this is enabled increases the
711 // code size, so by default this is disabled for binary functors and
712 // is enabled on a per-op basis as needed.
713 static const bool use_bcast_optimization = false;
714
715 // operator() has the signature:
716 // out_type operator()(in_type in0, in_type in1 ...)
717 typedef R out_type;
718 typedef T in_type;
719
720 // TensorFlow provides tensor-ized version of "func". Roughly
721 // speaking, the tensorflow operation has the signature:
722 // tout_type op(tin_type in0)
723 // tout_type op(tin_type in0, tin_type in1)
724 // tout_type op(tin_type in0, in_type scalar)
725 typedef typename TTypes<out_type>::Flat tout_type;
726 typedef typename TTypes<in_type>::ConstFlat tin_type;
727 typedef typename TTypes<in_type>::ConstScalar tscalar_type;
728
729 // Whether the functor can error out. Currently applies only to integer
730 // div and mod.
731 static const bool has_errors = false;
732};
733
734// For now, we only apply certain speed optimization for
735// float/double's broadcast binary op.

Callers 15

RecvFromRemoteAsyncMethod · 0.85
AddRequestMethod · 0.85
InitStarClientTagFunction · 0.85
InitStarServerTagFunction · 0.85
RecvBufCallMethod · 0.85
ValidateChecksumFunction · 0.85
RecvHandlerMethod · 0.85
CloneMethod · 0.85
AllocateTensorsMethod · 0.85
RecvTensorContentMethod · 0.85
ComputeMethod · 0.85

Calls

no outgoing calls

Tested by 7

TEST_FFunction · 0.68
TEST_FFunction · 0.68
DoAddChainMethod · 0.68
ExecOpMethod · 0.68
ExecOpMethod · 0.68
RunTestMethod · 0.68
RecvBufAsyncMethod · 0.68