https://github.com/JuliaLang/julia
Revision 681816cedf610ebc2e90d2fd499a57b8d3fac83a authored by Jishnu Bhattacharya on 14 January 2024, 15:03:44 UTC, committed by GitHub on 14 January 2024, 15:03:44 UTC
This is an attempt at resolving https://github.com/JuliaLang/julia/issues/46636. Since each LAPACK function generally has a specific meaning attached to a positive error code, this PR tries to specialize `chklapackerror` for the caller to throw a more informative error instead of a `LAPACKException`. For example: ```julia julia> U = UpperTriangular([1 2; 0 0]) 2×2 UpperTriangular{Int64, Matrix{Int64}}: 1 2 ⋅ 0 julia> inv(U) ERROR: SingularException(2) [...] ``` Currently, I've only specialized it for `trtrs!`, but if this seems reasonable, I'll add others. Functions to be implemented: - [ ] `gbtrf` - [ ] `gbtrs` - [ ] `gebal!` - [ ] `gebak!` - [ ] `gebrd!` - [ ] `gelqf!` - [ ] `geqlf!` - [ ] `geqp3!` - [ ] `geqrt!` - [ ] `geqrt3!` - [ ] `geqrf!` - [ ] `gerqf!` - [ ] `getrf!` - [ ] `tzrzf!` - [ ] `ormrz!` - [ ] `gels!` - [ ] `gesv!` - [ ] `getrs!` - [ ] `getri!` - [ ] `gesvx!` - [ ] `gelsd!` - [ ] `gelsy!` - [ ] `gglse!` - [ ] `geev!` - [ ] `gesdd!` - [ ] `gesvd!` - [ ] `ggsvd!` - [ ] `ggsvd3!` - [ ] `geevx!` - [ ] `ggev!` - [ ] `ggev3!` - [ ] `gtsv!` - [ ] `gttrf!` - [ ] `gttrs!` - [ ] `orglq!` - [ ] `orgqr!` - [ ] `orgql!` - [ ] `orgrq!` - [ ] `ormlq!` - [ ] `ormqr!` - [ ] `ormql!` - [ ] `ormrq!` - [ ] `gemqrt!` - [ ] `potrs!` - [ ] `ptsv!` - [ ] `pttrf!` - [ ] `pttrs!` - [ ] `trtri!` - [x] `trtrs!` - [ ] `trcon!` - [ ] `trevc!` - [ ] `trrfs!` - [ ] `stev!` - [ ] `stebz!` - [ ] `stegr!` - [ ] `stein!` - [ ] `syconv!` - [ ] `sytrs!` - [ ] `sytrs_rook!` - [ ] `syconvf_rook!` - [ ] `hesv!` - [ ] `hetri!` - [ ] `hetrs!` - [ ] `hesv_rook!` - [ ] `hetri_rook!` - [ ] `hetrs_rook!` - [ ] `sytri!` - [ ] `sytri_rook!` - [ ] `syconvf_rook!` - [ ] `syev!` - [ ] `syevr!` - [ ] `syevd!` - [ ] `bdsqr!` - [ ] `bdsdc!` - [ ] `gecon!` - [ ] `gehrd!` - [ ] `orghr!` - [ ] `ormhr!` - [ ] `hseqr!` - [ ] `hetrd!` - [ ] `ormtr!` - [ ] `gees!` - [ ] `gges!` - [ ] `gges3!` - [ ] `trexc!` - [ ] `trsen!` - [ ] `tgsen!` - [ ] `trsyl!`
1 parent eadec43
Tip revision: 681816cedf610ebc2e90d2fd499a57b8d3fac83a authored by Jishnu Bhattacharya on 14 January 2024, 15:03:44 UTC
[WIP] Specialize `chklapackerror` to improve error messages (#51645)
[WIP] Specialize `chklapackerror` to improve error messages (#51645)
Tip revision: 681816c
.clang-format
Language: Cpp
Standard: Cpp11
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignConsecutiveMacros: false
AlignEscapedNewlines: Left
AlignOperands: true
AlignTrailingComments: false
AllowAllArgumentsOnNextLine: true
AllowAllConstructorInitializersOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: true
AllowShortFunctionsOnASingleLine: Inline
AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: All
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: true
BinPackArguments: true
BinPackParameters: true
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Stroustrup
BreakBeforeInheritanceComma: false
BreakBeforeTernaryOperators: false
BreakConstructorInitializers: BeforeColon
BreakConstructorInitializersBeforeComma: false
BreakInheritanceList: BeforeColon
BreakStringLiterals: false
ColumnLimit: 92
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 2
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DeriveLineEnding: true
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: false
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^(<|"(llvm|llvm-c|clang|clang-c)/)'
Priority: 2
- Regex: '^<.*'
Priority: 3
- Regex: '.*'
Priority: 1
IncludeIsMainSourceRegex: ''
IndentCaseLabels: false
IndentGotoLabels: false
IndentPPDirectives: None
IndentWidth: 4
IndentWrappedFunctionNames: false
KeepEmptyLinesAtTheStartOfBlocks: false
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 2
NamespaceIndentation: None
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 30
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Right
ReflowComments: true
SortIncludes: true
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceBeforeSquareBrackets: false
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInConditionalStatement: false
SpacesInContainerLiterals: true
SpacesInParentheses: false
SpacesInSquareBrackets: false
TabWidth: 8
UseCRLF: true
UseTab: Never
ForEachMacros:
- JL_TRY
- JL_CATCH
StatementMacros:
- bi_fintrinsic
- bi_iintrinsic_fast
- bi_intrinsic_ctype
- bool_fintrinsic
- bool_iintrinsic_fast
- bool_intrinsic_ctype
- checked_intrinsic_ctype
- cvt_iintrinsic
- fpiseq_n
- ter_fintrinsic
- ter_intrinsic_ctype
- un_fintrinsic
- un_fintrinsic_withtype
- un_iintrinsic_ctype
- uu_iintrinsic_ctype
Computing file changes ...