コード例 #1
0
        /// <summary>
        /// Enables algorithm extensions in the scope of the given context builder.
        /// </summary>
        /// <param name="builder">The builder to enable algorithms for.</param>
        public static void EnableAlgorithms(this Context.Builder builder)
        {
            if (builder == null)
            {
                throw new ArgumentNullException(nameof(builder));
            }

            var intrinsicManager = builder.GetIntrinsicManager();

            CLContext.EnableCLAlgorithms(intrinsicManager);
            ILContext.EnableILAlgorithms(intrinsicManager);
            PTXContext.EnablePTXAlgorithms(intrinsicManager);
        }
コード例 #2
0
        /// <summary>
        /// Enables algorithm extensions in the scope of the given context.
        /// </summary>
        /// <param name="context">The context to enable algorithms for.</param>
        public static void EnableAlgorithms(this Context context)
        {
            if (context == null)
            {
                throw new ArgumentNullException(nameof(context));
            }

            var intrinsicManager = context.IntrinsicManager;

            CLContext.EnableCLAlgorithms(intrinsicManager);
            ILContext.EnableILAlgorithms(intrinsicManager);
            PTXContext.EnablePTXAlgorithms(intrinsicManager);
        }