Backends/SiaNet.Backend.TensorSharp/Cuda/TSCudaContext.cs
/// <summary>
/// Precompiles the specified precompile progress writer.
/// </summary>
/// <param name="precompileProgressWriter">The precompile progress writer.</param>
Precompiles the specified precompile progress writer.
Precompiles the specified precompile progress writer .
public void Precompile(Action<string> precompileProgressWriter)
        {
            var assembly = Assembly.GetExecutingAssembly();
            foreach (var applyType in assembly.TypesWithAttribute<PrecompileAttribute>(true).Where(x => !x.Item1.IsAbstract))
            {
                precompileProgressWriter("Precompiling " + applyType.Item1.Name + "\n");
                var instance = (IPrecompilable)Activator.CreateInstance(applyType.Item1);
                instance.Precompile(Compiler);
            }
        }
public void Precompile ( Action < string > precompileProgressWriter ) { var assembly = Assembly . GetExecutingAssembly ( ) ; foreach ( var applyType in assembly . TypesWithAttribute < PrecompileAttribute > ( true ) . Where ( x => ! x . Item1 . IsAbstract ) ) { precompileProgressWriter ( " " + applyType . Item1 . Name + " \n " ) ; var instance = ( IPrecompilable ) Activator . CreateInstance ( applyType . Item1 ) ; instance . Precompile ( Compiler ) ; } }
Precompiles the specified precompile progress writer.
Precompiles the specified precompile progress writer .
precompileProgressWriter
Action<string>
The precompile progress writer.
The precompile progress writer .