示例#1
0
        /// <summary>
        /// Handles language operations.
        /// </summary>
        /// <param name="context">The current invocation context.</param>
        /// <param name="attribute">The intrinsic attribute.</param>
        /// <returns>The resulting value.</returns>
        private static ValueReference HandleLanguageOperation(
            ref InvocationContext context,
            LanguageIntrinsicAttribute attribute)
        {
            var builder = context.Builder;

            return(attribute.IntrinsicKind switch
            {
                LanguageIntrinsicKind.EmitPTX =>
                CreateLanguageEmitPTX(ref context),
                _ => throw context.Location.GetNotSupportedException(
                    ErrorMessages.NotSupportedLanguageIntrinsic,
                    attribute.IntrinsicKind.ToString()),
            });
示例#2
0
 /// <summary>
 /// Handles language operations.
 /// </summary>
 /// <param name="context">The current invocation context.</param>
 /// <param name="attribute">The intrinsic attribute.</param>
 /// <returns>The resulting value.</returns>
 private static ValueReference HandleLanguageOperation(
     ref InvocationContext context,
     LanguageIntrinsicAttribute attribute) =>
 attribute.IntrinsicKind switch
 {