Ejemplo n.º 1
0
 /// <summary>
 /// Constructs a new implementation.
 /// </summary>
 /// <param name="backendType">The main backend type.</param>
 /// <param name="targetMethod">The associated target method.</param>
 /// <param name="mode">The code-generation mode.</param>
 protected IntrinsicImplementation(
     BackendType backendType,
     MethodInfo targetMethod,
     IntrinsicImplementationMode mode)
 {
     BackendType  = backendType;
     TargetMethod = targetMethod ?? throw new NotSupportedException(
                              string.Format(ErrorMessages.NotSupportedIntrinsic, GetType()));
     if (TargetMethod.IsGenericMethod)
     {
         TargetMethod = TargetMethod.GetGenericMethodDefinition();
     }
     Mode = mode;
 }