Lines Matching full:context
17 FunctionRef<T> &&funcRef, FoldingContext &context) {
24 context, funcRef.arguments(), /*hasOptionalArgument=*/false)}) {
34 results.emplace_back((*elementalBessel)(context, Scalar<Int4>{i}, x));
38 } else if (context.languageFeatures().ShouldWarn(
40 context.messages().Say(common::UsageWarning::FoldingFailure,
117 static Expr<Type<TypeCategory::Real, KIND>> FoldNorm2(FoldingContext &context,
123 ProcessReductionArgs<T>(context, funcRef.arguments(), dim,
126 RelationalOperator::GT, context, arrayAndMask->array};
131 context.targetCharacteristics().roundingMode()};
135 context.languageFeatures().ShouldWarn(
137 context.messages().Say(common::UsageWarning::FoldingException,
147 FoldingContext &context,
167 context, std::move(funcRef), *callable);
168 } else if (context.languageFeatures().ShouldWarn(
170 context.messages().Say(common::UsageWarning::FoldingFailure,
175 return RewriteSpecificMINorMAX(context, std::move(funcRef));
181 context, std::move(funcRef), *callable);
182 } else if (context.languageFeatures().ShouldWarn(
184 context.messages().Say(common::UsageWarning::FoldingFailure,
193 context, std::move(funcRef), *callable);
194 } else if (context.languageFeatures().ShouldWarn(
196 context.messages().Say(common::UsageWarning::FoldingFailure,
201 return FoldTransformationalBessel<T>(std::move(funcRef), context);
207 context, std::move(funcRef), &Scalar<T>::ABS);
209 return FoldElementalIntrinsic<T, ComplexT>(context, std::move(funcRef),
210 ScalarFunc<T, ComplexT>([&name, &context](
214 context.languageFeatures().ShouldWarn(
216 context.messages().Say(common::UsageWarning::FoldingException,
226 return Fold(context, Expr<T>{ComplexComponent{true, std::move(*zExpr)}});
233 return FoldElementalIntrinsic<T, T>(context, std::move(funcRef),
235 [&name, &context, mode](const Scalar<T> &x) -> Scalar<T> {
238 context.languageFeatures().ShouldWarn(
240 context.messages().Say(common::UsageWarning::FoldingException,
246 return FoldElementalIntrinsic<T, T, T>(context, std::move(funcRef),
247 ScalarFunc<T, T, T>([&context](const Scalar<T> &x,
251 context.languageFeatures().ShouldWarn(
253 context.messages().Say(common::UsageWarning::FoldingException,
259 return FoldDotProduct<T>(context, std::move(funcRef));
266 return Fold(context,
267 ToReal<T::kind>(context, common::Clone(*xExpr)) *
268 ToReal<T::kind>(context, common::Clone(*yExpr)));
274 return FoldElementalIntrinsic<T, T>(context, std::move(funcRef),
281 return FoldElementalIntrinsic<T, T, T>(context, std::move(funcRef),
286 context.languageFeatures().ShouldWarn(
288 context.messages().Say(common::UsageWarning::FoldingException,
294 return FoldMatmul(context, std::move(funcRef));
296 return FoldMINorMAX(context, std::move(funcRef), Ordering::Greater);
298 return FoldMaxvalMinval<T>(context, std::move(funcRef),
301 return FoldMINorMAX(context, std::move(funcRef), Ordering::Less);
304 context, std::move(funcRef), RelationalOperator::LT, T::Scalar::HUGE());
309 *pExpr = Fold(context, std::move(*pExpr));
312 context.languageFeatures().ShouldWarn(
314 context.messages().Say(common::UsageWarning::FoldingAvoidsRuntimeCrash,
319 return FoldElementalIntrinsic<T, T, T>(context, std::move(funcRef),
320 ScalarFunc<T, T, T>([&context, badPConst](const Scalar<T> &x,
324 context.languageFeatures().ShouldWarn(
326 context.messages().Say(
336 *pExpr = Fold(context, std::move(*pExpr));
339 context.languageFeatures().ShouldWarn(
341 context.messages().Say(common::UsageWarning::FoldingAvoidsRuntimeCrash,
346 return FoldElementalIntrinsic<T, T, T>(context, std::move(funcRef),
347 ScalarFunc<T, T, T>([&context, badPConst](const Scalar<T> &x,
351 context.languageFeatures().ShouldWarn(
353 context.messages().Say(
361 *sExpr = Fold(context, std::move(*sExpr));
368 context.languageFeatures().ShouldWarn(
370 context.messages().Say(common::UsageWarning::FoldingValueChecks,
375 return FoldElementalIntrinsic<T, T, TS>(context, std::move(funcRef),
379 context.languageFeatures().ShouldWarn(
381 context.messages().Say(
387 if (context.languageFeatures().ShouldWarn(
390 context.messages().Say(
401 return FoldNorm2<T::kind>(context, std::move(funcRef));
404 return FoldProduct<T>(context, std::move(funcRef), one);
407 return ToReal<KIND>(context, std::move(*expr));
410 return FoldElementalIntrinsic<T, T>(context, std::move(funcRef),
418 return FoldElementalIntrinsic<T, T, TBY>(context,
431 context.languageFeatures().ShouldWarn(
433 context.messages().Say(
447 return FoldElementalIntrinsic<T, T, TY>(context, std::move(funcRef),
457 context, std::move(funcRef), &Scalar<T>::SIGN);
459 return FoldElementalIntrinsic<T, T>(context, std::move(funcRef),
463 return FoldElementalIntrinsic<T, T>(context, std::move(funcRef),
467 return FoldSum<T>(context, std::move(funcRef));
477 return FoldElementalIntrinsic<T, T, TY>(context, std::move(funcRef),
484 if (context.languageFeatures().ShouldWarn(
486 context.messages().Say(
507 return FoldElementalIntrinsic<T, T>(context, std::move(funcRef),
510 if (context.languageFeatures().ShouldWarn(
513 context.messages().Say(common::UsageWarning::FoldingException,