Пример #1
0
func Make(app RenderApplication) NativeRegionNumerics {
	sequence := nativesequence.Make(app)
	parent := nativebase.Make(app)
	reg := NativeRegionNumerics{
		NativeBaseNumerics: parent,
		RegionConfig:       app.RegionConfig(),
		SequenceNumerics:   &sequence,
	}
	reg.initRegion()
	return reg
}
Пример #2
0
func (factory *sequenceNumericsFactory) Build() sequence.SequenceNumerics {
	switch factory.desc.NumericsStrategy {
	case config.NativeNumericsMode:
		specialBase := makeNativeBaseFacade(factory.desc, factory.baseApp)
		nativeApp := nativesequence.Make(specialBase)
		return &nativeApp
	case config.BigFloatNumericsMode:
		specialBase := makeBigBaseFacade(factory.desc, factory.baseApp)
		bigApp := bigsequence.Make(specialBase)
		return &bigApp
	default:
		log.Panic("Invalid NumericsStrategy", factory.desc.NumericsStrategy)
		return nil
	}
}