You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.html 87 kB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718
  1. <!doctype html>
  2. <html lang="en" class="no-js">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width,initial-scale=1">
  6. <link rel="canonical" href="https://openblas.net/docs/install/">
  7. <link rel="prev" href="..">
  8. <link rel="next" href="../user_manual/">
  9. <link rel="icon" href="../logo.svg">
  10. <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.5.49">
  11. <title>Install OpenBLAS - OpenBLAS</title>
  12. <link rel="stylesheet" href="../assets/stylesheets/main.6f8fc17f.min.css">
  13. <link rel="stylesheet" href="../assets/stylesheets/palette.06af60db.min.css">
  14. <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  15. <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,700,700i%7CRoboto+Mono:400,400i,700,700i&display=fallback">
  16. <style>:root{--md-text-font:"Roboto";--md-code-font:"Roboto Mono"}</style>
  17. <script>__md_scope=new URL("..",location),__md_hash=e=>[...e].reduce(((e,_)=>(e<<5)-e+_.charCodeAt(0)),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script>
  18. </head>
  19. <body dir="ltr" data-md-color-scheme="slate" data-md-color-primary="blue-grey" data-md-color-accent="indigo">
  20. <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
  21. <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
  22. <label class="md-overlay" for="__drawer"></label>
  23. <div data-md-component="skip">
  24. <a href="#install-openblas" class="md-skip">
  25. Skip to content
  26. </a>
  27. </div>
  28. <div data-md-component="announce">
  29. </div>
  30. <header class="md-header md-header--shadow" data-md-component="header">
  31. <nav class="md-header__inner md-grid" aria-label="Header">
  32. <a href=".." title="OpenBLAS" class="md-header__button md-logo" aria-label="OpenBLAS" data-md-component="logo">
  33. <img src="../logo.svg" alt="logo">
  34. </a>
  35. <label class="md-header__button md-icon" for="__drawer">
  36. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3zm0 5h18v2H3zm0 5h18v2H3z"/></svg>
  37. </label>
  38. <div class="md-header__title" data-md-component="header-title">
  39. <div class="md-header__ellipsis">
  40. <div class="md-header__topic">
  41. <span class="md-ellipsis">
  42. OpenBLAS
  43. </span>
  44. </div>
  45. <div class="md-header__topic" data-md-component="header-topic">
  46. <span class="md-ellipsis">
  47. Install OpenBLAS
  48. </span>
  49. </div>
  50. </div>
  51. </div>
  52. <form class="md-header__option" data-md-component="palette">
  53. <input class="md-option" data-md-color-media="" data-md-color-scheme="slate" data-md-color-primary="blue-grey" data-md-color-accent="indigo" aria-label="Switch to light mode" type="radio" name="__palette" id="__palette_0">
  54. <label class="md-header__button md-icon" title="Switch to light mode" for="__palette_1" hidden>
  55. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 18c-.89 0-1.74-.2-2.5-.55C11.56 16.5 13 14.42 13 12s-1.44-4.5-3.5-5.45C10.26 6.2 11.11 6 12 6a6 6 0 0 1 6 6 6 6 0 0 1-6 6m8-9.31V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12z"/></svg>
  56. </label>
  57. <input class="md-option" data-md-color-media="" data-md-color-scheme="default" data-md-color-primary="blue-grey" data-md-color-accent="indigo" aria-label="Switch to dark mode" type="radio" name="__palette" id="__palette_1">
  58. <label class="md-header__button md-icon" title="Switch to dark mode" for="__palette_0" hidden>
  59. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a4 4 0 0 0-4 4 4 4 0 0 0 4 4 4 4 0 0 0 4-4 4 4 0 0 0-4-4m0 10a6 6 0 0 1-6-6 6 6 0 0 1 6-6 6 6 0 0 1 6 6 6 6 0 0 1-6 6m8-9.31V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12z"/></svg>
  60. </label>
  61. </form>
  62. <script>var palette=__md_get("__palette");if(palette&&palette.color){if("(prefers-color-scheme)"===palette.color.media){var media=matchMedia("(prefers-color-scheme: light)"),input=document.querySelector(media.matches?"[data-md-color-media='(prefers-color-scheme: light)']":"[data-md-color-media='(prefers-color-scheme: dark)']");palette.color.media=input.getAttribute("data-md-color-media"),palette.color.scheme=input.getAttribute("data-md-color-scheme"),palette.color.primary=input.getAttribute("data-md-color-primary"),palette.color.accent=input.getAttribute("data-md-color-accent")}for(var[key,value]of Object.entries(palette.color))document.body.setAttribute("data-md-color-"+key,value)}</script>
  63. <label class="md-header__button md-icon" for="__search">
  64. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5"/></svg>
  65. </label>
  66. <div class="md-search" data-md-component="search" role="dialog">
  67. <label class="md-search__overlay" for="__search"></label>
  68. <div class="md-search__inner" role="search">
  69. <form class="md-search__form" name="search">
  70. <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" required>
  71. <label class="md-search__icon md-icon" for="__search">
  72. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5"/></svg>
  73. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11z"/></svg>
  74. </label>
  75. <nav class="md-search__options" aria-label="Search">
  76. <button type="reset" class="md-search__icon md-icon" title="Clear" aria-label="Clear" tabindex="-1">
  77. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>
  78. </button>
  79. </nav>
  80. </form>
  81. <div class="md-search__output">
  82. <div class="md-search__scrollwrap" tabindex="0" data-md-scrollfix>
  83. <div class="md-search-result" data-md-component="search-result">
  84. <div class="md-search-result__meta">
  85. Initializing search
  86. </div>
  87. <ol class="md-search-result__list" role="presentation"></ol>
  88. </div>
  89. </div>
  90. </div>
  91. </div>
  92. </div>
  93. <div class="md-header__source">
  94. <a href="https://github.com/OpenMathLib/OpenBLAS" title="Go to repository" class="md-source" data-md-component="source">
  95. <div class="md-source__icon md-icon">
  96. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 6.7.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc.--><path d="M439.55 236.05 244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81"/></svg>
  97. </div>
  98. <div class="md-source__repository">
  99. GitHub
  100. </div>
  101. </a>
  102. </div>
  103. </nav>
  104. </header>
  105. <div class="md-container" data-md-component="container">
  106. <main class="md-main" data-md-component="main">
  107. <div class="md-main__inner md-grid">
  108. <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" >
  109. <div class="md-sidebar__scrollwrap">
  110. <div class="md-sidebar__inner">
  111. <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
  112. <label class="md-nav__title" for="__drawer">
  113. <a href=".." title="OpenBLAS" class="md-nav__button md-logo" aria-label="OpenBLAS" data-md-component="logo">
  114. <img src="../logo.svg" alt="logo">
  115. </a>
  116. OpenBLAS
  117. </label>
  118. <div class="md-nav__source">
  119. <a href="https://github.com/OpenMathLib/OpenBLAS" title="Go to repository" class="md-source" data-md-component="source">
  120. <div class="md-source__icon md-icon">
  121. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 6.7.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc.--><path d="M439.55 236.05 244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81"/></svg>
  122. </div>
  123. <div class="md-source__repository">
  124. GitHub
  125. </div>
  126. </a>
  127. </div>
  128. <ul class="md-nav__list" data-md-scrollfix>
  129. <li class="md-nav__item">
  130. <a href=".." class="md-nav__link">
  131. <span class="md-ellipsis">
  132. Home
  133. </span>
  134. </a>
  135. </li>
  136. <li class="md-nav__item md-nav__item--active">
  137. <input class="md-nav__toggle md-toggle" type="checkbox" id="__toc">
  138. <label class="md-nav__link md-nav__link--active" for="__toc">
  139. <span class="md-ellipsis">
  140. Install OpenBLAS
  141. </span>
  142. <span class="md-nav__icon md-icon"></span>
  143. </label>
  144. <a href="./" class="md-nav__link md-nav__link--active">
  145. <span class="md-ellipsis">
  146. Install OpenBLAS
  147. </span>
  148. </a>
  149. <nav class="md-nav md-nav--secondary" aria-label="Table of contents">
  150. <label class="md-nav__title" for="__toc">
  151. <span class="md-nav__icon md-icon"></span>
  152. Table of contents
  153. </label>
  154. <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
  155. <li class="md-nav__item">
  156. <a href="#installing-with-a-package-manager" class="md-nav__link">
  157. <span class="md-ellipsis">
  158. Installing with a package manager
  159. </span>
  160. </a>
  161. <nav class="md-nav" aria-label="Installing with a package manager">
  162. <ul class="md-nav__list">
  163. <li class="md-nav__item">
  164. <a href="#linux" class="md-nav__link">
  165. <span class="md-ellipsis">
  166. Linux
  167. </span>
  168. </a>
  169. </li>
  170. <li class="md-nav__item">
  171. <a href="#windows" class="md-nav__link">
  172. <span class="md-ellipsis">
  173. Windows
  174. </span>
  175. </a>
  176. </li>
  177. <li class="md-nav__item">
  178. <a href="#macos" class="md-nav__link">
  179. <span class="md-ellipsis">
  180. macOS
  181. </span>
  182. </a>
  183. </li>
  184. <li class="md-nav__item">
  185. <a href="#freebsd" class="md-nav__link">
  186. <span class="md-ellipsis">
  187. FreeBSD
  188. </span>
  189. </a>
  190. </li>
  191. </ul>
  192. </nav>
  193. </li>
  194. <li class="md-nav__item">
  195. <a href="#building-from-source" class="md-nav__link">
  196. <span class="md-ellipsis">
  197. Building from source
  198. </span>
  199. </a>
  200. <nav class="md-nav" aria-label="Building from source">
  201. <ul class="md-nav__list">
  202. <li class="md-nav__item">
  203. <a href="#linux-and-macos" class="md-nav__link">
  204. <span class="md-ellipsis">
  205. Linux and macOS
  206. </span>
  207. </a>
  208. </li>
  209. <li class="md-nav__item">
  210. <a href="#windows_1" class="md-nav__link">
  211. <span class="md-ellipsis">
  212. Windows
  213. </span>
  214. </a>
  215. <nav class="md-nav" aria-label="Windows">
  216. <ul class="md-nav__list">
  217. <li class="md-nav__item">
  218. <a href="#visual-studio-native-windows-abi" class="md-nav__link">
  219. <span class="md-ellipsis">
  220. Visual Studio &amp; native Windows ABI
  221. </span>
  222. </a>
  223. </li>
  224. <li class="md-nav__item">
  225. <a href="#mingw-gnu-abi" class="md-nav__link">
  226. <span class="md-ellipsis">
  227. MinGW &amp; GNU ABI
  228. </span>
  229. </a>
  230. </li>
  231. </ul>
  232. </nav>
  233. </li>
  234. <li class="md-nav__item">
  235. <a href="#windows-on-arm" class="md-nav__link">
  236. <span class="md-ellipsis">
  237. Windows on Arm
  238. </span>
  239. </a>
  240. <nav class="md-nav" aria-label="Windows on Arm">
  241. <ul class="md-nav__list">
  242. <li class="md-nav__item">
  243. <a href="#generating-an-import-library" class="md-nav__link">
  244. <span class="md-ellipsis">
  245. Generating an import library
  246. </span>
  247. </a>
  248. </li>
  249. </ul>
  250. </nav>
  251. </li>
  252. <li class="md-nav__item">
  253. <a href="#android" class="md-nav__link">
  254. <span class="md-ellipsis">
  255. Android
  256. </span>
  257. </a>
  258. <nav class="md-nav" aria-label="Android">
  259. <ul class="md-nav__list">
  260. <li class="md-nav__item">
  261. <a href="#building-for-armv7" class="md-nav__link">
  262. <span class="md-ellipsis">
  263. Building for ARMV7
  264. </span>
  265. </a>
  266. </li>
  267. <li class="md-nav__item">
  268. <a href="#building-for-armv8" class="md-nav__link">
  269. <span class="md-ellipsis">
  270. Building for ARMV8
  271. </span>
  272. </a>
  273. </li>
  274. </ul>
  275. </nav>
  276. </li>
  277. <li class="md-nav__item">
  278. <a href="#iphoneios" class="md-nav__link">
  279. <span class="md-ellipsis">
  280. iPhone/iOS
  281. </span>
  282. </a>
  283. </li>
  284. <li class="md-nav__item">
  285. <a href="#mips" class="md-nav__link">
  286. <span class="md-ellipsis">
  287. MIPS
  288. </span>
  289. </a>
  290. </li>
  291. <li class="md-nav__item">
  292. <a href="#freebsd_1" class="md-nav__link">
  293. <span class="md-ellipsis">
  294. FreeBSD
  295. </span>
  296. </a>
  297. </li>
  298. <li class="md-nav__item">
  299. <a href="#cortex-m" class="md-nav__link">
  300. <span class="md-ellipsis">
  301. Cortex-M
  302. </span>
  303. </a>
  304. </li>
  305. </ul>
  306. </nav>
  307. </li>
  308. </ul>
  309. </nav>
  310. </li>
  311. <li class="md-nav__item">
  312. <a href="../user_manual/" class="md-nav__link">
  313. <span class="md-ellipsis">
  314. User manual
  315. </span>
  316. </a>
  317. </li>
  318. <li class="md-nav__item">
  319. <a href="../extensions/" class="md-nav__link">
  320. <span class="md-ellipsis">
  321. Extensions
  322. </span>
  323. </a>
  324. </li>
  325. <li class="md-nav__item">
  326. <a href="../developers/" class="md-nav__link">
  327. <span class="md-ellipsis">
  328. Developer manual
  329. </span>
  330. </a>
  331. </li>
  332. <li class="md-nav__item">
  333. <a href="../build_system/" class="md-nav__link">
  334. <span class="md-ellipsis">
  335. Build system
  336. </span>
  337. </a>
  338. </li>
  339. <li class="md-nav__item">
  340. <a href="../distributing/" class="md-nav__link">
  341. <span class="md-ellipsis">
  342. Redistributing OpenBLAS
  343. </span>
  344. </a>
  345. </li>
  346. <li class="md-nav__item">
  347. <a href="../ci/" class="md-nav__link">
  348. <span class="md-ellipsis">
  349. CI jobs
  350. </span>
  351. </a>
  352. </li>
  353. <li class="md-nav__item">
  354. <a href="../about/" class="md-nav__link">
  355. <span class="md-ellipsis">
  356. About
  357. </span>
  358. </a>
  359. </li>
  360. <li class="md-nav__item">
  361. <a href="../faq/" class="md-nav__link">
  362. <span class="md-ellipsis">
  363. FAQ
  364. </span>
  365. </a>
  366. </li>
  367. </ul>
  368. </nav>
  369. </div>
  370. </div>
  371. </div>
  372. <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" >
  373. <div class="md-sidebar__scrollwrap">
  374. <div class="md-sidebar__inner">
  375. <nav class="md-nav md-nav--secondary" aria-label="Table of contents">
  376. <label class="md-nav__title" for="__toc">
  377. <span class="md-nav__icon md-icon"></span>
  378. Table of contents
  379. </label>
  380. <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
  381. <li class="md-nav__item">
  382. <a href="#installing-with-a-package-manager" class="md-nav__link">
  383. <span class="md-ellipsis">
  384. Installing with a package manager
  385. </span>
  386. </a>
  387. <nav class="md-nav" aria-label="Installing with a package manager">
  388. <ul class="md-nav__list">
  389. <li class="md-nav__item">
  390. <a href="#linux" class="md-nav__link">
  391. <span class="md-ellipsis">
  392. Linux
  393. </span>
  394. </a>
  395. </li>
  396. <li class="md-nav__item">
  397. <a href="#windows" class="md-nav__link">
  398. <span class="md-ellipsis">
  399. Windows
  400. </span>
  401. </a>
  402. </li>
  403. <li class="md-nav__item">
  404. <a href="#macos" class="md-nav__link">
  405. <span class="md-ellipsis">
  406. macOS
  407. </span>
  408. </a>
  409. </li>
  410. <li class="md-nav__item">
  411. <a href="#freebsd" class="md-nav__link">
  412. <span class="md-ellipsis">
  413. FreeBSD
  414. </span>
  415. </a>
  416. </li>
  417. </ul>
  418. </nav>
  419. </li>
  420. <li class="md-nav__item">
  421. <a href="#building-from-source" class="md-nav__link">
  422. <span class="md-ellipsis">
  423. Building from source
  424. </span>
  425. </a>
  426. <nav class="md-nav" aria-label="Building from source">
  427. <ul class="md-nav__list">
  428. <li class="md-nav__item">
  429. <a href="#linux-and-macos" class="md-nav__link">
  430. <span class="md-ellipsis">
  431. Linux and macOS
  432. </span>
  433. </a>
  434. </li>
  435. <li class="md-nav__item">
  436. <a href="#windows_1" class="md-nav__link">
  437. <span class="md-ellipsis">
  438. Windows
  439. </span>
  440. </a>
  441. <nav class="md-nav" aria-label="Windows">
  442. <ul class="md-nav__list">
  443. <li class="md-nav__item">
  444. <a href="#visual-studio-native-windows-abi" class="md-nav__link">
  445. <span class="md-ellipsis">
  446. Visual Studio &amp; native Windows ABI
  447. </span>
  448. </a>
  449. </li>
  450. <li class="md-nav__item">
  451. <a href="#mingw-gnu-abi" class="md-nav__link">
  452. <span class="md-ellipsis">
  453. MinGW &amp; GNU ABI
  454. </span>
  455. </a>
  456. </li>
  457. </ul>
  458. </nav>
  459. </li>
  460. <li class="md-nav__item">
  461. <a href="#windows-on-arm" class="md-nav__link">
  462. <span class="md-ellipsis">
  463. Windows on Arm
  464. </span>
  465. </a>
  466. <nav class="md-nav" aria-label="Windows on Arm">
  467. <ul class="md-nav__list">
  468. <li class="md-nav__item">
  469. <a href="#generating-an-import-library" class="md-nav__link">
  470. <span class="md-ellipsis">
  471. Generating an import library
  472. </span>
  473. </a>
  474. </li>
  475. </ul>
  476. </nav>
  477. </li>
  478. <li class="md-nav__item">
  479. <a href="#android" class="md-nav__link">
  480. <span class="md-ellipsis">
  481. Android
  482. </span>
  483. </a>
  484. <nav class="md-nav" aria-label="Android">
  485. <ul class="md-nav__list">
  486. <li class="md-nav__item">
  487. <a href="#building-for-armv7" class="md-nav__link">
  488. <span class="md-ellipsis">
  489. Building for ARMV7
  490. </span>
  491. </a>
  492. </li>
  493. <li class="md-nav__item">
  494. <a href="#building-for-armv8" class="md-nav__link">
  495. <span class="md-ellipsis">
  496. Building for ARMV8
  497. </span>
  498. </a>
  499. </li>
  500. </ul>
  501. </nav>
  502. </li>
  503. <li class="md-nav__item">
  504. <a href="#iphoneios" class="md-nav__link">
  505. <span class="md-ellipsis">
  506. iPhone/iOS
  507. </span>
  508. </a>
  509. </li>
  510. <li class="md-nav__item">
  511. <a href="#mips" class="md-nav__link">
  512. <span class="md-ellipsis">
  513. MIPS
  514. </span>
  515. </a>
  516. </li>
  517. <li class="md-nav__item">
  518. <a href="#freebsd_1" class="md-nav__link">
  519. <span class="md-ellipsis">
  520. FreeBSD
  521. </span>
  522. </a>
  523. </li>
  524. <li class="md-nav__item">
  525. <a href="#cortex-m" class="md-nav__link">
  526. <span class="md-ellipsis">
  527. Cortex-M
  528. </span>
  529. </a>
  530. </li>
  531. </ul>
  532. </nav>
  533. </li>
  534. </ul>
  535. </nav>
  536. </div>
  537. </div>
  538. </div>
  539. <div class="md-content" data-md-component="content">
  540. <article class="md-content__inner md-typeset">
  541. <h1 id="install-openblas">Install OpenBLAS</h1>
  542. <p>OpenBLAS can be installed through package managers or from source. If you only
  543. want to use OpenBLAS rather than make changes to it, we recommend installing a
  544. pre-built binary package with your package manager of choice.</p>
  545. <p>This page contains an overview of installing with package managers as well as
  546. from source. For the latter, see <a href="#building-from-source">further down on this page</a>.</p>
  547. <h2 id="installing-with-a-package-manager">Installing with a package manager</h2>
  548. <div class="admonition note">
  549. <p class="admonition-title">Note</p>
  550. <p>Almost every package manager provides OpenBLAS packages; the list on this
  551. page is not comprehensive. If your package manager of choice isn't shown
  552. here, please search its package database for <code>openblas</code> or <code>libopenblas</code>.</p>
  553. </div>
  554. <h3 id="linux">Linux</h3>
  555. <p>On Linux, OpenBLAS can be installed with the system package manager, or with a
  556. package manager like <a href="https://docs.conda.io/en/latest/">Conda</a>
  557. (or alternative package managers for the conda-forge ecosystem, like
  558. <a href="https://mamba.readthedocs.io/en/latest/">Mamba</a>,
  559. <a href="https://mamba.readthedocs.io/en/latest/user_guide/micromamba.html">Micromamba</a>,
  560. or <a href="https://pixi.sh/latest/#windows-installer">Pixi</a>),
  561. <a href="https://spack.io/">Spack</a>, or <a href="https://nixos.org/">Nix</a>. For the latter set of
  562. tools, the package name in all cases is <code>openblas</code>. Since package management in
  563. quite a few of these tools is declarative (i.e., managed by adding <code>openblas</code>
  564. to a metadata file describing the dependencies for your project or
  565. environment), we won't attempt to give detailed instructions for these tools here.</p>
  566. <p>Linux distributions typically split OpenBLAS up in two packages: one containing
  567. the library itself (typically named <code>openblas</code> or <code>libopenblas</code>), and one containing headers,
  568. pkg-config and CMake files (typically named the same as the package for the
  569. library with <code>-dev</code> or <code>-devel</code> appended; e.g., <code>openblas-devel</code>). Please keep
  570. in mind that if you want to install OpenBLAS in order to use it directly in
  571. your own project, you will need to install both of those packages.</p>
  572. <p>Distro-specific installation commands:</p>
  573. <div class="tabbed-set tabbed-alternate" data-tabs="1:4"><input checked="checked" id="__tabbed_1_1" name="__tabbed_1" type="radio" /><input id="__tabbed_1_2" name="__tabbed_1" type="radio" /><input id="__tabbed_1_3" name="__tabbed_1" type="radio" /><input id="__tabbed_1_4" name="__tabbed_1" type="radio" /><div class="tabbed-labels"><label for="__tabbed_1_1">Debian/Ubuntu/Mint/Kali</label><label for="__tabbed_1_2">openSUSE/SLE</label><label for="__tabbed_1_3">Fedora/CentOS/RHEL</label><label for="__tabbed_1_4">Arch/Manjaro/Antergos</label></div>
  574. <div class="tabbed-content">
  575. <div class="tabbed-block">
  576. <p><div class="highlight"><pre><span></span><code>$<span class="w"> </span>sudo<span class="w"> </span>apt<span class="w"> </span>update
  577. $<span class="w"> </span>sudo<span class="w"> </span>apt<span class="w"> </span>install<span class="w"> </span>libopenblas-dev
  578. </code></pre></div>
  579. OpenBLAS can be configured as the default BLAS through the <code>update-alternatives</code> mechanism:</p>
  580. <div class="highlight"><pre><span></span><code>$<span class="w"> </span>sudo<span class="w"> </span>update-alternatives<span class="w"> </span>--config<span class="w"> </span>libblas.so.3
  581. </code></pre></div>
  582. </div>
  583. <div class="tabbed-block">
  584. <div class="highlight"><pre><span></span><code>$<span class="w"> </span>sudo<span class="w"> </span>zypper<span class="w"> </span>refresh
  585. $<span class="w"> </span>sudo<span class="w"> </span>zypper<span class="w"> </span>install<span class="w"> </span>openblas-devel
  586. </code></pre></div>
  587. <p>OpenBLAS can be configured as the default BLAS through the <code>update-alternatives</code> mechanism:
  588. <div class="highlight"><pre><span></span><code>$<span class="w"> </span>sudo<span class="w"> </span>update-alternatives<span class="w"> </span>--config<span class="w"> </span>libblas.so.3
  589. </code></pre></div></p>
  590. </div>
  591. <div class="tabbed-block">
  592. <div class="highlight"><pre><span></span><code>$<span class="w"> </span>dnf<span class="w"> </span>check-update
  593. $<span class="w"> </span>dnf<span class="w"> </span>install<span class="w"> </span>openblas-devel
  594. </code></pre></div>
  595. <div class="admonition warning">
  596. <p class="admonition-title">Warning</p>
  597. <p>Fedora does not ship the pkg-config files for OpenBLAS. Instead, it wants you to
  598. link against <a href="https://www.mpi-magdeburg.mpg.de/projects/flexiblas">FlexiBLAS</a> (which
  599. uses OpenBLAS by default as its backend on Fedora), which you can install with:</p>
  600. <div class="highlight"><pre><span></span><code>$<span class="w"> </span>dnf<span class="w"> </span>install<span class="w"> </span>flexiblas-devel
  601. </code></pre></div>
  602. </div>
  603. <p>For CentOS and RHEL, OpenBLAS packages are provided via the <a href="https://fedoraproject.org/wiki/EPEL">Fedora EPEL repository</a>.
  604. After adding that repository and its repository keys, you can install
  605. <code>openblas-devel</code> with either <code>dnf</code> or <code>yum</code>.</p>
  606. </div>
  607. <div class="tabbed-block">
  608. <div class="highlight"><pre><span></span><code>$<span class="w"> </span>sudo<span class="w"> </span>pacman<span class="w"> </span>-S<span class="w"> </span>openblas
  609. </code></pre></div>
  610. </div>
  611. </div>
  612. </div>
  613. <h3 id="windows">Windows</h3>
  614. <div class="tabbed-set tabbed-alternate" data-tabs="2:3"><input checked="checked" id="__tabbed_2_1" name="__tabbed_2" type="radio" /><input id="__tabbed_2_2" name="__tabbed_2" type="radio" /><input id="__tabbed_2_3" name="__tabbed_2" type="radio" /><div class="tabbed-labels"><label for="__tabbed_2_1">Conda-forge</label><label for="__tabbed_2_2">vcpkg</label><label for="__tabbed_2_3">OpenBLAS releases</label></div>
  615. <div class="tabbed-content">
  616. <div class="tabbed-block">
  617. <p>OpenBLAS can be installed with <code>conda</code> (or <code>mamba</code>, <code>micromamba</code>, or
  618. <code>pixi</code>) from conda-forge:
  619. <div class="highlight"><pre><span></span><code>conda install openblas
  620. </code></pre></div></p>
  621. <p>Conda-forge provides a method for switching the default BLAS implementation
  622. used by all packages. To use that for OpenBLAS, install <code>libblas=*=*openblas</code>
  623. (see <a href="https://conda-forge.org/docs/maintainer/knowledge_base/#switching-blas-implementation">the docs on this mechanism</a>
  624. for more details).</p>
  625. </div>
  626. <div class="tabbed-block">
  627. <p>OpenBLAS can be installed with vcpkg:
  628. <div class="highlight"><pre><span></span><code># In classic mode:
  629. vcpkg install openblas
  630. # Or in manifest mode:
  631. vcpkg add port openblas
  632. </code></pre></div></p>
  633. </div>
  634. <div class="tabbed-block">
  635. <p>Windows is the only platform for which binaries are made available by the
  636. OpenBLAS project itself. They can be downloaded from the GitHub
  637. Releases](https://github.com/OpenMathLib/OpenBLAS/releases) page. These
  638. binaries are built with MinGW, using the following build options:
  639. <div class="highlight"><pre><span></span><code>NUM_THREADS=64 TARGET=GENERIC DYNAMIC_ARCH=1 DYNAMIC_OLDER=1 CONSISTENT_FPCSR=1 INTERFACE=0
  640. </code></pre></div>
  641. There are separate packages for x86-64 and x86. The zip archive contains
  642. the include files, static and shared libraries, as well as configuration
  643. files for getting them found via CMake or pkg-config. To use these
  644. binaries, create a suitable folder for your OpenBLAS installation and unzip
  645. the <code>.zip</code> bundle there (note that you will need to edit the provided
  646. <code>openblas.pc</code> and <code>OpenBLASConfig.cmake</code> to reflect the installation path
  647. on your computer, as distributed they have "win" or "win64" reflecting the
  648. local paths on the system they were built on).</p>
  649. <p>Note that the same binaries can be downloaded
  650. <a href="http://sourceforge.net/projects/openblas/files">from SourceForge</a>; this is
  651. mostly of historical interest.</p>
  652. </div>
  653. </div>
  654. </div>
  655. <h3 id="macos">macOS</h3>
  656. <p>To install OpenBLAS with a package manager on macOS, run:</p>
  657. <div class="tabbed-set tabbed-alternate" data-tabs="3:3"><input checked="checked" id="__tabbed_3_1" name="__tabbed_3" type="radio" /><input id="__tabbed_3_2" name="__tabbed_3" type="radio" /><input id="__tabbed_3_3" name="__tabbed_3" type="radio" /><div class="tabbed-labels"><label for="__tabbed_3_1">Homebrew</label><label for="__tabbed_3_2">MacPorts</label><label for="__tabbed_3_3">Conda-forge</label></div>
  658. <div class="tabbed-content">
  659. <div class="tabbed-block">
  660. <div class="highlight"><pre><span></span><code>%<span class="w"> </span>brew<span class="w"> </span>install<span class="w"> </span>openblas
  661. </code></pre></div>
  662. </div>
  663. <div class="tabbed-block">
  664. <div class="highlight"><pre><span></span><code>%<span class="w"> </span>sudo<span class="w"> </span>port<span class="w"> </span>install<span class="w"> </span>OpenBLAS-devel
  665. </code></pre></div>
  666. </div>
  667. <div class="tabbed-block">
  668. <div class="highlight"><pre><span></span><code>%<span class="w"> </span>conda<span class="w"> </span>install<span class="w"> </span>openblas
  669. </code></pre></div>
  670. <p>Conda-forge provides a method for switching the default BLAS implementation
  671. used by all packages. To use that for OpenBLAS, install <code>libblas=*=*openblas</code>
  672. (see <a href="https://conda-forge.org/docs/maintainer/knowledge_base/#switching-blas-implementation">the docs on this mechanism</a>
  673. for more details).</p>
  674. </div>
  675. </div>
  676. </div>
  677. <h3 id="freebsd">FreeBSD</h3>
  678. <p>You can install OpenBLAS from the FreeBSD <a href="https://www.freebsd.org/ports/index.html">Ports collection</a>:
  679. <div class="highlight"><pre><span></span><code>pkg install openblas
  680. </code></pre></div></p>
  681. <h2 id="building-from-source">Building from source</h2>
  682. <p>We recommend download the latest <a href="https://github.com/OpenMathLib/OpenBLAS/releases">stable version</a>
  683. from the GitHub Releases page, or checking it out from a git tag, rather than a
  684. dev version from the <code>develop</code> branch.</p>
  685. <div class="admonition tip">
  686. <p class="admonition-title">Tip</p>
  687. <p>The User manual contains <a href="../user_manual/#compiling-openblas">a section with detailed information on compiling OpenBLAS</a>,
  688. including how to customize builds and how to cross-compile. Please read
  689. that documentation first. This page contains only platform-specific build
  690. information, and assumes you already understand the general build system
  691. invocations to build OpenBLAS, with the specific build options you want to
  692. control multi-threading and other non-platform-specific behavior).</p>
  693. </div>
  694. <h3 id="linux-and-macos">Linux and macOS</h3>
  695. <p>Ensure you have C and Fortran compilers installed, then simply type <code>make</code> to compile the library.
  696. There are no other build dependencies, nor unusual platform-specific
  697. environment variables to set or other system setup to do.</p>
  698. <div class="admonition note">
  699. <p class="admonition-title">Note</p>
  700. <p>When building in an emulator (KVM, QEMU, etc.), please make sure that the combination of CPU features exposed to
  701. the virtual environment matches that of an existing CPU to allow detection of the CPU model to succeed.
  702. (With <code>qemu</code>, this can be done by passing <code>-cpu host</code> or a supported model name at invocation).</p>
  703. </div>
  704. <h3 id="windows_1">Windows</h3>
  705. <p>We support building OpenBLAS with either MinGW or Visual Studio on Windows.
  706. Using MSVC will yield an OpenBLAS build with the Windows platform-native ABI.
  707. Using MinGW will yield a different ABI. We'll describe both methods in detail
  708. in this section, since the process for each is quite different.</p>
  709. <h4 id="visual-studio-native-windows-abi">Visual Studio &amp; native Windows ABI</h4>
  710. <p>For Visual Studio, you can use CMake to generate Visual Studio solution files;
  711. note that you will need at least CMake 3.11 for linking to work correctly).</p>
  712. <p>Note that you need a Fortran compiler if you plan to build and use the LAPACK
  713. functions included with OpenBLAS. The sections below describe using either
  714. <code>flang</code> as an add-on to clang/LLVM or <code>gfortran</code> as part of MinGW for this
  715. purpose. If you want to use the Intel Fortran compiler (<code>ifort</code> or <code>ifx</code>) for
  716. this, be sure to also use the Intel C compiler (<code>icc</code> or <code>icx</code>) for building
  717. the C parts, as the ABI imposed by <code>ifort</code> is incompatible with MSVC</p>
  718. <p>A fully-optimized OpenBLAS that can be statically or dynamically linked to your
  719. application can currently be built for the 64-bit architecture with the LLVM
  720. compiler infrastructure. We're going to use <a href="https://docs.anaconda.com/miniconda/">Miniconda3</a>
  721. to grab all of the tools we need, since some of them are in an experimental
  722. status. Before you begin, you'll need to have Microsoft Visual Studio 2015 or
  723. newer installed.</p>
  724. <ol>
  725. <li>Install Miniconda3 for 64-bit Windows using <code>winget install --id Anaconda.Miniconda3</code>,
  726. or easily download from <a href="https://docs.conda.io/en/latest/miniconda.html">conda.io</a>.</li>
  727. <li>Open the "Anaconda Command Prompt" now available in the Start Menu, or at <code>%USERPROFILE%\miniconda3\shell\condabin\conda-hook.ps1</code>.</li>
  728. <li>In that command prompt window, use <code>cd</code> to change to the directory where you want to build OpenBLAS.</li>
  729. <li>Now install all of the tools we need:
  730. <div class="highlight"><pre><span></span><code>conda update -n base conda
  731. conda config --add channels conda-forge
  732. conda install -y cmake flang clangdev perl libflang ninja
  733. </code></pre></div></li>
  734. <li>
  735. <p>Still in the Anaconda Command Prompt window, activate the 64-bit MSVC environment with <code>vcvarsall x64</code>.
  736. On Windows 11 with Visual Studio 2022, this would be done by invoking:</p>
  737. <div class="highlight"><pre><span></span><code><span class="s2">&quot;c:\Program Files\Microsoft Visual Studio\2022\Community\vc\Auxiliary\Build\vcvars64.bat&quot;</span>
  738. </code></pre></div>
  739. <p>With VS2019, the command should be the same (except for the year number of course).
  740. For other versions of MSVC, please check the Visual Studio documentation for
  741. exactly how to invoke the <code>vcvars64.bat</code> script.</p>
  742. <p>Confirm that the environment is active by typing <code>link</code>. This should return
  743. a long list of possible options for the <code>link</code> command. If it just returns
  744. <em>"command not found"</em> or similar, review and retype the call to <code>vcvars64.bat</code>.</p>
  745. <div class="admonition note">
  746. <p class="admonition-title">Note</p>
  747. <p>if you are working from a Visual Studio command prompt window instead
  748. (so that you do not have to do the <code>vcvars</code> call), you need to invoke
  749. <code>conda activate</code> so that <code>CONDA_PREFIX</code> etc. get set up correctly before
  750. proceeding to step 6. Failing to do so will lead to link errors like
  751. <code>libflangmain.lib</code> not getting found later in the build.</p>
  752. </div>
  753. </li>
  754. <li>
  755. <p>Now configure the project with CMake. Starting in the project directory, execute the following:
  756. <div class="highlight"><pre><span></span><code>set &quot;LIB=%CONDA_PREFIX%\Library\lib;%LIB%&quot;
  757. set &quot;CPATH=%CONDA_PREFIX%\Library\include;%CPATH%&quot;
  758. mkdir build
  759. cd build
  760. cmake .. -G &quot;Ninja&quot; -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_C_COMPILER=clang-cl -DCMAKE_Fortran_COMPILER=flang -DCMAKE_MT=mt -DBUILD_WITHOUT_LAPACK=no -DNOFORTRAN=0 -DDYNAMIC_ARCH=ON -DCMAKE_BUILD_TYPE=Release
  761. </code></pre></div></p>
  762. <p>You may want to add further options in the <code>cmake</code> command here. For
  763. instance, the default only produces a static <code>.lib</code> version of the library.
  764. If you would rather have a DLL, add <code>-DBUILD_SHARED_LIBS=ON</code> above. Note that
  765. this step only creates some command files and directories, the actual build
  766. happens next.</p>
  767. </li>
  768. <li>
  769. <p>Build the project:</p>
  770. <p><div class="highlight"><pre><span></span><code>cmake --build . --config Release
  771. </code></pre></div>
  772. This step will create the OpenBLAS library in the <code>lib</code> directory, and
  773. various build-time tests in the <code>test</code>, <code>ctest</code> and <code>openblas_utest</code>
  774. directories. However it will not separate the header files you might need
  775. for building your own programs from those used internally. To put all
  776. relevant files in a more convenient arrangement, run the next step.</p>
  777. </li>
  778. <li>
  779. <p>Install all relevant files created by the build:</p>
  780. <p><div class="highlight"><pre><span></span><code>cmake --install . --prefix c:\opt -v
  781. </code></pre></div>
  782. This will copy all files that are needed for building and running your own
  783. programs with OpenBLAS to the given location, creating appropriate
  784. subdirectories for the individual kinds of files. In the case of <code>C:\opt</code> as
  785. given above, this would be:</p>
  786. <ul>
  787. <li><code>C:\opt\include\openblas</code> for the header files, </li>
  788. <li><code>C:\opt\bin</code> for the <code>libopenblas.dll</code> shared library,</li>
  789. <li><code>C:\opt\lib</code> for the static library, and</li>
  790. <li><code>C:\opt\share</code> holds various support files that enable other cmake-based
  791. build scripts to find OpenBLAS automatically.</li>
  792. </ul>
  793. </li>
  794. </ol>
  795. <div class="admonition tip">
  796. <p class="admonition-title">Change in complex types for Visual Studio 2017 and up</p>
  797. <p>In newer Visual Studio versions, Microsoft has changed
  798. <a href="https://docs.microsoft.com/en-us/cpp/c-runtime-library/complex-math-support?view=msvc-170#types-used-in-complex-math">how it handles complex types</a>.
  799. Even when using a precompiled version of OpenBLAS, you might need to define
  800. <code>LAPACK_COMPLEX_CUSTOM</code> in order to define complex types properly for MSVC.
  801. For example, some variant of the following might help:</p>
  802. <div class="highlight"><pre><span></span><code><span class="cp">#if defined(_MSC_VER)</span>
  803. <span class="w"> </span><span class="cp">#include</span><span class="w"> </span><span class="cpf">&lt;complex.h&gt;</span>
  804. <span class="w"> </span><span class="cp">#define LAPACK_COMPLEX_CUSTOM</span>
  805. <span class="w"> </span><span class="cp">#define lapack_complex_float _Fcomplex</span>
  806. <span class="w"> </span><span class="cp">#define lapack_complex_double _Dcomplex</span>
  807. <span class="cp">#endif</span>
  808. </code></pre></div>
  809. <p>For reference, see
  810. <a href="https://github.com/OpenMathLib/OpenBLAS/issues/3661">openblas#3661</a>,
  811. <a href="https://github.com/Reference-LAPACK/lapack/issues/683">lapack#683</a>, and
  812. <a href="https://stackoverflow.com/questions/47520244/using-openblas-lapacke-in-visual-studio">this Stack Overflow question</a>.</p>
  813. </div>
  814. <div class="admonition warning">
  815. <p class="admonition-title">Building 32-bit binaries with MSVC</p>
  816. <p>This method may produce binaries which demonstrate significantly lower
  817. performance than those built with the other methods. The Visual Studio
  818. compiler does not support the dialect of assembly used in the cpu-specific
  819. optimized files, so only the "generic" <code>TARGET</code> which is written in pure C
  820. will get built. For the same reason it is not possible (and not necessary)
  821. to use <code>-DDYNAMIC_ARCH=ON</code> in a Visual Studio build. You may consider
  822. building for the 32-bit architecture using the GNU (MinGW) ABI instead.</p>
  823. </div>
  824. <h5 id="cmake-visual-studio-integration">CMake &amp; Visual Studio integration</h5>
  825. <p>To generate Visual Studio solution files, ensure CMake is installed and then run:
  826. <div class="highlight"><pre><span></span><code># Do this from Powershell so cmake can find visual studio
  827. cmake -G &quot;Visual Studio 14 Win64&quot; -DCMAKE_BUILD_TYPE=Release .
  828. </code></pre></div></p>
  829. <p>To then build OpenBLAS using those solution files from within Visual Studio, we
  830. also need Perl. Please install it and ensure it's on the <code>PATH</code> (see, e.g.,
  831. <a href="http://stackoverflow.com/questions/3051049/active-perl-installation-on-windows-operating-system">this Stack Overflow question for how</a>).</p>
  832. <p>If you build from within Visual Studio, the dependencies may not be
  833. automatically configured: if you try to build <code>libopenblas</code> directly, it may
  834. fail with a message saying that some <code>.obj</code> files aren't found. If this
  835. happens, you can work around the problem by building the projects that
  836. <code>libopenblas</code> depends on before building <code>libopenblas</code> itself.</p>
  837. <h6 id="build-openblas-for-universal-windows-platform">Build OpenBLAS for Universal Windows Platform</h6>
  838. <p>OpenBLAS can be built targeting <a href="https://en.wikipedia.org/wiki/Universal_Windows_Platform">Universal Windows Platform</a>
  839. (UWP) like this:</p>
  840. <ol>
  841. <li>Follow the steps above to build the Visual Studio solution files for
  842. Windows. This builds the helper executables which are required when building
  843. the OpenBLAS Visual Studio solution files for UWP in step 2.</li>
  844. <li>
  845. <p>Remove the generated <code>CMakeCache.txt</code> and the <code>CMakeFiles</code> directory from
  846. the OpenBLAS source directory, then re-run CMake with the following options:</p>
  847. <p><div class="highlight"><pre><span></span><code># do this to build UWP compatible solution files
  848. cmake -G &quot;Visual Studio 14 Win64&quot; -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=&quot;10.0&quot; -DCMAKE_SYSTEM_PROCESSOR=AMD64 -DVS_WINRT_COMPONENT=TRUE -DCMAKE_BUILD_TYPE=Release .
  849. </code></pre></div>
  850. 3. Now build the solution with Visual Studio.</p>
  851. </li>
  852. </ol>
  853. <h4 id="mingw-gnu-abi">MinGW &amp; GNU ABI</h4>
  854. <div class="admonition note">
  855. <p class="admonition-title">Note</p>
  856. <p>The resulting library from building with MinGW as described below can be
  857. used in Visual Studio, but it can only be linked dynamically. This
  858. configuration has not been thoroughly tested and should be considered
  859. experimental.</p>
  860. </div>
  861. <p>To build OpenBLAS on Windows with MinGW:</p>
  862. <ol>
  863. <li>Install the MinGW (GCC) compiler suite, either the 32-bit
  864. [MinGW]((http://www.mingw.org/) or the 64-bit
  865. <a href="http://mingw-w64.sourceforge.net/">MinGW-w64</a> toolchain. Be sure to install
  866. its <code>gfortran</code> package as well (unless you really want to build the BLAS part
  867. of OpenBLAS only) and check that <code>gcc</code> and <code>gfortran</code> are the same version.
  868. In addition, please install MSYS2 with MinGW.</li>
  869. <li>Build OpenBLAS in the MSYS2 shell. Usually, you can just type <code>make</code>.
  870. OpenBLAS will detect the compiler and CPU automatically. </li>
  871. <li>After the build is complete, OpenBLAS will generate the static library
  872. <code>libopenblas.a</code> and the shared library <code>libopenblas.dll</code> in the folder. You
  873. can type <code>make PREFIX=/your/installation/path install</code> to install the
  874. library to a certain location.</li>
  875. </ol>
  876. <p>Note that OpenBLAS will generate the import library <code>libopenblas.dll.a</code> for
  877. <code>libopenblas.dll</code> by default.</p>
  878. <p>If you want to generate Windows-native PDB files from a MinGW build, you can
  879. use the <a href="https://github.com/rainers/cv2pdb">cv2pdb</a> tool to do so.</p>
  880. <p>To then use the built OpenBLAS shared library in Visual Studio:</p>
  881. <ol>
  882. <li>Copy the import library (<code>OPENBLAS_TOP_DIR/libopenblas.dll.a</code>) and the
  883. shared library (<code>libopenblas.dll</code>) into the same folder (this must be the
  884. folder of your project that is going to use the BLAS library. You may need
  885. to add <code>libopenblas.dll.a</code> to the linker input list: <code>properties-&gt;Linker-&gt;Input</code>).</li>
  886. <li>Please follow the Visual Studio documentation about using third-party .dll
  887. libraries, and make sure to link against a library for the correct
  888. architecture.<sup id="fnref:1"><a class="footnote-ref" href="#fn:1">1</a></sup></li>
  889. <li>If you need CBLAS, you should include <code>cblas.h</code> in
  890. <code>/your/installation/path/include</code> in Visual Studio. Please see
  891. <a href="http://github.com/OpenMathLib/OpenBLAS/issues/95">openblas#95</a> for more details.</li>
  892. </ol>
  893. <div class="admonition info">
  894. <p class="admonition-title">Limitations of using the MinGW build within Visual Studio</p>
  895. <ul>
  896. <li>Both static and dynamic linking are supported with MinGW. With Visual
  897. Studio, however, only dynamic linking is supported and so you should use
  898. the import library.</li>
  899. <li>Debugging from Visual Studio does not work because MinGW and Visual
  900. Studio have incompatible formats for debug information (PDB vs.
  901. DWARF/STABS). You should either debug with GDB on the command line or
  902. with a visual frontend, for instance <a href="http://www.eclipse.org/cdt/">Eclipse</a> or
  903. <a href="http://qt.nokia.com/products/developer-tools/">Qt Creator</a>.</li>
  904. </ul>
  905. </div>
  906. <h3 id="windows-on-arm">Windows on Arm</h3>
  907. <p>A fully functional native OpenBLAS for WoA that can be built as both a static and dynamic library using LLVM toolchain and Visual Studio 2022. Before starting to build, make sure that you have installed Visual Studio 2022 on your ARM device, including the "Desktop Development with C++" component (that contains the cmake tool).
  908. (Note that you can use the free "Visual Studio 2022 Community Edition" for this task. In principle it would be possible to build with VisualStudio alone, but using
  909. the LLVM toolchain enables native compilation of the Fortran sources of LAPACK and of all the optimized assembly files, which VisualStudio cannot handle on its own)</p>
  910. <ol>
  911. <li>
  912. <p>Clone OpenBLAS to your local machine and checkout to latest release of OpenBLAS (unless you want to build the latest development snapshot - here we are using the 0.3.28 release as the example, of course this exact version may be outdated by the time you read this) </p>
  913. <div class="highlight"><pre><span></span><code>git clone https://github.com/OpenMathLib/OpenBLAS.git
  914. cd OpenBLAS
  915. git checkout v0.3.28
  916. </code></pre></div>
  917. </li>
  918. <li>
  919. <p>Install Latest LLVM toolchain for WoA:</p>
  920. </li>
  921. </ol>
  922. <p>Download the Latest LLVM toolchain for WoA from <a href="https://github.com/llvm/llvm-project/releases/tag/llvmorg-19.1.5">the Release page</a>. At the time of writing, this is version 19.1.5 - be sure to select the latest release for which you can find a precompiled package whose name ends in "-woa64.exe" (precompiled packages
  923. usually lag a week or two behind their corresponding source release).<br />
  924. Make sure to enable the option “Add LLVM to the system PATH for all the users”
  925. Note: Make sure that the path of LLVM toolchain is at the top of Environment Variables section to avoid conflicts between the set of compilers available in the system path</p>
  926. <ol>
  927. <li>Launch the Native Command Prompt for Windows ARM64:</li>
  928. </ol>
  929. <p>From the start menu search for “ARM64 Native Tools Command Prompt for Visual Studio 2022”
  930. Alternatively open command prompt, run the following command to activate the environment:
  931. "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsarm64.bat"</p>
  932. <p>Navigate to the OpenBLAS source code directory and start building OpenBLAS by invoking Ninja:</p>
  933. <pre><code> ```cmd
  934. cd OpenBLAS
  935. mkdir build
  936. cd build
  937. cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DTARGET=ARMV8 -DBINARY=64 -DCMAKE_C_COMPILER=clang-cl -DCMAKE_C_COMPILER=arm64-pc-windows-msvc -DCMAKE_ASM_COMPILER=arm64-pc-windows-msvc -DCMAKE_Fortran_COMPILER=flang-new
  938. ninja -j16
  939. ```
  940. </code></pre>
  941. <p>Note: You might want to include additional options in the cmake command here. For example, the default configuration only generates a static.lib version of the library. If you prefer a DLL, you can add -DBUILD_SHARED_LIBS=ON.</p>
  942. <p>Note that it is also possible to use the same setup to build OpenBLAS with Make, if you prepare Makefiles over the CMake build for some reason:</p>
  943. <pre><code>```cmd
  944. $ make CC=clang-cl FC=flang-new AR="llvm-ar" TARGET=ARMV8 ARCH=arm64 RANLIB="llvm-ranlib" MAKE=make
  945. ```
  946. </code></pre>
  947. <h4 id="generating-an-import-library">Generating an import library</h4>
  948. <p>Microsoft Windows has this thing called "import libraries". You need it for
  949. MSVC; you don't need it for MinGW because the <code>ld</code> linker is smart enough -
  950. however, you may still want it for some reason, so we'll describe the process
  951. for both MSVC and MinGW.</p>
  952. <p>Import libraries are compiled from a list of what symbols to use, which are
  953. contained in a <code>.def</code> file. A <code>.def</code> file should be already be present in the
  954. <code>exports</code> directory under the top-level OpenBLAS directory after you've run a build.
  955. In your shell, move to this directory: <code>cd exports</code>.</p>
  956. <div class="tabbed-set tabbed-alternate" data-tabs="4:2"><input checked="checked" id="__tabbed_4_1" name="__tabbed_4" type="radio" /><input id="__tabbed_4_2" name="__tabbed_4" type="radio" /><div class="tabbed-labels"><label for="__tabbed_4_1">MSVC</label><label for="__tabbed_4_2">MinGW</label></div>
  957. <div class="tabbed-content">
  958. <div class="tabbed-block">
  959. <p>Unlike MinGW, MSVC absolutely requires an import library. Now the C ABI of
  960. MSVC and MinGW are actually identical, so linking is actually okay (any
  961. incompatibility in the C ABI would be a bug).</p>
  962. <p>The import libraries of MSVC have the suffix <code>.lib</code>. They are generated
  963. from a <code>.def</code> file using MSVC's <code>lib.exe</code>. See <a href="use_visual_studio.md#generate-import-library-before-0210-version">the MSVC instructions</a>.</p>
  964. </div>
  965. <div class="tabbed-block">
  966. <p>MinGW import libraries have the suffix <code>.a</code>, just like static libraries.
  967. Our goal is to produce the file <code>libopenblas.dll.a</code>.</p>
  968. <p>You need to first insert a line <code>LIBRARY libopenblas.dll</code> in <code>libopenblas.def</code>:
  969. <div class="highlight"><pre><span></span><code>cat &lt;(echo &quot;LIBRARY libopenblas.dll&quot;) libopenblas.def &gt; libopenblas.def.1
  970. mv libopenblas.def.1 libopenblas.def
  971. </code></pre></div></p>
  972. <p>Now the <code>.def</code> file probably looks like:
  973. <div class="highlight"><pre><span></span><code>LIBRARY libopenblas.dll
  974. EXPORTS
  975. caxpy=caxpy_ @1
  976. caxpy_=caxpy_ @2
  977. ...
  978. </code></pre></div>
  979. Then, generate the import library: <code>dlltool -d libopenblas.def -l libopenblas.dll.a</code></p>
  980. <p><em>Again, there is basically <strong>no point</strong> in making an import library for use in MinGW. It actually slows down linking.</em></p>
  981. </div>
  982. </div>
  983. </div>
  984. <h3 id="android">Android</h3>
  985. <p>To build OpenBLAS for Android, you will need the following tools installed on your machine:</p>
  986. <ul>
  987. <li><a href="https://developer.android.com/ndk/">The Android NDK</a></li>
  988. <li>Clang compiler on the build machine</li>
  989. </ul>
  990. <p>The next two sections below describe how to build with Clang for ARMV7 and
  991. ARMV8 targets, respectively. The same basic principles as described below for
  992. ARMV8 should also apply to building an x86 or x86-64 version (substitute
  993. something like <code>NEHALEM</code> for the target instead of <code>ARMV8</code>, and replace all the
  994. <code>aarch64</code> in the toolchain paths with <code>x86</code> or <code>x96_64</code> as appropriate).</p>
  995. <div class="admonition info">
  996. <p class="admonition-title">Historic note</p>
  997. <p>Since NDK version 19, the default toolchain is provided as a standalone
  998. toolchain, so building one yourself following
  999. <a href="http://developer.android.com/ndk/guides/standalone_toolchain.html">building a standalone toolchain</a>
  1000. should no longer be necessary.</p>
  1001. </div>
  1002. <h4 id="building-for-armv7">Building for ARMV7</h4>
  1003. <div class="highlight"><pre><span></span><code><span class="c1"># Set path to ndk-bundle</span>
  1004. <span class="nb">export</span><span class="w"> </span><span class="nv">NDK_BUNDLE_DIR</span><span class="o">=</span>/path/to/ndk-bundle
  1005. <span class="c1"># Set the PATH to contain paths to clang and arm-linux-androideabi-* utilities</span>
  1006. <span class="nb">export</span><span class="w"> </span><span class="nv">PATH</span><span class="o">=</span><span class="si">${</span><span class="nv">NDK_BUNDLE_DIR</span><span class="si">}</span>/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin:<span class="si">${</span><span class="nv">NDK_BUNDLE_DIR</span><span class="si">}</span>/toolchains/llvm/prebuilt/linux-x86_64/bin:<span class="nv">$PATH</span>
  1007. <span class="c1"># Set LDFLAGS so that the linker finds the appropriate libgcc</span>
  1008. <span class="nb">export</span><span class="w"> </span><span class="nv">LDFLAGS</span><span class="o">=</span><span class="s2">&quot;-L</span><span class="si">${</span><span class="nv">NDK_BUNDLE_DIR</span><span class="si">}</span><span class="s2">/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x&quot;</span>
  1009. <span class="c1"># Set the clang cross compile flags</span>
  1010. <span class="nb">export</span><span class="w"> </span><span class="nv">CLANG_FLAGS</span><span class="o">=</span><span class="s2">&quot;-target arm-linux-androideabi -marm -mfpu=vfp -mfloat-abi=softfp --sysroot </span><span class="si">${</span><span class="nv">NDK_BUNDLE_DIR</span><span class="si">}</span><span class="s2">/platforms/android-23/arch-arm -gcc-toolchain </span><span class="si">${</span><span class="nv">NDK_BUNDLE_DIR</span><span class="si">}</span><span class="s2">/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/&quot;</span>
  1011. <span class="c1">#OpenBLAS Compile</span>
  1012. make<span class="w"> </span><span class="nv">TARGET</span><span class="o">=</span>ARMV7<span class="w"> </span><span class="nv">ONLY_CBLAS</span><span class="o">=</span><span class="m">1</span><span class="w"> </span><span class="nv">AR</span><span class="o">=</span>ar<span class="w"> </span><span class="nv">CC</span><span class="o">=</span><span class="s2">&quot;clang </span><span class="si">${</span><span class="nv">CLANG_FLAGS</span><span class="si">}</span><span class="s2">&quot;</span><span class="w"> </span><span class="nv">HOSTCC</span><span class="o">=</span>gcc<span class="w"> </span><span class="nv">ARM_SOFTFP_ABI</span><span class="o">=</span><span class="m">1</span><span class="w"> </span>-j4
  1013. </code></pre></div>
  1014. <p>On macOS, it may also be necessary to give the complete path to the <code>ar</code>
  1015. utility in the make command above, like so:
  1016. <div class="highlight"><pre><span></span><code><span class="nv">AR</span><span class="o">=</span><span class="si">${</span><span class="nv">NDK_BUNDLE_DIR</span><span class="si">}</span>/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc-ar
  1017. </code></pre></div>
  1018. otherwise you may get a linker error complaining like <code>malformed archive header
  1019. name at 8</code> when the native macOS <code>ar</code> command was invoked instead. Note that
  1020. with recent NDK versions, the AR tool may be named <code>llvm-ar</code> rather than what
  1021. is assumed above.</p>
  1022. <h4 id="building-for-armv8">Building for ARMV8</h4>
  1023. <p><div class="highlight"><pre><span></span><code><span class="c1"># Set path to ndk-bundle</span>
  1024. <span class="nb">export</span><span class="w"> </span><span class="nv">NDK_BUNDLE_DIR</span><span class="o">=</span>/path/to/ndk-bundle/
  1025. <span class="c1"># Export PATH to contain directories of clang and aarch64-linux-android-* utilities</span>
  1026. <span class="nb">export</span><span class="w"> </span><span class="nv">PATH</span><span class="o">=</span><span class="si">${</span><span class="nv">NDK_BUNDLE_DIR</span><span class="si">}</span>/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/:<span class="si">${</span><span class="nv">NDK_BUNDLE_DIR</span><span class="si">}</span>/toolchains/llvm/prebuilt/linux-x86_64/bin:<span class="nv">$PATH</span>
  1027. <span class="c1"># Setup LDFLAGS so that loader can find libgcc and pass -lm for sqrt</span>
  1028. <span class="nb">export</span><span class="w"> </span><span class="nv">LDFLAGS</span><span class="o">=</span><span class="s2">&quot;-L</span><span class="si">${</span><span class="nv">NDK_BUNDLE_DIR</span><span class="si">}</span><span class="s2">/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/lib/gcc/aarch64-linux-android/4.9.x -lm&quot;</span>
  1029. <span class="c1"># Setup the clang cross compile options</span>
  1030. <span class="nb">export</span><span class="w"> </span><span class="nv">CLANG_FLAGS</span><span class="o">=</span><span class="s2">&quot;-target aarch64-linux-android --sysroot </span><span class="si">${</span><span class="nv">NDK_BUNDLE_DIR</span><span class="si">}</span><span class="s2">/platforms/android-23/arch-arm64 -gcc-toolchain </span><span class="si">${</span><span class="nv">NDK_BUNDLE_DIR</span><span class="si">}</span><span class="s2">/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/&quot;</span>
  1031. <span class="c1"># Compile</span>
  1032. make<span class="w"> </span><span class="nv">TARGET</span><span class="o">=</span>ARMV8<span class="w"> </span><span class="nv">ONLY_CBLAS</span><span class="o">=</span><span class="m">1</span><span class="w"> </span><span class="nv">AR</span><span class="o">=</span>ar<span class="w"> </span><span class="nv">CC</span><span class="o">=</span><span class="s2">&quot;clang </span><span class="si">${</span><span class="nv">CLANG_FLAGS</span><span class="si">}</span><span class="s2">&quot;</span><span class="w"> </span><span class="nv">HOSTCC</span><span class="o">=</span>gcc<span class="w"> </span>-j4
  1033. </code></pre></div>
  1034. Note: using <code>TARGET=CORTEXA57</code> in place of <code>ARMV8</code> will pick up better
  1035. optimized routines. Implementations for the <code>CORTEXA57</code> target are compatible
  1036. with all other <code>ARMV8</code> targets.</p>
  1037. <p>Note: for NDK 23b, something as simple as:
  1038. <div class="highlight"><pre><span></span><code><span class="nb">export</span><span class="w"> </span><span class="nv">PATH</span><span class="o">=</span>/opt/android-ndk-r23b/toolchains/llvm/prebuilt/linux-x86_64/bin/:<span class="nv">$PATH</span>
  1039. make<span class="w"> </span><span class="nv">HOSTCC</span><span class="o">=</span>gcc<span class="w"> </span><span class="nv">CC</span><span class="o">=</span>/opt/android-ndk-r23b/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android31-clang<span class="w"> </span><span class="nv">ONLY_CBLAS</span><span class="o">=</span><span class="m">1</span><span class="w"> </span><span class="nv">TARGET</span><span class="o">=</span>ARMV8
  1040. </code></pre></div>
  1041. appears to be sufficient on Linux. On OSX, setting AR to the ar provided in the
  1042. "bin" path of the NDK (probably <code>llvm-ar</code>) is also necessary.</p>
  1043. <details class="note">
  1044. <summary>Alternative build script for 3 architectures</summary>
  1045. <p>This script will build OpenBLAS for 3 architecture (<code>ARMV7</code>, <code>ARMV8</code>,
  1046. <code>X86</code>) and install them to <code>/opt/OpenBLAS/lib</code>. Of course you can also copy
  1047. only the section that is of interest to you - also notice that the <code>AR=</code>
  1048. line may need adapting to the name of the ar tool provided in your
  1049. <code>$TOOLCHAIN/bin</code> - for example <code>llvm-ar</code> in some recent NDK versions.
  1050. It was tested on macOS with NDK version 21.3.6528147.</p>
  1051. <p><div class="highlight"><pre><span></span><code><span class="nb">export</span><span class="w"> </span><span class="nv">NDK</span><span class="o">=</span>YOUR_PATH_TO_SDK/Android/sdk/ndk/21.3.6528147
  1052. <span class="nb">export</span><span class="w"> </span><span class="nv">TOOLCHAIN</span><span class="o">=</span><span class="nv">$NDK</span>/toolchains/llvm/prebuilt/darwin-x86_64
  1053. make<span class="w"> </span>clean
  1054. make<span class="w"> </span><span class="se">\</span>
  1055. <span class="w"> </span><span class="nv">TARGET</span><span class="o">=</span>ARMV7<span class="w"> </span><span class="se">\</span>
  1056. <span class="w"> </span><span class="nv">ONLY_CBLAS</span><span class="o">=</span><span class="m">1</span><span class="w"> </span><span class="se">\</span>
  1057. <span class="w"> </span><span class="nv">CC</span><span class="o">=</span><span class="s2">&quot;</span><span class="nv">$TOOLCHAIN</span><span class="s2">&quot;</span>/bin/armv7a-linux-androideabi21-clang<span class="w"> </span><span class="se">\</span>
  1058. <span class="w"> </span><span class="nv">AR</span><span class="o">=</span><span class="s2">&quot;</span><span class="nv">$TOOLCHAIN</span><span class="s2">&quot;</span>/bin/arm-linux-androideabi-ar<span class="w"> </span><span class="se">\</span>
  1059. <span class="w"> </span><span class="nv">HOSTCC</span><span class="o">=</span>gcc<span class="w"> </span><span class="se">\</span>
  1060. <span class="w"> </span><span class="nv">ARM_SOFTFP_ABI</span><span class="o">=</span><span class="m">1</span><span class="w"> </span><span class="se">\</span>
  1061. <span class="w"> </span>-j4
  1062. sudo<span class="w"> </span>make<span class="w"> </span>install
  1063. make<span class="w"> </span>clean
  1064. make<span class="w"> </span><span class="se">\</span>
  1065. <span class="w"> </span><span class="nv">TARGET</span><span class="o">=</span>CORTEXA57<span class="w"> </span><span class="se">\</span>
  1066. <span class="w"> </span><span class="nv">ONLY_CBLAS</span><span class="o">=</span><span class="m">1</span><span class="w"> </span><span class="se">\</span>
  1067. <span class="w"> </span><span class="nv">CC</span><span class="o">=</span><span class="nv">$TOOLCHAIN</span>/bin/aarch64-linux-android21-clang<span class="w"> </span><span class="se">\</span>
  1068. <span class="w"> </span><span class="nv">AR</span><span class="o">=</span><span class="nv">$TOOLCHAIN</span>/bin/aarch64-linux-android-ar<span class="w"> </span><span class="se">\</span>
  1069. <span class="w"> </span><span class="nv">HOSTCC</span><span class="o">=</span>gcc<span class="w"> </span><span class="se">\</span>
  1070. -j4
  1071. sudo<span class="w"> </span>make<span class="w"> </span>install
  1072. make<span class="w"> </span>clean
  1073. make<span class="w"> </span><span class="se">\</span>
  1074. <span class="w"> </span><span class="nv">TARGET</span><span class="o">=</span>ATOM<span class="w"> </span><span class="se">\</span>
  1075. <span class="w"> </span><span class="nv">ONLY_CBLAS</span><span class="o">=</span><span class="m">1</span><span class="w"> </span><span class="se">\</span>
  1076. <span class="nv">CC</span><span class="o">=</span><span class="s2">&quot;</span><span class="nv">$TOOLCHAIN</span><span class="s2">&quot;</span>/bin/i686-linux-android21-clang<span class="w"> </span><span class="se">\</span>
  1077. <span class="nv">AR</span><span class="o">=</span><span class="s2">&quot;</span><span class="nv">$TOOLCHAIN</span><span class="s2">&quot;</span>/bin/i686-linux-android-ar<span class="w"> </span><span class="se">\</span>
  1078. <span class="nv">HOSTCC</span><span class="o">=</span>gcc<span class="w"> </span><span class="se">\</span>
  1079. <span class="nv">ARM_SOFTFP_ABI</span><span class="o">=</span><span class="m">1</span><span class="w"> </span><span class="se">\</span>
  1080. -j4
  1081. sudo<span class="w"> </span>make<span class="w"> </span>install
  1082. <span class="c1">## This will build for x86_64 </span>
  1083. make<span class="w"> </span>clean
  1084. make<span class="w"> </span><span class="se">\</span>
  1085. <span class="w"> </span><span class="nv">TARGET</span><span class="o">=</span>ATOM<span class="w"> </span><span class="nv">BINARY</span><span class="o">=</span><span class="m">64</span><span class="se">\</span>
  1086. <span class="nv">ONLY_CBLAS</span><span class="o">=</span><span class="m">1</span><span class="w"> </span><span class="se">\</span>
  1087. <span class="nv">CC</span><span class="o">=</span><span class="s2">&quot;</span><span class="nv">$TOOLCHAIN</span><span class="s2">&quot;</span>/bin/x86_64-linux-android21-clang<span class="w"> </span><span class="se">\</span>
  1088. <span class="nv">AR</span><span class="o">=</span><span class="s2">&quot;</span><span class="nv">$TOOLCHAIN</span><span class="s2">&quot;</span>/bin/x86_64-linux-android-ar<span class="w"> </span><span class="se">\</span>
  1089. <span class="nv">HOSTCC</span><span class="o">=</span>gcc<span class="w"> </span><span class="se">\</span>
  1090. <span class="nv">ARM_SOFTFP_ABI</span><span class="o">=</span><span class="m">1</span><span class="w"> </span><span class="se">\</span>
  1091. -j4
  1092. sudo<span class="w"> </span>make<span class="w"> </span>install
  1093. </code></pre></div>
  1094. You can find full list of target architectures in <a href="https://github.com/OpenMathLib/OpenBLAS/blob/develop/TargetList.txt">TargetList.txt</a></p>
  1095. </details>
  1096. <h3 id="iphoneios">iPhone/iOS</h3>
  1097. <p>As none of the current developers uses iOS, the following instructions are what
  1098. was found to work in our Azure CI setup, but as far as we know this builds a
  1099. fully working OpenBLAS for this platform.</p>
  1100. <p>Go to the directory where you unpacked OpenBLAS,and enter the following commands:
  1101. <div class="highlight"><pre><span></span><code><span class="nv">CC</span><span class="o">=</span>/Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
  1102. <span class="nv">CFLAGS</span><span class="o">=</span><span class="w"> </span>-O2<span class="w"> </span>-Wno-macro-redefined<span class="w"> </span>-isysroot<span class="w"> </span>/Applications/Xcode_12.4.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk<span class="w"> </span>-arch<span class="w"> </span>arm64<span class="w"> </span>-miphoneos-version-min<span class="o">=</span><span class="m">10</span>.0
  1103. make<span class="w"> </span><span class="nv">TARGET</span><span class="o">=</span>ARMV8<span class="w"> </span><span class="nv">DYNAMIC_ARCH</span><span class="o">=</span><span class="m">1</span><span class="w"> </span><span class="nv">NUM_THREADS</span><span class="o">=</span><span class="m">32</span><span class="w"> </span><span class="nv">HOSTCC</span><span class="o">=</span>clang<span class="w"> </span><span class="nv">NOFORTRAN</span><span class="o">=</span><span class="m">1</span>
  1104. </code></pre></div>
  1105. Adjust <code>MIN_IOS_VERSION</code> as necessary for your installation. E.g., change the version number
  1106. to the minimum iOS version you want to target and execute this file to build the library.</p>
  1107. <h3 id="mips">MIPS</h3>
  1108. <p>For MIPS targets you will need latest toolchains:</p>
  1109. <ul>
  1110. <li>P5600 - MTI GNU/Linux Toolchain</li>
  1111. <li>I6400, P6600 - IMG GNU/Linux Toolchain</li>
  1112. </ul>
  1113. <p>You can use following commandlines for builds:</p>
  1114. <div class="highlight"><pre><span></span><code><span class="nv">IMG_TOOLCHAIN_DIR</span><span class="o">={</span>full<span class="w"> </span>IMG<span class="w"> </span>GNU/Linux<span class="w"> </span>Toolchain<span class="w"> </span>path<span class="w"> </span>including<span class="w"> </span><span class="s2">&quot;bin&quot;</span><span class="w"> </span>directory<span class="w"> </span>--<span class="w"> </span><span class="k">for</span><span class="w"> </span>example,<span class="w"> </span>/opt/linux_toolchain/bin<span class="o">}</span>
  1115. <span class="nv">IMG_GCC_PREFIX</span><span class="o">=</span>mips-img-linux-gnu
  1116. <span class="nv">IMG_TOOLCHAIN</span><span class="o">=</span><span class="si">${</span><span class="nv">IMG_TOOLCHAIN_DIR</span><span class="si">}</span>/<span class="si">${</span><span class="nv">IMG_GCC_PREFIX</span><span class="si">}</span>
  1117. <span class="c1"># I6400 Build (n32):</span>
  1118. make<span class="w"> </span><span class="nv">BINARY</span><span class="o">=</span><span class="m">32</span><span class="w"> </span><span class="nv">BINARY32</span><span class="o">=</span><span class="m">1</span><span class="w"> </span><span class="nv">CC</span><span class="o">=</span><span class="nv">$IMG_TOOLCHAIN</span>-gcc<span class="w"> </span><span class="nv">AR</span><span class="o">=</span><span class="nv">$IMG_TOOLCHAIN</span>-ar<span class="w"> </span><span class="nv">FC</span><span class="o">=</span><span class="s2">&quot;</span><span class="nv">$IMG_TOOLCHAIN</span><span class="s2">-gfortran -EL -mabi=n32&quot;</span><span class="w"> </span><span class="nv">RANLIB</span><span class="o">=</span><span class="nv">$IMG_TOOLCHAIN</span>-ranlib<span class="w"> </span><span class="nv">HOSTCC</span><span class="o">=</span>gcc<span class="w"> </span><span class="nv">CFLAGS</span><span class="o">=</span><span class="s2">&quot;-EL&quot;</span><span class="w"> </span><span class="nv">FFLAGS</span><span class="o">=</span><span class="nv">$CFLAGS</span><span class="w"> </span><span class="nv">LDFLAGS</span><span class="o">=</span><span class="nv">$CFLAGS</span><span class="w"> </span><span class="nv">TARGET</span><span class="o">=</span>I6400
  1119. <span class="c1"># I6400 Build (n64):</span>
  1120. make<span class="w"> </span><span class="nv">BINARY</span><span class="o">=</span><span class="m">64</span><span class="w"> </span><span class="nv">BINARY64</span><span class="o">=</span><span class="m">1</span><span class="w"> </span><span class="nv">CC</span><span class="o">=</span><span class="nv">$IMG_TOOLCHAIN</span>-gcc<span class="w"> </span><span class="nv">AR</span><span class="o">=</span><span class="nv">$IMG_TOOLCHAIN</span>-ar<span class="w"> </span><span class="nv">FC</span><span class="o">=</span><span class="s2">&quot;</span><span class="nv">$IMG_TOOLCHAIN</span><span class="s2">-gfortran -EL&quot;</span><span class="w"> </span><span class="nv">RANLIB</span><span class="o">=</span><span class="nv">$IMG_TOOLCHAIN</span>-ranlib<span class="w"> </span><span class="nv">HOSTCC</span><span class="o">=</span>gcc<span class="w"> </span><span class="nv">CFLAGS</span><span class="o">=</span><span class="s2">&quot;-EL&quot;</span><span class="w"> </span><span class="nv">FFLAGS</span><span class="o">=</span><span class="nv">$CFLAGS</span><span class="w"> </span><span class="nv">LDFLAGS</span><span class="o">=</span><span class="nv">$CFLAGS</span><span class="w"> </span><span class="nv">TARGET</span><span class="o">=</span>I6400
  1121. <span class="c1"># P6600 Build (n32):</span>
  1122. make<span class="w"> </span><span class="nv">BINARY</span><span class="o">=</span><span class="m">32</span><span class="w"> </span><span class="nv">BINARY32</span><span class="o">=</span><span class="m">1</span><span class="w"> </span><span class="nv">CC</span><span class="o">=</span><span class="nv">$IMG_TOOLCHAIN</span>-gcc<span class="w"> </span><span class="nv">AR</span><span class="o">=</span><span class="nv">$IMG_TOOLCHAIN</span>-ar<span class="w"> </span><span class="nv">FC</span><span class="o">=</span><span class="s2">&quot;</span><span class="nv">$IMG_TOOLCHAIN</span><span class="s2">-gfortran -EL -mabi=n32&quot;</span><span class="w"> </span><span class="nv">RANLIB</span><span class="o">=</span><span class="nv">$IMG_TOOLCHAIN</span>-ranlib<span class="w"> </span><span class="nv">HOSTCC</span><span class="o">=</span>gcc<span class="w"> </span><span class="nv">CFLAGS</span><span class="o">=</span><span class="s2">&quot;-EL&quot;</span><span class="w"> </span><span class="nv">FFLAGS</span><span class="o">=</span><span class="nv">$CFLAGS</span><span class="w"> </span><span class="nv">LDFLAGS</span><span class="o">=</span><span class="nv">$CFLAGS</span><span class="w"> </span><span class="nv">TARGET</span><span class="o">=</span>P6600
  1123. <span class="c1"># P6600 Build (n64):</span>
  1124. make<span class="w"> </span><span class="nv">BINARY</span><span class="o">=</span><span class="m">64</span><span class="w"> </span><span class="nv">BINARY64</span><span class="o">=</span><span class="m">1</span><span class="w"> </span><span class="nv">CC</span><span class="o">=</span><span class="nv">$IMG_TOOLCHAIN</span>-gcc<span class="w"> </span><span class="nv">AR</span><span class="o">=</span><span class="nv">$IMG_TOOLCHAIN</span>-ar<span class="w"> </span><span class="nv">FC</span><span class="o">=</span><span class="s2">&quot;</span><span class="nv">$IMG_TOOLCHAIN</span><span class="s2">-gfortran -EL&quot;</span><span class="w"> </span><span class="nv">RANLIB</span><span class="o">=</span><span class="nv">$IMG_TOOLCHAIN</span>-ranlib<span class="w"> </span><span class="nv">HOSTCC</span><span class="o">=</span>gcc<span class="w"> </span><span class="nv">CFLAGS</span><span class="o">=</span><span class="s2">&quot;-EL&quot;</span><span class="w"> </span><span class="nv">FFLAGS</span><span class="o">=</span><span class="s2">&quot;</span><span class="nv">$CFLAGS</span><span class="s2">&quot;</span><span class="w"> </span><span class="nv">LDFLAGS</span><span class="o">=</span><span class="s2">&quot;</span><span class="nv">$CFLAGS</span><span class="s2">&quot;</span><span class="w"> </span><span class="nv">TARGET</span><span class="o">=</span>P6600
  1125. <span class="nv">MTI_TOOLCHAIN_DIR</span><span class="o">={</span>full<span class="w"> </span>MTI<span class="w"> </span>GNU/Linux<span class="w"> </span>Toolchain<span class="w"> </span>path<span class="w"> </span>including<span class="w"> </span><span class="s2">&quot;bin&quot;</span><span class="w"> </span>directory<span class="w"> </span>--<span class="w"> </span><span class="k">for</span><span class="w"> </span>example,<span class="w"> </span>/opt/linux_toolchain/bin<span class="o">}</span>
  1126. <span class="nv">MTI_GCC_PREFIX</span><span class="o">=</span>mips-mti-linux-gnu
  1127. <span class="nv">MTI_TOOLCHAIN</span><span class="o">=</span><span class="si">${</span><span class="nv">IMG_TOOLCHAIN_DIR</span><span class="si">}</span>/<span class="si">${</span><span class="nv">IMG_GCC_PREFIX</span><span class="si">}</span>
  1128. <span class="c1"># P5600 Build:</span>
  1129. make<span class="w"> </span><span class="nv">BINARY</span><span class="o">=</span><span class="m">32</span><span class="w"> </span><span class="nv">BINARY32</span><span class="o">=</span><span class="m">1</span><span class="w"> </span><span class="nv">CC</span><span class="o">=</span><span class="nv">$MTI_TOOLCHAIN</span>-gcc<span class="w"> </span><span class="nv">AR</span><span class="o">=</span><span class="nv">$MTI_TOOLCHAIN</span>-ar<span class="w"> </span><span class="nv">FC</span><span class="o">=</span><span class="s2">&quot;</span><span class="nv">$MTI_TOOLCHAIN</span><span class="s2">-gfortran -EL&quot;</span><span class="w"> </span><span class="nv">RANLIB</span><span class="o">=</span><span class="nv">$MTI_TOOLCHAIN</span>-ranlib<span class="w"> </span><span class="nv">HOSTCC</span><span class="o">=</span>gcc<span class="w"> </span><span class="nv">CFLAGS</span><span class="o">=</span><span class="s2">&quot;-EL&quot;</span><span class="w"> </span><span class="nv">FFLAGS</span><span class="o">=</span><span class="nv">$CFLAGS</span><span class="w"> </span><span class="nv">LDFLAGS</span><span class="o">=</span><span class="nv">$CFLAGS</span><span class="w"> </span><span class="nv">TARGET</span><span class="o">=</span>P5600
  1130. </code></pre></div>
  1131. <h3 id="freebsd_1">FreeBSD</h3>
  1132. <p>You will need to install the following tools from the FreeBSD ports tree:</p>
  1133. <ul>
  1134. <li>lang/gcc</li>
  1135. <li>lang/perl5.12</li>
  1136. <li>ftp/curl</li>
  1137. <li>devel/gmake</li>
  1138. <li>devel/patch</li>
  1139. </ul>
  1140. <p>To compile run the command:
  1141. <div class="highlight"><pre><span></span><code>$<span class="w"> </span>gmake<span class="w"> </span><span class="nv">CC</span><span class="o">=</span>gcc<span class="w"> </span><span class="nv">FC</span><span class="o">=</span>gfortran
  1142. </code></pre></div></p>
  1143. <h3 id="cortex-m">Cortex-M</h3>
  1144. <p>Cortex-M is a widely used microcontroller that is present in a variety of
  1145. industrial and consumer electronics. A common variant of the Cortex-M is the
  1146. <code>STM32F4xx</code> series. Here, we will give instructions for building for that
  1147. series.</p>
  1148. <p>First, install the embedded Arm GCC compiler from the Arm website. Then, create
  1149. the following <code>toolchain.cmake</code> file:</p>
  1150. <div class="highlight"><pre><span></span><code><span class="nb">set</span><span class="p">(</span><span class="s">CMAKE_SYSTEM_NAME</span><span class="w"> </span><span class="s">Generic</span><span class="p">)</span>
  1151. <span class="nb">set</span><span class="p">(</span><span class="s">CMAKE_SYSTEM_PROCESSOR</span><span class="w"> </span><span class="s">arm</span><span class="p">)</span>
  1152. <span class="nb">set</span><span class="p">(</span><span class="s">CMAKE_C_COMPILER</span><span class="w"> </span><span class="s2">&quot;arm-none-eabi-gcc.exe&quot;</span><span class="p">)</span>
  1153. <span class="nb">set</span><span class="p">(</span><span class="s">CMAKE_CXX_COMPILER</span><span class="w"> </span><span class="s2">&quot;arm-none-eabi-g++.exe&quot;</span><span class="p">)</span>
  1154. <span class="nb">set</span><span class="p">(</span><span class="s">CMAKE_EXE_LINKER_FLAGS</span><span class="w"> </span><span class="s2">&quot;--specs=nosys.specs&quot;</span><span class="w"> </span><span class="s">CACHE</span><span class="w"> </span><span class="s">INTERNAL</span><span class="w"> </span><span class="s2">&quot;&quot;</span><span class="p">)</span>
  1155. <span class="nb">set</span><span class="p">(</span><span class="s">CMAKE_FIND_ROOT_PATH_MODE_PROGRAM</span><span class="w"> </span><span class="s">NEVER</span><span class="p">)</span>
  1156. <span class="nb">set</span><span class="p">(</span><span class="s">CMAKE_FIND_ROOT_PATH_MODE_LIBRARY</span><span class="w"> </span><span class="s">ONLY</span><span class="p">)</span>
  1157. <span class="nb">set</span><span class="p">(</span><span class="s">CMAKE_FIND_ROOT_PATH_MODE_INCLUDE</span><span class="w"> </span><span class="s">ONLY</span><span class="p">)</span>
  1158. <span class="nb">set</span><span class="p">(</span><span class="s">CMAKE_FIND_ROOT_PATH_MODE_PACKAGE</span><span class="w"> </span><span class="s">ONLY</span><span class="p">)</span>
  1159. </code></pre></div>
  1160. <p>Then build OpenBLAS with:
  1161. <div class="highlight"><pre><span></span><code>$<span class="w"> </span>cmake<span class="w"> </span>..<span class="w"> </span>-G<span class="w"> </span>Ninja<span class="w"> </span>-DCMAKE_C_COMPILER<span class="o">=</span>arm-none-eabi-gcc<span class="w"> </span>-DCMAKE_TOOLCHAIN_FILE:PATH<span class="o">=</span><span class="s2">&quot;toolchain.cmake&quot;</span><span class="w"> </span>-DNOFORTRAN<span class="o">=</span><span class="m">1</span><span class="w"> </span>-DTARGET<span class="o">=</span>ARMV5<span class="w"> </span>-DEMBEDDED<span class="o">=</span><span class="m">1</span>
  1162. </code></pre></div></p>
  1163. <p>In your embedded application, the following functions need to be provided for OpenBLAS to work correctly:
  1164. <div class="highlight"><pre><span></span><code><span class="kt">void</span><span class="w"> </span><span class="nf">free</span><span class="p">(</span><span class="kt">void</span><span class="o">*</span><span class="w"> </span><span class="n">ptr</span><span class="p">);</span>
  1165. <span class="kt">void</span><span class="o">*</span><span class="w"> </span><span class="nf">malloc</span><span class="p">(</span><span class="kt">size_t</span><span class="w"> </span><span class="n">size</span><span class="p">);</span>
  1166. </code></pre></div></p>
  1167. <div class="admonition note">
  1168. <p class="admonition-title">Note</p>
  1169. <p>If you are developing for an embedded platform, it is your responsibility
  1170. to make sure that the device has sufficient memory for <code>malloc</code> calls.
  1171. <a href="https://github.com/embeddedartistry/libmemory">Libmemory</a>
  1172. provides one implementation of <code>malloc</code> for embedded platforms.</p>
  1173. </div>
  1174. <div class="footnote">
  1175. <hr />
  1176. <ol>
  1177. <li id="fn:1">
  1178. <p>If the OpenBLAS DLLs are not linked correctly, you may see an error like
  1179. <em>"The application was unable to start correctly (0xc000007b)"</em>, which typically
  1180. indicates a mismatch between 32-bit and 64-bit libraries.&#160;<a class="footnote-backref" href="#fnref:1" title="Jump back to footnote 1 in the text">&#8617;</a></p>
  1181. </li>
  1182. </ol>
  1183. </div>
  1184. <aside class="md-source-file">
  1185. <span class="md-source-file__fact">
  1186. <span class="md-icon" title="Last update">
  1187. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21 13.1c-.1 0-.3.1-.4.2l-1 1 2.1 2.1 1-1c.2-.2.2-.6 0-.8l-1.3-1.3c-.1-.1-.2-.2-.4-.2m-1.9 1.8-6.1 6V23h2.1l6.1-6.1zM12.5 7v5.2l4 2.4-1 1L11 13V7zM11 21.9c-5.1-.5-9-4.8-9-9.9C2 6.5 6.5 2 12 2c5.3 0 9.6 4.1 10 9.3-.3-.1-.6-.2-1-.2s-.7.1-1 .2C19.6 7.2 16.2 4 12 4c-4.4 0-8 3.6-8 8 0 4.1 3.1 7.5 7.1 7.9l-.1.2z"/></svg>
  1188. </span>
  1189. <span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date">December 26, 2024</span>
  1190. </span>
  1191. <span class="md-source-file__fact">
  1192. <span class="md-icon" title="Created">
  1193. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14.47 15.08 11 13V7h1.5v5.25l3.08 1.83c-.41.28-.79.62-1.11 1m-1.39 4.84c-.36.05-.71.08-1.08.08-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8c0 .37-.03.72-.08 1.08.69.1 1.33.32 1.92.64.1-.56.16-1.13.16-1.72 0-5.5-4.5-10-10-10S2 6.5 2 12s4.47 10 10 10c.59 0 1.16-.06 1.72-.16-.32-.59-.54-1.23-.64-1.92M18 15v3h-3v2h3v3h2v-3h3v-2h-3v-3z"/></svg>
  1194. </span>
  1195. <span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date">August 4, 2023</span>
  1196. </span>
  1197. </aside>
  1198. </article>
  1199. </div>
  1200. <script>var target=document.getElementById(location.hash.slice(1));target&&target.name&&(target.checked=target.name.startsWith("__tabbed_"))</script>
  1201. </div>
  1202. </main>
  1203. <footer class="md-footer">
  1204. <div class="md-footer-meta md-typeset">
  1205. <div class="md-footer-meta__inner md-grid">
  1206. <div class="md-copyright">
  1207. <div class="md-copyright__highlight">
  1208. Copyright &copy; 2012- OpenBLAS contributors
  1209. </div>
  1210. Made with
  1211. <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
  1212. Material for MkDocs
  1213. </a>
  1214. </div>
  1215. <div class="md-social">
  1216. <a href="https://github.com/OpenMathLib/OpenBLAS" target="_blank" rel="noopener" title="github.com" class="md-social__link">
  1217. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><!--! Font Awesome Free 6.7.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc.--><path d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6m-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3m44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9M244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8M97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1m-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7m32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1m-11.4-14.7c-1.6 1-1.6 3.6 0 5.9s4.3 3.3 5.6 2.3c1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2"/></svg>
  1218. </a>
  1219. <a href="https://github.com/OpenMathLib/OpenBLAS/LICENSE" target="_blank" rel="noopener" title="github.com" class="md-social__link">
  1220. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9 10a3.04 3.04 0 0 1 3-3 3.04 3.04 0 0 1 3 3 3.04 3.04 0 0 1-3 3 3.04 3.04 0 0 1-3-3m3 9 4 1v-3.08A7.54 7.54 0 0 1 12 18a7.54 7.54 0 0 1-4-1.08V20m4-16a5.78 5.78 0 0 0-4.24 1.74A5.78 5.78 0 0 0 6 10a5.78 5.78 0 0 0 1.76 4.23A5.78 5.78 0 0 0 12 16a5.78 5.78 0 0 0 4.24-1.77A5.78 5.78 0 0 0 18 10a5.78 5.78 0 0 0-1.76-4.26A5.78 5.78 0 0 0 12 4m8 6a8 8 0 0 1-.57 2.8A7.8 7.8 0 0 1 18 15.28V23l-6-2-6 2v-7.72A7.9 7.9 0 0 1 4 10a7.68 7.68 0 0 1 2.33-5.64A7.73 7.73 0 0 1 12 2a7.73 7.73 0 0 1 5.67 2.36A7.68 7.68 0 0 1 20 10"/></svg>
  1221. </a>
  1222. </div>
  1223. </div>
  1224. </div>
  1225. </footer>
  1226. </div>
  1227. <div class="md-dialog" data-md-component="dialog">
  1228. <div class="md-dialog__inner md-typeset"></div>
  1229. </div>
  1230. <script id="__config" type="application/json">{"base": "..", "features": ["header.autohide"], "search": "../assets/javascripts/workers/search.6ce7567c.min.js", "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}}</script>
  1231. <script src="../assets/javascripts/bundle.88dd0f4e.min.js"></script>
  1232. </body>
  1233. </html>

OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.