/// <summary> /// Deactivates Bohrium for all supported datatypes /// </summary> public static void Deactivate() { _unloaderHelper = null; Flush(); Deactivate <float>(); Deactivate <double>(); Deactivate <sbyte>(); Deactivate <short>(); Deactivate <int>(); Deactivate <long>(); Deactivate <byte>(); Deactivate <ushort>(); Deactivate <uint>(); Deactivate <ulong>(); Deactivate <bool>(); Deactivate <NumCIL.Complex64.DataType>(); Deactivate <System.Numerics.Complex>(); GC.Collect(); GC.WaitForPendingFinalizers(); }
/// <summary> /// Activates Bohrium for all supported datatypes /// </summary> public static void Activate() { //Activate the instance so timings are more accurate when profiling //and also ensure that config problems are found during startup Flush(); Activate <float>(); Activate <double>(); Activate <sbyte>(); Activate <short>(); Activate <int>(); Activate <long>(); Activate <byte>(); Activate <ushort>(); Activate <uint>(); Activate <ulong>(); Activate <bool>(); Activate <NumCIL.Complex64.DataType>(); Activate <System.Numerics.Complex>(); NumCIL.UFunc.ApplyManager.RegisterHandler(new NumCIL.Bohrium.ApplyImplementor()); _unloaderHelper = new UnloaderHelper(); _unloaderHelper.SetTime(); }