/// <summary> /// Construct a CallExpr to the specified function with the specified parameters. /// </summary> /// <param name="fn">Function to call.</param> /// <param name="parameterValues">Parameter values for function.</param> public CallExpr(Function fn, Value[] parameterValues) { Fn = fn; Parameters = parameterValues; if (!fn.IsValidCall(Parameters)) throw new HlslDomException(string.Format("Call to {0} is not valid!", fn.Name)); }
/// <summary> /// Construct a CallExpr to the specified function with the specified parameters. /// </summary> /// <param name="fn">Function to call.</param> /// <param name="parameters">Parameters for function.</param> public CallExpr(Function fn, Expr[] parameters) { Fn = fn; Parameters = new Value[parameters.Length]; for (int i = 0; i < parameters.Length; ++i) Parameters[i] = parameters[i].Value; if (!fn.IsValidCall(Parameters)) throw new HlslDomException(string.Format("Call to {0} is not valid!", fn.Name)); }