internal static IntrinsicNumericTypeSymbol GetNumericTypeWithScalarType(this IntrinsicNumericTypeSymbol type, ScalarType scalarType) { switch (type.Kind) { case SymbolKind.IntrinsicMatrixType: var matrixType = (IntrinsicMatrixTypeSymbol)type; return(IntrinsicTypes.GetMatrixType(scalarType, matrixType.Rows, matrixType.Cols)); case SymbolKind.IntrinsicScalarType: return(IntrinsicTypes.GetScalarType(scalarType)); case SymbolKind.IntrinsicVectorType: return(IntrinsicTypes.GetVectorType(scalarType, ((IntrinsicVectorTypeSymbol)type).NumComponents)); default: throw new ArgumentOutOfRangeException(); } }