Exemple #1
0
 public void Emit(
     PTXCodeGenerator codeGenerator,
     string command,
     PrimitiveRegister register,
     int offset) =>
 codeGenerator.EmitIOStore(
     Emitter,
     command,
     register,
     offset);
Exemple #2
0
 public void Emit(
     PTXCodeGenerator codeGenerator,
     string command,
     PrimitiveRegister register,
     int offset)
 {
     using var commandEmitter = codeGenerator.BeginCommand(command);
     commandEmitter.AppendAddressSpace(TargetType.AddressSpace);
     commandEmitter.AppendSuffix(register.BasicValueType);
     commandEmitter.AppendArgumentValue(AddressRegister, offset);
     commandEmitter.AppendArgument(register);
 }
Exemple #3
0
 public void Emit(
     PTXCodeGenerator codeGenerator,
     string command,
     PrimitiveRegister[] primitiveRegisters,
     int offset)
 {
     using var commandEmitter = codeGenerator.BeginCommand(command);
     commandEmitter.AppendAddressSpace(Emitter.TargetType.AddressSpace);
     commandEmitter.AppendVectorSuffix(primitiveRegisters.Length);
     commandEmitter.AppendSuffix(
         ResolveIOType(primitiveRegisters[0].BasicValueType));
     commandEmitter.AppendArgumentValue(Emitter.AddressRegister, offset);
     commandEmitter.AppendVectorArgument(primitiveRegisters);
 }
Exemple #4
0
 /// <summary>
 /// Constructs a new phi binding allocator.
 /// </summary>
 /// <param name="parent">The parent code generator.</param>
 public PhiBindingAllocator(PTXCodeGenerator parent)
 {
     Parent = parent;
 }
 /// <summary>
 /// Converts the underlying predicate register to a
 /// default target register.
 /// </summary>
 /// <param name="codeGenerator">The target code generator.</param>
 /// <param name="targetRegister">The target register to write to.</param>
 public void ConvertToValue(
     PTXCodeGenerator codeGenerator,
     HardwareRegister targetRegister) =>
 codeGenerator.ConvertPredicateToValue(
     PredicateRegister,
     targetRegister);