// NewReduction creates a new Reduction.
323113
func NewReduction(reduceTensorOp ReduceTensorOp, reduceTensorCompType DataType, reduceTensorNanOpt NanPropagation, reduceTensorIndices ReduceTensorIndices, reduceTensorIndicesType IndicesType) (retVal *Reduction, err error) {
	var internal C.cudnnReduceTensorDescriptor_t
	if err := result(C.cudnnCreateReduceTensorDescriptor(&internal)); err != nil {
		return nil, err
	}

	if err := result(C.cudnnSetReduceTensorDescriptor(internal, reduceTensorOp.C(), reduceTensorCompType.C(), reduceTensorNanOpt.C(), reduceTensorIndices.C(), reduceTensorIndicesType.C())); err != nil {
		return nil, err
	}

	retVal = &Reduction{
		internal:                internal,
		reduceTensorOp:          reduceTensorOp,
		reduceTensorCompType:    reduceTensorCompType,
		reduceTensorNanOpt:      reduceTensorNanOpt,
		reduceTensorIndices:     reduceTensorIndices,
		reduceTensorIndicesType: reduceTensorIndicesType,
	}
	runtime.SetFinalizer(retVal, destroyReduction)
	return retVal, nil
}
486472
func NewImmutable(id string) (*Predicate, error) {
	if id == "" {
		return nil, fmt.Errorf("predicate.NewImmutable(%q) cannot create a immutable predicate with empty ID", id)
	}
	return &Predicate{
		id: ID(id),
	}, nil
}
824317
public Reduction asReduction(CSTNode second) {
        Reduction created = asReduction();
        created.add(second);
        return created;
    }
1350830
func NewPollution(key string, options ...Option) (*Pollution, error) {
	k, err := setKey(key)
	if err != nil {
		return nil, err
	}
	p := &Pollution{
		Key:      k,
		Settings: NewSettings(),
	}

	if err := setOptions(p.Settings, options); err != nil {
		return nil, err
	}
	return p, nil
}
550391
func (r RadialGeoReducer) Reduce(path *geo.Path) *geo.Path {
	return RadialGeo(path, r.Threshold)
}
92808
func NewRedis(cf map[string]string, lifeTime int32) *Redis {
	rc := &Redis{key: DefaultKey}
	if _, ok := cf["key"]; !ok {
		cf["key"] = DefaultKey
	}
	rc.key = cf["key"]
	rc.conninfo = cf["conn"]
	rc.LifeTime = lifeTime
	rc.connectInit()
	return rc
}
701759
func (rs *ReducerStruct) NewKey() sophie.Sophier {
	if rs.NewKeyF != nil {
		return rs.NewKeyF()
	}
	return new(sophie.RawByteSlice)
}
1301298
func NewLeveledCompactor(ctx context.Context, r prometheus.Registerer, l log.Logger, ranges []int64, pool chunkenc.Pool) (*LeveledCompactor, error) {
	if len(ranges) == 0 {
		return nil, errors.Errorf("at least one range must be provided")
	}
	if pool == nil {
		pool = chunkenc.NewPool()
	}
	if l == nil {
		l = log.NewNopLogger()
	}
	return &LeveledCompactor{
		ranges:    ranges,
		chunkPool: pool,
		logger:    l,
		metrics:   newCompactorMetrics(r),
		ctx:       ctx,
	}, nil
}
561763
func NewDagEditor(root *dag.ProtoNode, source ipld.DAGService) *Editor {
	return &Editor{
		root: root,
		tmp:  NewMemoryDagService(),
		src:  source,
	}
}
437597
func NewClearAction(filters ...Filter) Action {
	return &action{action: clearAction, filters: filters, f: clearActionFunc}
}
1082739
func New(size int, r io.ReadCloser) io.ReadCloser {
	return &reader{
		ReadCloser: r,
		p:          util.NewProgressInt(size),
		render:     term.Renderer(),
	}
}
1254155
func NewDuration(name string) *Duration {
	v := new(Duration)
	Publish(name, v)
	return v
}
374032
func New(options *Options, defaultRenderType string) *Renderer {
	r := render.New(render.Options(*options))
	return &Renderer{r, options, defaultRenderType}
}
904489
func NewRVDeletionPrecondition(rv string) *DeleteOptions {
	p := Preconditions{ResourceVersion: &rv}
	return &DeleteOptions{Preconditions: &p}
}
715477
func NewRestriction(s string) (restriction, error) {
	var e restriction
	err := e.FromString(s)
	if err != nil {
		return 0, err
	}
	return e, nil
}
464843
func newEdge(src node, dest node) *edgeImpl {
	e := &edgeImpl{
		s:         src,
		d:         dest,
		notMarked: false,
	}
	src.addOut(e)
	dest.addIn(e)
	return e
}
687032
func NewPairing(controller *pair.PairingController, emitter event.Emitter) *Pairing {
	endpoint := Pairing{
		controller: controller,
		emitter:    emitter,
	}

	return &endpoint
}