Skip to content
Merged
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# ignore objects and archives, anywhere in the tree.
*.[oa]
*.so
*.dll
*.dylib
*.pdb

# test in INSTALL
INSTALL/test*
Expand Down
334 changes: 334 additions & 0 deletions CBLAS/.clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,334 @@
# Options we simply inherit from the LLVM base style are commented out, so the
# uncommented lines are exactly what this style changes:
#
# IndentWidth / ContinuationIndentWidth 3
# BreakBeforeBraces Linux
# AllowShortFunctionsOnASingleLine None
# AllowShortIfStatementsOnASingleLine AllIfsAndElse
# BreakAfterReturnType Automatic
# IncludeCategories system headers, then project
#
# Generated against clang-format 22; a run of --dump-config there reproduces
# this file's settings. Older releases will not recognise every
# uncommented key (BreakAfterReturnType and the SortIncludes struct are 19+),
# but commented lines are inert, so they cost nothing.

BasedOnStyle: LLVM

Language: Cpp
# AlignAfterOpenBracket: true
# AccessModifierOffset: -2
# AlignArrayOfStructures: None
# AlignConsecutiveAssignments:
# Enabled: false
# AcrossEmptyLines: false
# AcrossComments: false
# AlignCompound: false
# AlignFunctionDeclarations: false
# AlignFunctionPointers: false
# PadOperators: true
# AlignConsecutiveBitFields:
# Enabled: false
# AcrossEmptyLines: false
# AcrossComments: false
# AlignCompound: false
# AlignFunctionDeclarations: false
# AlignFunctionPointers: false
# PadOperators: false
# AlignConsecutiveDeclarations:
# Enabled: false
# AcrossEmptyLines: false
# AcrossComments: false
# AlignCompound: false
# AlignFunctionDeclarations: true
# AlignFunctionPointers: false
# PadOperators: false
# AlignConsecutiveMacros:
# Enabled: false
# AcrossEmptyLines: false
# AcrossComments: false
# AlignCompound: false
# AlignFunctionDeclarations: false
# AlignFunctionPointers: false
# PadOperators: false
# AlignConsecutiveShortCaseStatements:
# Enabled: false
# AcrossEmptyLines: false
# AcrossComments: false
# AlignCaseArrows: false
# AlignCaseColons: false
# AlignConsecutiveTableGenBreakingDAGArgColons:
# Enabled: false
# AcrossEmptyLines: false
# AcrossComments: false
# AlignCompound: false
# AlignFunctionDeclarations: false
# AlignFunctionPointers: false
# PadOperators: false
# AlignConsecutiveTableGenCondOperatorColons:
# Enabled: false
# AcrossEmptyLines: false
# AcrossComments: false
# AlignCompound: false
# AlignFunctionDeclarations: false
# AlignFunctionPointers: false
# PadOperators: false
# AlignConsecutiveTableGenDefinitionColons:
# Enabled: false
# AcrossEmptyLines: false
# AcrossComments: false
# AlignCompound: false
# AlignFunctionDeclarations: false
# AlignFunctionPointers: false
# PadOperators: false
# AlignEscapedNewlines: Right
# AlignOperands: Align
# AlignTrailingComments:
# AlignPPAndNotPP: true
# Kind: Always
# OverEmptyLines: 0
# AllowAllArgumentsOnNextLine: true
# AllowAllParametersOfDeclarationOnNextLine: true
# AllowBreakBeforeNoexceptSpecifier: Never
# AllowBreakBeforeQtProperty: false
# AllowShortBlocksOnASingleLine: Never
# AllowShortCaseExpressionOnASingleLine: true
# AllowShortCaseLabelsOnASingleLine: false
# AllowShortCompoundRequirementOnASingleLine: true
# AllowShortEnumsOnASingleLine: true
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: AllIfsAndElse
# AllowShortLambdasOnASingleLine: All
# AllowShortLoopsOnASingleLine: false
# AllowShortNamespacesOnASingleLine: false
# AlwaysBreakAfterDefinitionReturnType: None
# AlwaysBreakBeforeMultilineStrings: false
# AttributeMacros:
# - __capability
# BinPackArguments: true
# BinPackLongBracedList: true
# BinPackParameters: BinPack
# BitFieldColonSpacing: Both
# BracedInitializerIndentWidth: -1
# BraceWrapping:
# AfterCaseLabel: true
# AfterClass: true
# AfterControlStatement: Always
# AfterEnum: true
# AfterExternBlock: true
# AfterFunction: true
# AfterNamespace: true
# AfterObjCDeclaration: true
# AfterStruct: true
# AfterUnion: true
# BeforeCatch: true
# BeforeElse: true
# BeforeLambdaBody: true
# BeforeWhile: false
# IndentBraces: false
# SplitEmptyFunction: true
# SplitEmptyRecord: true
# SplitEmptyNamespace: true
# BreakAdjacentStringLiterals: true
# BreakAfterAttributes: Leave
# BreakAfterJavaFieldAnnotations: false
# BreakAfterOpenBracketBracedList: false
# BreakAfterOpenBracketFunction: false
# BreakAfterOpenBracketIf: false
# BreakAfterOpenBracketLoop: false
# BreakAfterOpenBracketSwitch: false
# Definitions carry the return type on its own line:
# static inline size_t
# cblas_xerbla_trimmed_length(const char *name, size_t name_len)
# Spelled AlwaysBreakAfterReturnType before clang-format 19.
BreakAfterReturnType: Automatic
# BreakArrays: true
# BreakBeforeBinaryOperators: None
# BreakBeforeCloseBracketBracedList: false
# BreakBeforeCloseBracketFunction: false
# BreakBeforeCloseBracketIf: false
# BreakBeforeCloseBracketLoop: false
# BreakBeforeCloseBracketSwitch: false
# BreakBeforeConceptDeclarations: Always
BreakBeforeBraces: Linux
# BreakBeforeInlineASMColon: OnlyMultiline
# BreakBeforeTemplateCloser: false
# BreakBeforeTernaryOperators: true
# BreakBinaryOperations: Never
# BreakConstructorInitializers: BeforeColon
# BreakFunctionDefinitionParameters: false
# BreakInheritanceList: BeforeColon
# BreakStringLiterals: true
# BreakTemplateDeclarations: MultiLine
# ColumnLimit: 80
# CommentPragmas: '^ IWYU pragma:'
# CompactNamespaces: false
# ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 3
# Cpp11BracedListStyle: AlignFirstComment
# DerivePointerAlignment: false
# DisableFormat: false
# EmptyLineAfterAccessModifier: Never
# EmptyLineBeforeAccessModifier: LogicalBlock
# EnumTrailingComma: Leave
# ExperimentalAutoDetectBinPacking: false
# FixNamespaceComments: true
# ForEachMacros:
# - foreach
# - Q_FOREACH
# - BOOST_FOREACH
# IfMacros:
# - KJ_IF_MAYBE
IncludeCategories:
- Regex: '^<'
Priority: 1
- Regex: 'cblas.*'
Priority: 2
- Regex: '.*'
Priority: 3
# IncludeIsMainRegex: '(Test)?$'
# IncludeIsMainSourceRegex: ''
# IndentAccessModifiers: false
# IndentCaseBlocks: false
# IndentCaseLabels: false
# IndentExportBlock: true
# IndentExternBlock: AfterExternBlock
# IndentGotoLabels: true
# IndentPPDirectives: None
# IndentRequiresClause: true
IndentWidth: 3
# IndentWrappedFunctionNames: false
# InsertBraces: true
# InsertNewlineAtEOF: false
# InsertTrailingCommas: None
# IntegerLiteralSeparator:
# Binary: 0
# BinaryMinDigitsInsert: 0
# BinaryMaxDigitsRemove: 0
# Decimal: 0
# DecimalMinDigitsInsert: 0
# DecimalMaxDigitsRemove: 0
# Hex: 0
# HexMinDigitsInsert: 0
# HexMaxDigitsRemove: 0
# BinaryMinDigits: 0
# DecimalMinDigits: 0
# HexMinDigits: 0
# JavaScriptQuotes: Leave
# JavaScriptWrapImports: true
# KeepEmptyLines:
# AtEndOfFile: false
# AtStartOfBlock: true
# AtStartOfFile: true
# KeepFormFeed: false
# LambdaBodyIndentation: Signature
# LineEnding: DeriveLF
# MacroBlockBegin: ''
# MacroBlockEnd: ''
# MainIncludeChar: Quote
# MaxEmptyLinesToKeep: 1
# NamespaceIndentation: None
# NumericLiteralCase:
# ExponentLetter: Leave
# HexDigit: Leave
# Prefix: Leave
# Suffix: Leave
# ObjCBinPackProtocolList: Auto
# ObjCBlockIndentWidth: 2
# ObjCBreakBeforeNestedBlockParam: true
# ObjCSpaceAfterProperty: false
# ObjCSpaceBeforeProtocolList: true
# OneLineFormatOffRegex: ''
# PackConstructorInitializers: BinPack
# PenaltyBreakAssignment: 2
# PenaltyBreakBeforeFirstCallParameter: 19
# PenaltyBreakBeforeMemberAccess: 150
# PenaltyBreakComment: 300
# PenaltyBreakFirstLessLess: 120
# PenaltyBreakOpenParenthesis: 0
# PenaltyBreakScopeResolution: 500
# PenaltyBreakString: 1000
# PenaltyBreakTemplateDeclaration: 10
# PenaltyExcessCharacter: 1000000
# PenaltyIndentedWhitespace: 0
# PenaltyReturnTypeOnItsOwnLine: 60
# PointerAlignment: Right
# PPIndentWidth: -1
# QualifierAlignment: Leave
# ReferenceAlignment: Pointer
# ReflowComments: Always
# RemoveBracesLLVM: false
# RemoveEmptyLinesInUnwrappedLines: false
# RemoveParentheses: Leave
# RemoveSemicolon: false
# RequiresClausePosition: OwnLine
# RequiresExpressionIndentation: OuterScope
# SeparateDefinitionBlocks: Leave
# ShortNamespaceLines: 1
# SkipMacroDefinitionBody: false
# Sorting is LLVM's default and is deliberately left on; the grouping it
# produces comes from the IncludeCategories priorities above.
# SortIncludes:
# Enabled: true
# IgnoreCase: false
# IgnoreExtension: false
# SortJavaStaticImport: Before
# SortUsingDeclarations: LexicographicNumeric
# SpaceAfterCStyleCast: false
# SpaceAfterLogicalNot: false
# SpaceAfterOperatorKeyword: false
# SpaceAfterTemplateKeyword: true
# SpaceAroundPointerQualifiers: Default
# SpaceBeforeAssignmentOperators: true
# SpaceBeforeCaseColon: false
# SpaceBeforeCpp11BracedList: false
# SpaceBeforeCtorInitializerColon: true
# SpaceBeforeInheritanceColon: true
# SpaceBeforeJsonColon: false
# SpaceBeforeParens: ControlStatements
# SpaceBeforeParensOptions:
# AfterControlStatements: true
# AfterForeachMacros: true
# AfterFunctionDefinitionName: false
# AfterFunctionDeclarationName: false
# AfterIfMacros: true
# AfterNot: false
# AfterOverloadedOperator: false
# AfterPlacementOperator: true
# AfterRequiresInClause: false
# AfterRequiresInExpression: false
# BeforeNonEmptyParentheses: false
# SpaceBeforeRangeBasedForLoopColon: true
# SpaceBeforeSquareBrackets: false
# SpaceInEmptyBraces: Never
# SpacesBeforeTrailingComments: 1
# SpacesInAngles: Never
# SpacesInContainerLiterals: true
# SpacesInLineCommentPrefix:
# Minimum: 1
# Maximum: -1
# SpacesInParens: Never
# SpacesInParensOptions:
# ExceptDoubleParentheses: false
# InCStyleCasts: false
# InConditionalStatements: false
# InEmptyParentheses: false
# Other: false
# SpacesInSquareBrackets: false
# Standard: Latest
# StatementAttributeLikeMacros:
# - Q_EMIT
# StatementMacros:
# - Q_UNUSED
# - QT_REQUIRE_VERSION
# TableGenBreakInsideDAGArg: DontBreak
# TabWidth: 8
# UseTab: Never
# VerilogBreakBetweenInstancePorts: true
# WhitespaceSensitiveMacros:
# - BOOST_PP_STRINGIZE
# - CF_SWIFT_NAME
# - NS_SWIFT_NAME
# - PP_STRINGIZE
# - STRINGIZE
# WrapNamespaceBodyWithEmptyLines: Leave
2 changes: 1 addition & 1 deletion CBLAS/examples/cblas_example1_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ int main ( )
y, incy );
/* Print y */
for( i = 0; i < n; i++ )
printf(" y%d = %f\n", (int) i, y[i]);
printf(" y%" PRId64 " = %f\n", i, y[i]);
free(a);
free(x);
free(y);
Expand Down
22 changes: 17 additions & 5 deletions CBLAS/include/cblas.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,21 @@ typedef enum CBLAS_SIDE {CblasLeft=141, CblasRight=142} CBLAS_SIDE;

#define CBLAS_ORDER CBLAS_LAYOUT /* this for backward compatibility with CBLAS_ORDER */

/*
* Weak symbol support for cblas_xerbla() and F77_xerbla()
*
* Must precede the cblas_64.h include below: that header declares
* cblas_xerbla_64() with CBLAS_WEAK_SYMBOL, and its own include of cblas.h is
* a no-op while we are still inside this header's include guard.
*/
#ifndef CBLAS_WEAK_SYMBOL
#ifdef HAS_ATTRIBUTE_WEAK_SUPPORT
#define CBLAS_WEAK_SYMBOL __attribute__((weak))
#else
#define CBLAS_WEAK_SYMBOL
#endif
#endif

/*
* Integer specific API
*/
Expand Down Expand Up @@ -684,11 +699,8 @@ void cblas_zher2k(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo,
const void *B, const CBLAS_INT ldb, const double beta,
void *C, const CBLAS_INT ldc);

void
#ifdef HAS_ATTRIBUTE_WEAK_SUPPORT
__attribute__((weak))
#endif
cblas_xerbla(CBLAS_INT p, const char *rout, const char *form, ...);
void CBLAS_WEAK_SYMBOL cblas_xerbla(CBLAS_INT p, const char *rout,
const char *form, ...);

#ifdef __cplusplus
}
Expand Down
Loading
Loading