示例#1
0
        /// <summary cref="IValueVisitor.Visit(WarpSizeValue)"/>
        public void Visit(WarpSizeValue value)
        {
            var register = AllocatePrimitive(value);

            using (var command = BeginMove())
            {
                command.AppendSuffix(BasicValueType.Int32);
                command.AppendArgument(register);
                command.AppendConstant(PTXBackend.WarpSize);
            }
        }
示例#2
0
 /// <summary>
 /// Specializes warp size values.
 /// </summary>
 private static void Specialize(
     RewriterContext context,
     AcceleratorSpecializer specializer,
     WarpSizeValue value)
 {
     if (!specializer.WarpSize.HasValue)
     {
         return;
     }
     Specialize(context, value, specializer.WarpSize.Value);
 }
示例#3
0
        /// <summary>
        /// Specializes warp size values.
        /// </summary>
        private static void Specialize(
            RewriterContext context,
            SpecializerData data,
            WarpSizeValue value)
        {
            var warpSizeValue = data.WarpSize;

            if (!warpSizeValue.HasValue)
            {
                return;
            }
            Specialize(context, value, warpSizeValue.Value);
        }
示例#4
0
 public void Visit(WarpSizeValue value)
 {
 }
示例#5
0
 /// <summary cref="IValueVisitor.Visit(WarpSizeValue)"/>
 public void Visit(WarpSizeValue value) =>
 CodeGenerator.GenerateCode(value);
示例#6
0
 /// <summary cref="IValueVisitor.Visit(WarpSizeValue)"/>
 public void Visit(WarpSizeValue value) =>
 MakeIntrinsicValue(
     value,
     CLInstructions.GetWarpSize);
示例#7
0
 /// <summary cref="IBackendCodeGenerator.GenerateCode(WarpSizeValue)"/>
 public void GenerateCode(WarpSizeValue value) =>
 MakeIntrinsicValue(
     value,
     CLInstructions.GetWarpSize);
示例#8
0
 /// <summary cref="IBackendCodeGenerator.GenerateCode(WarpSizeValue)"/>
 public void GenerateCode(WarpSizeValue value) =>
 throw new InvalidCodeGenerationException();