tensorflow/core/kernels/segment_reduction_ops.cc
static void SegmentReductionValidationHelper(OpKernelContext* context,
                                             const Tensor& input,
                                             const Tensor& segment_ids) {
  OP_REQUIRES(context, TensorShapeUtils::IsVector(segment_ids.shape()),
              errors::InvalidArgument("segment_ids should be a vector."));
  const int64 num_indices = segment_ids.NumElements();
  OP_REQUIRES(context, num_indices == input.dim_size(0),
              errors::InvalidArgument(
                  "segment_ids should be the same size as dimension 0 of"
                  " input."));
}
// Static routines not in the templated class to reduce code size
Static routines not in the templated class to reduce code size
Static routines not in the templated class to reduce code size
static void SegmentReductionValidationHelper(OpKernelContext* context,
                                             const Tensor& input,
                                             const Tensor& segment_ids) {
  OP_REQUIRES(context, TensorShapeUtils::IsVector(segment_ids.shape()),
              errors::InvalidArgument("segment_ids should be a vector."));
  const int64 num_indices = segment_ids.NumElements();
  OP_REQUIRES(context, num_indices == input.dim_size(0),
              errors::InvalidArgument(
                  "segment_ids should be the same size as dimension 0 of"
                  " input."));
}
static void SegmentReductionValidationHelper ( OpKernelContext * context , const Tensor & input , const Tensor & segment_ids ) { OP_REQUIRES ( context , TensorShapeUtils :: IsVector ( segment_ids . shape ( ) ) , errors :: InvalidArgument ( " " ) ) ; const int64 num_indices = segment_ids . NumElements ( ) ; OP_REQUIRES ( context , num_indices == input . dim_size ( 0 ) , errors :: InvalidArgument ( " " " " ) ) ; }
Static routines not in the templated class to reduce code size
Static routines not in the templated class to reduce code size