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 89 kB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697
  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.0, mkdocs-material-9.5.29">
  11. <title>Install OpenBLAS - OpenBLAS</title>
  12. <link rel="stylesheet" href="../assets/stylesheets/main.76a95c52.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 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2Z"/></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 12c0-2.42-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 12 20 8.69Z"/></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 12 20 8.69Z"/></svg>
  60. </label>
  61. </form>
  62. <script>var media,input,key,value,palette=__md_get("__palette");if(palette&&palette.color){"(prefers-color-scheme)"===palette.color.media&&(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([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.516 6.516 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 5Z"/></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.516 6.516 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 5Z"/></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 11h12Z"/></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 12 19 6.41Z"/></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.5.2 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.81z"/></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.5.2 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.81z"/></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. <li class="md-nav__item">
  232. <a href="#windows-on-arm" class="md-nav__link">
  233. <span class="md-ellipsis">
  234. Windows on Arm
  235. </span>
  236. </a>
  237. </li>
  238. <li class="md-nav__item">
  239. <a href="#generating-an-import-library" class="md-nav__link">
  240. <span class="md-ellipsis">
  241. Generating an import library
  242. </span>
  243. </a>
  244. </li>
  245. </ul>
  246. </nav>
  247. </li>
  248. <li class="md-nav__item">
  249. <a href="#android" class="md-nav__link">
  250. <span class="md-ellipsis">
  251. Android
  252. </span>
  253. </a>
  254. <nav class="md-nav" aria-label="Android">
  255. <ul class="md-nav__list">
  256. <li class="md-nav__item">
  257. <a href="#building-for-armv7" class="md-nav__link">
  258. <span class="md-ellipsis">
  259. Building for ARMV7
  260. </span>
  261. </a>
  262. </li>
  263. <li class="md-nav__item">
  264. <a href="#building-for-armv8" class="md-nav__link">
  265. <span class="md-ellipsis">
  266. Building for ARMV8
  267. </span>
  268. </a>
  269. </li>
  270. </ul>
  271. </nav>
  272. </li>
  273. <li class="md-nav__item">
  274. <a href="#iphoneios" class="md-nav__link">
  275. <span class="md-ellipsis">
  276. iPhone/iOS
  277. </span>
  278. </a>
  279. </li>
  280. <li class="md-nav__item">
  281. <a href="#mips" class="md-nav__link">
  282. <span class="md-ellipsis">
  283. MIPS
  284. </span>
  285. </a>
  286. </li>
  287. <li class="md-nav__item">
  288. <a href="#freebsd_1" class="md-nav__link">
  289. <span class="md-ellipsis">
  290. FreeBSD
  291. </span>
  292. </a>
  293. </li>
  294. <li class="md-nav__item">
  295. <a href="#cortex-m" class="md-nav__link">
  296. <span class="md-ellipsis">
  297. Cortex-M
  298. </span>
  299. </a>
  300. </li>
  301. </ul>
  302. </nav>
  303. </li>
  304. </ul>
  305. </nav>
  306. </li>
  307. <li class="md-nav__item">
  308. <a href="../user_manual/" class="md-nav__link">
  309. <span class="md-ellipsis">
  310. User manual
  311. </span>
  312. </a>
  313. </li>
  314. <li class="md-nav__item">
  315. <a href="../extensions/" class="md-nav__link">
  316. <span class="md-ellipsis">
  317. Extensions
  318. </span>
  319. </a>
  320. </li>
  321. <li class="md-nav__item">
  322. <a href="../developers/" class="md-nav__link">
  323. <span class="md-ellipsis">
  324. Developer manual
  325. </span>
  326. </a>
  327. </li>
  328. <li class="md-nav__item">
  329. <a href="../build_system/" class="md-nav__link">
  330. <span class="md-ellipsis">
  331. Build system
  332. </span>
  333. </a>
  334. </li>
  335. <li class="md-nav__item">
  336. <a href="../distributing/" class="md-nav__link">
  337. <span class="md-ellipsis">
  338. Redistributing OpenBLAS
  339. </span>
  340. </a>
  341. </li>
  342. <li class="md-nav__item">
  343. <a href="../ci/" class="md-nav__link">
  344. <span class="md-ellipsis">
  345. CI jobs
  346. </span>
  347. </a>
  348. </li>
  349. <li class="md-nav__item">
  350. <a href="../about/" class="md-nav__link">
  351. <span class="md-ellipsis">
  352. About
  353. </span>
  354. </a>
  355. </li>
  356. <li class="md-nav__item">
  357. <a href="../faq/" class="md-nav__link">
  358. <span class="md-ellipsis">
  359. FAQ
  360. </span>
  361. </a>
  362. </li>
  363. </ul>
  364. </nav>
  365. </div>
  366. </div>
  367. </div>
  368. <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" >
  369. <div class="md-sidebar__scrollwrap">
  370. <div class="md-sidebar__inner">
  371. <nav class="md-nav md-nav--secondary" aria-label="Table of contents">
  372. <label class="md-nav__title" for="__toc">
  373. <span class="md-nav__icon md-icon"></span>
  374. Table of contents
  375. </label>
  376. <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
  377. <li class="md-nav__item">
  378. <a href="#installing-with-a-package-manager" class="md-nav__link">
  379. <span class="md-ellipsis">
  380. Installing with a package manager
  381. </span>
  382. </a>
  383. <nav class="md-nav" aria-label="Installing with a package manager">
  384. <ul class="md-nav__list">
  385. <li class="md-nav__item">
  386. <a href="#linux" class="md-nav__link">
  387. <span class="md-ellipsis">
  388. Linux
  389. </span>
  390. </a>
  391. </li>
  392. <li class="md-nav__item">
  393. <a href="#windows" class="md-nav__link">
  394. <span class="md-ellipsis">
  395. Windows
  396. </span>
  397. </a>
  398. </li>
  399. <li class="md-nav__item">
  400. <a href="#macos" class="md-nav__link">
  401. <span class="md-ellipsis">
  402. macOS
  403. </span>
  404. </a>
  405. </li>
  406. <li class="md-nav__item">
  407. <a href="#freebsd" class="md-nav__link">
  408. <span class="md-ellipsis">
  409. FreeBSD
  410. </span>
  411. </a>
  412. </li>
  413. </ul>
  414. </nav>
  415. </li>
  416. <li class="md-nav__item">
  417. <a href="#building-from-source" class="md-nav__link">
  418. <span class="md-ellipsis">
  419. Building from source
  420. </span>
  421. </a>
  422. <nav class="md-nav" aria-label="Building from source">
  423. <ul class="md-nav__list">
  424. <li class="md-nav__item">
  425. <a href="#linux-and-macos" class="md-nav__link">
  426. <span class="md-ellipsis">
  427. Linux and macOS
  428. </span>
  429. </a>
  430. </li>
  431. <li class="md-nav__item">
  432. <a href="#windows_1" class="md-nav__link">
  433. <span class="md-ellipsis">
  434. Windows
  435. </span>
  436. </a>
  437. <nav class="md-nav" aria-label="Windows">
  438. <ul class="md-nav__list">
  439. <li class="md-nav__item">
  440. <a href="#visual-studio-native-windows-abi" class="md-nav__link">
  441. <span class="md-ellipsis">
  442. Visual Studio &amp; native Windows ABI
  443. </span>
  444. </a>
  445. </li>
  446. <li class="md-nav__item">
  447. <a href="#mingw-gnu-abi" class="md-nav__link">
  448. <span class="md-ellipsis">
  449. MinGW &amp; GNU ABI
  450. </span>
  451. </a>
  452. </li>
  453. <li class="md-nav__item">
  454. <a href="#windows-on-arm" class="md-nav__link">
  455. <span class="md-ellipsis">
  456. Windows on Arm
  457. </span>
  458. </a>
  459. </li>
  460. <li class="md-nav__item">
  461. <a href="#generating-an-import-library" class="md-nav__link">
  462. <span class="md-ellipsis">
  463. Generating an import library
  464. </span>
  465. </a>
  466. </li>
  467. </ul>
  468. </nav>
  469. </li>
  470. <li class="md-nav__item">
  471. <a href="#android" class="md-nav__link">
  472. <span class="md-ellipsis">
  473. Android
  474. </span>
  475. </a>
  476. <nav class="md-nav" aria-label="Android">
  477. <ul class="md-nav__list">
  478. <li class="md-nav__item">
  479. <a href="#building-for-armv7" class="md-nav__link">
  480. <span class="md-ellipsis">
  481. Building for ARMV7
  482. </span>
  483. </a>
  484. </li>
  485. <li class="md-nav__item">
  486. <a href="#building-for-armv8" class="md-nav__link">
  487. <span class="md-ellipsis">
  488. Building for ARMV8
  489. </span>
  490. </a>
  491. </li>
  492. </ul>
  493. </nav>
  494. </li>
  495. <li class="md-nav__item">
  496. <a href="#iphoneios" class="md-nav__link">
  497. <span class="md-ellipsis">
  498. iPhone/iOS
  499. </span>
  500. </a>
  501. </li>
  502. <li class="md-nav__item">
  503. <a href="#mips" class="md-nav__link">
  504. <span class="md-ellipsis">
  505. MIPS
  506. </span>
  507. </a>
  508. </li>
  509. <li class="md-nav__item">
  510. <a href="#freebsd_1" class="md-nav__link">
  511. <span class="md-ellipsis">
  512. FreeBSD
  513. </span>
  514. </a>
  515. </li>
  516. <li class="md-nav__item">
  517. <a href="#cortex-m" class="md-nav__link">
  518. <span class="md-ellipsis">
  519. Cortex-M
  520. </span>
  521. </a>
  522. </li>
  523. </ul>
  524. </nav>
  525. </li>
  526. </ul>
  527. </nav>
  528. </div>
  529. </div>
  530. </div>
  531. <div class="md-content" data-md-component="content">
  532. <article class="md-content__inner md-typeset">
  533. <h1 id="install-openblas">Install OpenBLAS</h1>
  534. <p>OpenBLAS can be installed through package managers or from source. If you only
  535. want to use OpenBLAS rather than make changes to it, we recommend installing a
  536. pre-built binary package with your package manager of choice.</p>
  537. <p>This page contains an overview of installing with package managers as well as
  538. from source. For the latter, see <a href="#building-from-source">further down on this page</a>.</p>
  539. <h2 id="installing-with-a-package-manager">Installing with a package manager</h2>
  540. <div class="admonition note">
  541. <p class="admonition-title">Note</p>
  542. <p>Almost every package manager provides OpenBLAS packages; the list on this
  543. page is not comprehensive. If your package manager of choice isn't shown
  544. here, please search its package database for <code>openblas</code> or <code>libopenblas</code>.</p>
  545. </div>
  546. <h3 id="linux">Linux</h3>
  547. <p>On Linux, OpenBLAS can be installed with the system package manager, or with a
  548. package manager like <a href="https://docs.conda.io/en/latest/">Conda</a>
  549. (or alternative package managers for the conda-forge ecosystem, like
  550. <a href="https://mamba.readthedocs.io/en/latest/">Mamba</a>,
  551. <a href="https://mamba.readthedocs.io/en/latest/user_guide/micromamba.html">Micromamba</a>,
  552. or <a href="https://pixi.sh/latest/#windows-installer">Pixi</a>),
  553. <a href="https://spack.io/">Spack</a>, or <a href="https://nixos.org/">Nix</a>. For the latter set of
  554. tools, the package name in all cases is <code>openblas</code>. Since package management in
  555. quite a few of these tools is declarative (i.e., managed by adding <code>openblas</code>
  556. to a metadata file describing the dependencies for your project or
  557. environment), we won't attempt to give detailed instructions for these tools here.</p>
  558. <p>Linux distributions typically split OpenBLAS up in two packages: one containing
  559. the library itself (typically named <code>openblas</code> or <code>libopenblas</code>), and one containing headers,
  560. pkg-config and CMake files (typically named the same as the package for the
  561. library with <code>-dev</code> or <code>-devel</code> appended; e.g., <code>openblas-devel</code>). Please keep
  562. in mind that if you want to install OpenBLAS in order to use it directly in
  563. your own project, you will need to install both of those packages.</p>
  564. <p>Distro-specific installation commands:</p>
  565. <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>
  566. <div class="tabbed-content">
  567. <div class="tabbed-block">
  568. <p><div class="highlight"><pre><span></span><code>$<span class="w"> </span>sudo<span class="w"> </span>apt<span class="w"> </span>update
  569. $<span class="w"> </span>sudo<span class="w"> </span>apt<span class="w"> </span>install<span class="w"> </span>libopenblas-dev
  570. </code></pre></div>
  571. OpenBLAS can be configured as the default BLAS through the <code>update-alternatives</code> mechanism:</p>
  572. <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
  573. </code></pre></div>
  574. </div>
  575. <div class="tabbed-block">
  576. <div class="highlight"><pre><span></span><code>$<span class="w"> </span>sudo<span class="w"> </span>zypper<span class="w"> </span>refresh
  577. $<span class="w"> </span>sudo<span class="w"> </span>zypper<span class="w"> </span>install<span class="w"> </span>openblas-devel
  578. </code></pre></div>
  579. <p>OpenBLAS can be configured as the default BLAS through the <code>update-alternatives</code> mechanism:
  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></p>
  582. </div>
  583. <div class="tabbed-block">
  584. <div class="highlight"><pre><span></span><code>$<span class="w"> </span>dnf<span class="w"> </span>check-update
  585. $<span class="w"> </span>dnf<span class="w"> </span>install<span class="w"> </span>openblas-devel
  586. </code></pre></div>
  587. <div class="admonition warning">
  588. <p class="admonition-title">Warning</p>
  589. <p>Fedora does not ship the pkg-config files for OpenBLAS. Instead, it wants you to
  590. link against <a href="https://www.mpi-magdeburg.mpg.de/projects/flexiblas">FlexiBLAS</a> (which
  591. uses OpenBLAS by default as its backend on Fedora), which you can install with:</p>
  592. <div class="highlight"><pre><span></span><code>$<span class="w"> </span>dnf<span class="w"> </span>install<span class="w"> </span>flexiblas-devel
  593. </code></pre></div>
  594. </div>
  595. <p>For CentOS and RHEL, OpenBLAS packages are provided via the <a href="https://fedoraproject.org/wiki/EPEL">Fedora EPEL repository</a>.
  596. After adding that repository and its repository keys, you can install
  597. <code>openblas-devel</code> with either <code>dnf</code> or <code>yum</code>.</p>
  598. </div>
  599. <div class="tabbed-block">
  600. <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
  601. </code></pre></div>
  602. </div>
  603. </div>
  604. </div>
  605. <h3 id="windows">Windows</h3>
  606. <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>
  607. <div class="tabbed-content">
  608. <div class="tabbed-block">
  609. <p>OpenBLAS can be installed with <code>conda</code> (or <code>mamba</code>, <code>micromamba</code>, or
  610. <code>pixi</code>) from conda-forge:
  611. <div class="highlight"><pre><span></span><code>conda install openblas
  612. </code></pre></div></p>
  613. <p>Conda-forge provides a method for switching the default BLAS implementation
  614. used by all packages. To use that for OpenBLAS, install <code>libblas=*=*openblas</code>
  615. (see <a href="https://conda-forge.org/docs/maintainer/knowledge_base/#switching-blas-implementation">the docs on this mechanism</a>
  616. for more details).</p>
  617. </div>
  618. <div class="tabbed-block">
  619. <p>OpenBLAS can be installed with vcpkg:
  620. <div class="highlight"><pre><span></span><code># In classic mode:
  621. vcpkg install openblas
  622. # Or in manifest mode:
  623. vcpkg add port openblas
  624. </code></pre></div></p>
  625. </div>
  626. <div class="tabbed-block">
  627. <p>Windows is the only platform for which binaries are made available by the
  628. OpenBLAS project itself. They can be downloaded from the GitHub
  629. Releases](https://github.com/OpenMathLib/OpenBLAS/releases) page. These
  630. binaries are built with MinGW, using the following build options:
  631. <div class="highlight"><pre><span></span><code>NUM_THREADS=64 TARGET=GENERIC DYNAMIC_ARCH=1 DYNAMIC_OLDER=1 CONSISTENT_FPCSR=1 INTERFACE=0
  632. </code></pre></div>
  633. There are separate packages for x86-64 and x86. The zip archive contains
  634. the include files, static and shared libraries, as well as configuration
  635. files for getting them found via CMake or pkg-config. To use these
  636. binaries, create a suitable folder for your OpenBLAS installation and unzip
  637. the <code>.zip</code> bundle there (note that you will need to edit the provided
  638. <code>openblas.pc</code> and <code>OpenBLASConfig.cmake</code> to reflect the installation path
  639. on your computer, as distributed they have "win" or "win64" reflecting the
  640. local paths on the system they were built on).</p>
  641. <p>Note that the same binaries can be downloaded
  642. <a href="http://sourceforge.net/projects/openblas/files">from SourceForge</a>; this is
  643. mostly of historical interest.</p>
  644. </div>
  645. </div>
  646. </div>
  647. <h3 id="macos">macOS</h3>
  648. <p>To install OpenBLAS with a package manager on macOS, run:</p>
  649. <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>
  650. <div class="tabbed-content">
  651. <div class="tabbed-block">
  652. <div class="highlight"><pre><span></span><code>%<span class="w"> </span>brew<span class="w"> </span>install<span class="w"> </span>openblas
  653. </code></pre></div>
  654. </div>
  655. <div class="tabbed-block">
  656. <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
  657. </code></pre></div>
  658. </div>
  659. <div class="tabbed-block">
  660. <div class="highlight"><pre><span></span><code>%<span class="w"> </span>conda<span class="w"> </span>install<span class="w"> </span>openblas
  661. </code></pre></div>
  662. <p>Conda-forge provides a method for switching the default BLAS implementation
  663. used by all packages. To use that for OpenBLAS, install <code>libblas=*=*openblas</code>
  664. (see <a href="https://conda-forge.org/docs/maintainer/knowledge_base/#switching-blas-implementation">the docs on this mechanism</a>
  665. for more details).</p>
  666. </div>
  667. </div>
  668. </div>
  669. <h3 id="freebsd">FreeBSD</h3>
  670. <p>You can install OpenBLAS from the FreeBSD <a href="https://www.freebsd.org/ports/index.html">Ports collection</a>:
  671. <div class="highlight"><pre><span></span><code>pkg install openblas
  672. </code></pre></div></p>
  673. <h2 id="building-from-source">Building from source</h2>
  674. <p>We recommend download the latest <a href="https://github.com/OpenMathLib/OpenBLAS/releases">stable version</a>
  675. from the GitHub Releases page, or checking it out from a git tag, rather than a
  676. dev version from the <code>develop</code> branch.</p>
  677. <div class="admonition tip">
  678. <p class="admonition-title">Tip</p>
  679. <p>The User manual contains <a href="../user_manual/#compiling-openblas">a section with detailed information on compiling OpenBLAS</a>,
  680. including how to customize builds and how to cross-compile. Please read
  681. that documentation first. This page contains only platform-specific build
  682. information, and assumes you already understand the general build system
  683. invocations to build OpenBLAS, with the specific build options you want to
  684. control multi-threading and other non-platform-specific behavior).</p>
  685. </div>
  686. <h3 id="linux-and-macos">Linux and macOS</h3>
  687. <p>Ensure you have C and Fortran compilers installed, then simply type <code>make</code> to compile the library.
  688. There are no other build dependencies, nor unusual platform-specific
  689. environment variables to set or other system setup to do.</p>
  690. <div class="admonition note">
  691. <p class="admonition-title">Note</p>
  692. <p>When building in an emulator (KVM, QEMU, etc.), please make sure that the combination of CPU features exposed to
  693. the virtual environment matches that of an existing CPU to allow detection of the CPU model to succeed.
  694. (With <code>qemu</code>, this can be done by passing <code>-cpu host</code> or a supported model name at invocation).</p>
  695. </div>
  696. <h3 id="windows_1">Windows</h3>
  697. <p>We support building OpenBLAS with either MinGW or Visual Studio on Windows.
  698. Using MSVC will yield an OpenBLAS build with the Windows platform-native ABI.
  699. Using MinGW will yield a different ABI. We'll describe both methods in detail
  700. in this section, since the process for each is quite different.</p>
  701. <h4 id="visual-studio-native-windows-abi">Visual Studio &amp; native Windows ABI</h4>
  702. <p>For Visual Studio, you can use CMake to generate Visual Studio solution files;
  703. note that you will need at least CMake 3.11 for linking to work correctly).</p>
  704. <p>Note that you need a Fortran compiler if you plan to build and use the LAPACK
  705. functions included with OpenBLAS. The sections below describe using either
  706. <code>flang</code> as an add-on to clang/LLVM or <code>gfortran</code> as part of MinGW for this
  707. purpose. If you want to use the Intel Fortran compiler (<code>ifort</code> or <code>ifx</code>) for
  708. this, be sure to also use the Intel C compiler (<code>icc</code> or <code>icx</code>) for building
  709. the C parts, as the ABI imposed by <code>ifort</code> is incompatible with MSVC</p>
  710. <p>A fully-optimized OpenBLAS that can be statically or dynamically linked to your
  711. application can currently be built for the 64-bit architecture with the LLVM
  712. compiler infrastructure. We're going to use <a href="https://docs.anaconda.com/miniconda/">Miniconda3</a>
  713. to grab all of the tools we need, since some of them are in an experimental
  714. status. Before you begin, you'll need to have Microsoft Visual Studio 2015 or
  715. newer installed.</p>
  716. <ol>
  717. <li>Install Miniconda3 for 64-bit Windows using <code>winget install --id Anaconda.Miniconda3</code>,
  718. or easily download from <a href="https://docs.conda.io/en/latest/miniconda.html">conda.io</a>.</li>
  719. <li>Open the "Anaconda Command Prompt" now available in the Start Menu, or at <code>%USERPROFILE%\miniconda3\shell\condabin\conda-hook.ps1</code>.</li>
  720. <li>In that command prompt window, use <code>cd</code> to change to the directory where you want to build OpenBLAS.</li>
  721. <li>Now install all of the tools we need:
  722. <div class="highlight"><pre><span></span><code>conda update -n base conda
  723. conda config --add channels conda-forge
  724. conda install -y cmake flang clangdev perl libflang ninja
  725. </code></pre></div></li>
  726. <li>
  727. <p>Still in the Anaconda Command Prompt window, activate the 64-bit MSVC environment with <code>vcvarsall x64</code>.
  728. On Windows 11 with Visual Studio 2022, this would be done by invoking:</p>
  729. <div class="highlight"><pre><span></span><code><span class="s2">&quot;c:\Program Files\Microsoft Visual Studio\2022\Preview\vc\Auxiliary\Build\vcvars64.bat&quot;</span>
  730. </code></pre></div>
  731. <p>With VS2019, the command should be the same (except for the year number of course).
  732. For other versions of MSVC, please check the Visual Studio documentation for
  733. exactly how to invoke the <code>vcvars64.bat</code> script.</p>
  734. <p>Confirm that the environment is active by typing <code>link</code>. This should return
  735. a long list of possible options for the <code>link</code> command. If it just returns
  736. <em>"command not found"</em> or similar, review and retype the call to <code>vcvars64.bat</code>.</p>
  737. <div class="admonition note">
  738. <p class="admonition-title">Note</p>
  739. <p>if you are working from a Visual Studio command prompt window instead
  740. (so that you do not have to do the <code>vcvars</code> call), you need to invoke
  741. <code>conda activate</code> so that <code>CONDA_PREFIX</code> etc. get set up correctly before
  742. proceeding to step 6. Failing to do so will lead to link errors like
  743. <code>libflangmain.lib</code> not getting found later in the build.</p>
  744. </div>
  745. </li>
  746. <li>
  747. <p>Now configure the project with CMake. Starting in the project directory, execute the following:
  748. <div class="highlight"><pre><span></span><code>set &quot;LIB=%CONDA_PREFIX%\Library\lib;%LIB%&quot;
  749. set &quot;CPATH=%CONDA_PREFIX%\Library\include;%CPATH%&quot;
  750. mkdir build
  751. cd build
  752. 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
  753. </code></pre></div></p>
  754. <p>You may want to add further options in the <code>cmake</code> command here. For
  755. instance, the default only produces a static <code>.lib</code> version of the library.
  756. If you would rather have a DLL, add <code>-DBUILD_SHARED_LIBS=ON</code> above. Note that
  757. this step only creates some command files and directories, the actual build
  758. happens next.</p>
  759. </li>
  760. <li>
  761. <p>Build the project:</p>
  762. <p><div class="highlight"><pre><span></span><code>cmake --build . --config Release
  763. </code></pre></div>
  764. This step will create the OpenBLAS library in the <code>lib</code> directory, and
  765. various build-time tests in the <code>test</code>, <code>ctest</code> and <code>openblas_utest</code>
  766. directories. However it will not separate the header files you might need
  767. for building your own programs from those used internally. To put all
  768. relevant files in a more convenient arrangement, run the next step.</p>
  769. </li>
  770. <li>
  771. <p>Install all relevant files created by the build:</p>
  772. <p><div class="highlight"><pre><span></span><code>cmake --install . --prefix c:\opt -v
  773. </code></pre></div>
  774. This will copy all files that are needed for building and running your own
  775. programs with OpenBLAS to the given location, creating appropriate
  776. subdirectories for the individual kinds of files. In the case of <code>C:\opt</code> as
  777. given above, this would be:</p>
  778. <ul>
  779. <li><code>C:\opt\include\openblas</code> for the header files, </li>
  780. <li><code>C:\opt\bin</code> for the <code>libopenblas.dll</code> shared library,</li>
  781. <li><code>C:\opt\lib</code> for the static library, and</li>
  782. <li><code>C:\opt\share</code> holds various support files that enable other cmake-based
  783. build scripts to find OpenBLAS automatically.</li>
  784. </ul>
  785. </li>
  786. </ol>
  787. <div class="admonition tip">
  788. <p class="admonition-title">Change in complex types for Visual Studio 2017 and up</p>
  789. <p>In newer Visual Studio versions, Microsoft has changed
  790. <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>.
  791. Even when using a precompiled version of OpenBLAS, you might need to define
  792. <code>LAPACK_COMPLEX_CUSTOM</code> in order to define complex types properly for MSVC.
  793. For example, some variant of the following might help:</p>
  794. <div class="highlight"><pre><span></span><code><span class="cp">#if defined(_MSC_VER)</span>
  795. <span class="w"> </span><span class="cp">#include</span><span class="w"> </span><span class="cpf">&lt;complex.h&gt;</span>
  796. <span class="w"> </span><span class="cp">#define LAPACK_COMPLEX_CUSTOM</span>
  797. <span class="w"> </span><span class="cp">#define lapack_complex_float _Fcomplex</span>
  798. <span class="w"> </span><span class="cp">#define lapack_complex_double _Dcomplex</span>
  799. <span class="cp">#endif</span>
  800. </code></pre></div>
  801. <p>For reference, see
  802. <a href="https://github.com/OpenMathLib/OpenBLAS/issues/3661">openblas#3661</a>,
  803. <a href="https://github.com/Reference-LAPACK/lapack/issues/683">lapack#683</a>, and
  804. <a href="https://stackoverflow.com/questions/47520244/using-openblas-lapacke-in-visual-studio">this Stack Overflow question</a>.</p>
  805. </div>
  806. <div class="admonition warning">
  807. <p class="admonition-title">Building 32-bit binaries with MSVC</p>
  808. <p>This method may produce binaries which demonstrate significantly lower
  809. performance than those built with the other methods. The Visual Studio
  810. compiler does not support the dialect of assembly used in the cpu-specific
  811. optimized files, so only the "generic" <code>TARGET</code> which is written in pure C
  812. will get built. For the same reason it is not possible (and not necessary)
  813. to use <code>-DDYNAMIC_ARCH=ON</code> in a Visual Studio build. You may consider
  814. building for the 32-bit architecture using the GNU (MinGW) ABI instead.</p>
  815. </div>
  816. <h5 id="cmake-visual-studio-integration">CMake &amp; Visual Studio integration</h5>
  817. <p>To generate Visual Studio solution files, ensure CMake is installed and then run:
  818. <div class="highlight"><pre><span></span><code># Do this from Powershell so cmake can find visual studio
  819. cmake -G &quot;Visual Studio 14 Win64&quot; -DCMAKE_BUILD_TYPE=Release .
  820. </code></pre></div></p>
  821. <p>To then build OpenBLAS using those solution files from within Visual Studio, we
  822. also need Perl. Please install it and ensure it's on the <code>PATH</code> (see, e.g.,
  823. <a href="http://stackoverflow.com/questions/3051049/active-perl-installation-on-windows-operating-system">this Stack Overflow question for how</a>).</p>
  824. <p>If you build from within Visual Studio, the dependencies may not be
  825. automatically configured: if you try to build <code>libopenblas</code> directly, it may
  826. fail with a message saying that some <code>.obj</code> files aren't found. If this
  827. happens, you can work around the problem by building the projects that
  828. <code>libopenblas</code> depends on before building <code>libopenblas</code> itself.</p>
  829. <h6 id="build-openblas-for-universal-windows-platform">Build OpenBLAS for Universal Windows Platform</h6>
  830. <p>OpenBLAS can be built targeting <a href="https://en.wikipedia.org/wiki/Universal_Windows_Platform">Universal Windows Platform</a>
  831. (UWP) like this:</p>
  832. <ol>
  833. <li>Follow the steps above to build the Visual Studio solution files for
  834. Windows. This builds the helper executables which are required when building
  835. the OpenBLAS Visual Studio solution files for UWP in step 2.</li>
  836. <li>
  837. <p>Remove the generated <code>CMakeCache.txt</code> and the <code>CMakeFiles</code> directory from
  838. the OpenBLAS source directory, then re-run CMake with the following options:</p>
  839. <p><div class="highlight"><pre><span></span><code># do this to build UWP compatible solution files
  840. 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 .
  841. </code></pre></div>
  842. 3. Now build the solution with Visual Studio.</p>
  843. </li>
  844. </ol>
  845. <h4 id="mingw-gnu-abi">MinGW &amp; GNU ABI</h4>
  846. <div class="admonition note">
  847. <p class="admonition-title">Note</p>
  848. <p>The resulting library from building with MinGW as described below can be
  849. used in Visual Studio, but it can only be linked dynamically. This
  850. configuration has not been thoroughly tested and should be considered
  851. experimental.</p>
  852. </div>
  853. <p>To build OpenBLAS on Windows with MinGW:</p>
  854. <ol>
  855. <li>Install the MinGW (GCC) compiler suite, either the 32-bit
  856. [MinGW]((http://www.mingw.org/) or the 64-bit
  857. <a href="http://mingw-w64.sourceforge.net/">MinGW-w64</a> toolchain. Be sure to install
  858. its <code>gfortran</code> package as well (unless you really want to build the BLAS part
  859. of OpenBLAS only) and check that <code>gcc</code> and <code>gfortran</code> are the same version.
  860. In addition, please install MSYS2 with MinGW.</li>
  861. <li>Build OpenBLAS in the MSYS2 shell. Usually, you can just type <code>make</code>.
  862. OpenBLAS will detect the compiler and CPU automatically. </li>
  863. <li>After the build is complete, OpenBLAS will generate the static library
  864. <code>libopenblas.a</code> and the shared library <code>libopenblas.dll</code> in the folder. You
  865. can type <code>make PREFIX=/your/installation/path install</code> to install the
  866. library to a certain location.</li>
  867. </ol>
  868. <p>Note that OpenBLAS will generate the import library <code>libopenblas.dll.a</code> for
  869. <code>libopenblas.dll</code> by default.</p>
  870. <p>If you want to generate Windows-native PDB files from a MinGW build, you can
  871. use the <a href="https://github.com/rainers/cv2pdb">cv2pdb</a> tool to do so.</p>
  872. <p>To then use the built OpenBLAS shared library in Visual Studio:</p>
  873. <ol>
  874. <li>Copy the import library (<code>OPENBLAS_TOP_DIR/libopenblas.dll.a</code>) and the
  875. shared library (<code>libopenblas.dll</code>) into the same folder (this must be the
  876. folder of your project that is going to use the BLAS library. You may need
  877. to add <code>libopenblas.dll.a</code> to the linker input list: <code>properties-&gt;Linker-&gt;Input</code>).</li>
  878. <li>Please follow the Visual Studio documentation about using third-party .dll
  879. libraries, and make sure to link against a library for the correct
  880. architecture.<sup id="fnref:1"><a class="footnote-ref" href="#fn:1">1</a></sup></li>
  881. <li>If you need CBLAS, you should include <code>cblas.h</code> in
  882. <code>/your/installation/path/include</code> in Visual Studio. Please see
  883. <a href="http://github.com/OpenMathLib/OpenBLAS/issues/95">openblas#95</a> for more details.</li>
  884. </ol>
  885. <div class="admonition info">
  886. <p class="admonition-title">Limitations of using the MinGW build within Visual Studio</p>
  887. <ul>
  888. <li>Both static and dynamic linking are supported with MinGW. With Visual
  889. Studio, however, only dynamic linking is supported and so you should use
  890. the import library.</li>
  891. <li>Debugging from Visual Studio does not work because MinGW and Visual
  892. Studio have incompatible formats for debug information (PDB vs.
  893. DWARF/STABS). You should either debug with GDB on the command line or
  894. with a visual frontend, for instance <a href="http://www.eclipse.org/cdt/">Eclipse</a> or
  895. <a href="http://qt.nokia.com/products/developer-tools/">Qt Creator</a>.</li>
  896. </ul>
  897. </div>
  898. <h4 id="windows-on-arm">Windows on Arm</h4>
  899. <p>The following tools needs to be installed to build for Windows on Arm (WoA):</p>
  900. <ul>
  901. <li>Clang for Windows on Arm.
  902. Find the latest LLVM build for WoA from <a href="https://releases.llvm.org/">LLVM release page</a>.
  903. E.g: LLVM 12 build for WoA64 can be found <a href="https://github.com/llvm/llvm-project/releases/download/llvmorg-12.0.0/LLVM-12.0.0-woa64.exe">here</a>
  904. Run the LLVM installer and ensure that LLVM is added to environment PATH.</li>
  905. <li>Download and install classic Flang for Windows on Arm.
  906. Classic Flang is the only available Fortran compiler for Windows on Arm for now.
  907. A pre-release build can be found <a href="https://github.com/kaadam/flang/releases/tag/v0.1">here</a>
  908. There is no installer for classic flang and the zip package can be
  909. extracted and the path needs to be added to environment <code>PATH</code>.
  910. E.g., in PowerShell:
  911. <div class="highlight"><pre><span></span><code>$env:Path += &quot;;C:\flang_woa\bin&quot;
  912. </code></pre></div></li>
  913. </ul>
  914. <p>The following steps describe how to build the static library for OpenBLAS with and without LAPACK:</p>
  915. <ol>
  916. <li>
  917. <p>Build OpenBLAS static library with BLAS and LAPACK routines with Make:</p>
  918. <div class="highlight"><pre><span></span><code>$<span class="w"> </span>make<span class="w"> </span><span class="nv">CC</span><span class="o">=</span><span class="s2">&quot;clang-cl&quot;</span><span class="w"> </span><span class="nv">HOSTCC</span><span class="o">=</span><span class="s2">&quot;clang-cl&quot;</span><span class="w"> </span><span class="nv">AR</span><span class="o">=</span><span class="s2">&quot;llvm-ar&quot;</span><span class="w"> </span><span class="nv">BUILD_WITHOUT_LAPACK</span><span class="o">=</span><span class="m">0</span><span class="w"> </span><span class="nv">NOFORTRAN</span><span class="o">=</span><span class="m">0</span><span class="w"> </span><span class="nv">DYNAMIC_ARCH</span><span class="o">=</span><span class="m">0</span><span class="w"> </span><span class="nv">TARGET</span><span class="o">=</span>ARMV8<span class="w"> </span><span class="nv">ARCH</span><span class="o">=</span>arm64<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">USE_OPENMP</span><span class="o">=</span><span class="m">0</span><span class="w"> </span><span class="nv">PARALLEL</span><span class="o">=</span><span class="m">1</span><span class="w"> </span><span class="nv">RANLIB</span><span class="o">=</span><span class="s2">&quot;llvm-ranlib&quot;</span><span class="w"> </span><span class="nv">MAKE</span><span class="o">=</span>make<span class="w"> </span><span class="nv">F_COMPILER</span><span class="o">=</span>FLANG<span class="w"> </span><span class="nv">FC</span><span class="o">=</span>FLANG<span class="w"> </span><span class="nv">FFLAGS_NOOPT</span><span class="o">=</span><span class="s2">&quot;-march=armv8-a -cpp&quot;</span><span class="w"> </span><span class="nv">FFLAGS</span><span class="o">=</span><span class="s2">&quot;-march=armv8-a -cpp&quot;</span><span class="w"> </span><span class="nv">NEED_PIC</span><span class="o">=</span><span class="m">0</span><span class="w"> </span><span class="nv">HOSTARCH</span><span class="o">=</span>arm64<span class="w"> </span>libs<span class="w"> </span>netlib
  919. </code></pre></div>
  920. </li>
  921. <li>
  922. <p>Build static library with BLAS routines using CMake:</p>
  923. <p>Classic Flang has compatibility issues with CMake, hence only BLAS routines can be compiled with CMake:</p>
  924. <div class="highlight"><pre><span></span><code>$<span class="w"> </span>mkdir<span class="w"> </span>build
  925. $<span class="w"> </span><span class="nb">cd</span><span class="w"> </span>build
  926. $<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>clang<span class="w"> </span>-DBUILD_WITHOUT_LAPACK<span class="o">=</span><span class="m">1</span><span class="w"> </span>-DNOFORTRAN<span class="o">=</span><span class="m">1</span><span class="w"> </span>-DDYNAMIC_ARCH<span class="o">=</span><span class="m">0</span><span class="w"> </span>-DTARGET<span class="o">=</span>ARMV8<span class="w"> </span>-DARCH<span class="o">=</span>arm64<span class="w"> </span>-DBINARY<span class="o">=</span><span class="m">64</span><span class="w"> </span>-DUSE_OPENMP<span class="o">=</span><span class="m">0</span><span class="w"> </span>-DCMAKE_SYSTEM_PROCESSOR<span class="o">=</span>ARM64<span class="w"> </span>-DCMAKE_CROSSCOMPILING<span class="o">=</span><span class="m">1</span><span class="w"> </span>-DCMAKE_SYSTEM_NAME<span class="o">=</span>Windows
  927. $<span class="w"> </span>cmake<span class="w"> </span>--build<span class="w"> </span>.<span class="w"> </span>--config<span class="w"> </span>Release
  928. </code></pre></div>
  929. </li>
  930. </ol>
  931. <div class="admonition tip">
  932. <p class="admonition-title"><code>getarch.exe</code> execution error</p>
  933. <p>If you notice that platform-specific headers by <code>getarch.exe</code> are not
  934. generated correctly, this could be due to a known debug runtime DLL issue for
  935. arm64 platforms. Please check out <a href="https://linaro.atlassian.net/wiki/spaces/WOAR/pages/28677636097/Debug+run-time+DLL+issue#Workaround">this page</a>
  936. for a workaround.</p>
  937. </div>
  938. <h4 id="generating-an-import-library">Generating an import library</h4>
  939. <p>Microsoft Windows has this thing called "import libraries". You need it for
  940. MSVC; you don't need it for MinGW because the <code>ld</code> linker is smart enough -
  941. however, you may still want it for some reason, so we'll describe the process
  942. for both MSVC and MinGW.</p>
  943. <p>Import libraries are compiled from a list of what symbols to use, which are
  944. contained in a <code>.def</code> file. A <code>.def</code> file should be already be present in the
  945. <code>exports</code> directory under the top-level OpenBLAS directory after you've run a build.
  946. In your shell, move to this directory: <code>cd exports</code>.</p>
  947. <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>
  948. <div class="tabbed-content">
  949. <div class="tabbed-block">
  950. <p>Unlike MinGW, MSVC absolutely requires an import library. Now the C ABI of
  951. MSVC and MinGW are actually identical, so linking is actually okay (any
  952. incompatibility in the C ABI would be a bug).</p>
  953. <p>The import libraries of MSVC have the suffix <code>.lib</code>. They are generated
  954. 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>
  955. </div>
  956. <div class="tabbed-block">
  957. <p>MinGW import libraries have the suffix <code>.a</code>, just like static libraries.
  958. Our goal is to produce the file <code>libopenblas.dll.a</code>.</p>
  959. <p>You need to first insert a line <code>LIBRARY libopenblas.dll</code> in <code>libopenblas.def</code>:
  960. <div class="highlight"><pre><span></span><code>cat &lt;(echo &quot;LIBRARY libopenblas.dll&quot;) libopenblas.def &gt; libopenblas.def.1
  961. mv libopenblas.def.1 libopenblas.def
  962. </code></pre></div></p>
  963. <p>Now the <code>.def</code> file probably looks like:
  964. <div class="highlight"><pre><span></span><code>LIBRARY libopenblas.dll
  965. EXPORTS
  966. caxpy=caxpy_ @1
  967. caxpy_=caxpy_ @2
  968. ...
  969. </code></pre></div>
  970. Then, generate the import library: <code>dlltool -d libopenblas.def -l libopenblas.dll.a</code></p>
  971. <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>
  972. </div>
  973. </div>
  974. </div>
  975. <h3 id="android">Android</h3>
  976. <p>To build OpenBLAS for Android, you will need the following tools installed on your machine:</p>
  977. <ul>
  978. <li><a href="https://developer.android.com/ndk/">The Android NDK</a></li>
  979. <li>Perl</li>
  980. <li>Clang compiler on the build machine</li>
  981. </ul>
  982. <p>The next two sections below describe how to build with Clang for ARMV7 and
  983. ARMV8 targets, respectively. The same basic principles as described below for
  984. ARMV8 should also apply to building an x86 or x86-64 version (substitute
  985. something like <code>NEHALEM</code> for the target instead of <code>ARMV8</code>, and replace all the
  986. <code>aarch64</code> in the toolchain paths with <code>x86</code> or <code>x96_64</code> as appropriate).</p>
  987. <div class="admonition info">
  988. <p class="admonition-title">Historic note</p>
  989. <p>Since NDK version 19, the default toolchain is provided as a standalone
  990. toolchain, so building one yourself following
  991. <a href="http://developer.android.com/ndk/guides/standalone_toolchain.html">building a standalone toolchain</a>
  992. should no longer be necessary.</p>
  993. </div>
  994. <h4 id="building-for-armv7">Building for ARMV7</h4>
  995. <div class="highlight"><pre><span></span><code><span class="c1"># Set path to ndk-bundle</span>
  996. <span class="nb">export</span><span class="w"> </span><span class="nv">NDK_BUNDLE_DIR</span><span class="o">=</span>/path/to/ndk-bundle
  997. <span class="c1"># Set the PATH to contain paths to clang and arm-linux-androideabi-* utilities</span>
  998. <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>
  999. <span class="c1"># Set LDFLAGS so that the linker finds the appropriate libgcc</span>
  1000. <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>
  1001. <span class="c1"># Set the clang cross compile flags</span>
  1002. <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>
  1003. <span class="c1">#OpenBLAS Compile</span>
  1004. 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
  1005. </code></pre></div>
  1006. <p>On macOS, it may also be necessary to give the complete path to the <code>ar</code>
  1007. utility in the make command above, like so:
  1008. <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
  1009. </code></pre></div>
  1010. otherwise you may get a linker error complaining like <code>malformed archive header
  1011. name at 8</code> when the native macOS <code>ar</code> command was invoked instead.</p>
  1012. <h4 id="building-for-armv8">Building for ARMV8</h4>
  1013. <p><div class="highlight"><pre><span></span><code><span class="c1"># Set path to ndk-bundle</span>
  1014. <span class="nb">export</span><span class="w"> </span><span class="nv">NDK_BUNDLE_DIR</span><span class="o">=</span>/path/to/ndk-bundle/
  1015. <span class="c1"># Export PATH to contain directories of clang and aarch64-linux-android-* utilities</span>
  1016. <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>
  1017. <span class="c1"># Setup LDFLAGS so that loader can find libgcc and pass -lm for sqrt</span>
  1018. <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>
  1019. <span class="c1"># Setup the clang cross compile options</span>
  1020. <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>
  1021. <span class="c1"># Compile</span>
  1022. 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
  1023. </code></pre></div>
  1024. Note: using <code>TARGET=CORTEXA57</code> in place of <code>ARMV8</code> will pick up better
  1025. optimized routines. Implementations for the <code>CORTEXA57</code> target are compatible
  1026. with all other <code>ARMV8</code> targets.</p>
  1027. <p>Note: for NDK 23b, something as simple as:
  1028. <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>
  1029. 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
  1030. </code></pre></div>
  1031. appears to be sufficient on Linux.</p>
  1032. <details class="note">
  1033. <summary>Alternative build script for 3 architectures</summary>
  1034. <p>This script will build OpenBLAS for 3 architecture (<code>ARMV7</code>, <code>ARMV8</code>, <code>X86</code>) and install them to <code>/opt/OpenBLAS/lib</code>.
  1035. It was tested on macOS with NDK version 21.3.6528147.</p>
  1036. <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
  1037. <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
  1038. make<span class="w"> </span>clean
  1039. make<span class="w"> </span><span class="se">\</span>
  1040. <span class="w"> </span><span class="nv">TARGET</span><span class="o">=</span>ARMV7<span class="w"> </span><span class="se">\</span>
  1041. <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>
  1042. <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>
  1043. <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>
  1044. <span class="w"> </span><span class="nv">HOSTCC</span><span class="o">=</span>gcc<span class="w"> </span><span class="se">\</span>
  1045. <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>
  1046. <span class="w"> </span>-j4
  1047. sudo<span class="w"> </span>make<span class="w"> </span>install
  1048. make<span class="w"> </span>clean
  1049. make<span class="w"> </span><span class="se">\</span>
  1050. <span class="w"> </span><span class="nv">TARGET</span><span class="o">=</span>CORTEXA57<span class="w"> </span><span class="se">\</span>
  1051. <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>
  1052. <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>
  1053. <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>
  1054. <span class="w"> </span><span class="nv">HOSTCC</span><span class="o">=</span>gcc<span class="w"> </span><span class="se">\</span>
  1055. -j4
  1056. sudo<span class="w"> </span>make<span class="w"> </span>install
  1057. make<span class="w"> </span>clean
  1058. make<span class="w"> </span><span class="se">\</span>
  1059. <span class="w"> </span><span class="nv">TARGET</span><span class="o">=</span>ATOM<span class="w"> </span><span class="se">\</span>
  1060. <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>
  1061. <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>
  1062. <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>
  1063. <span class="nv">HOSTCC</span><span class="o">=</span>gcc<span class="w"> </span><span class="se">\</span>
  1064. <span class="nv">ARM_SOFTFP_ABI</span><span class="o">=</span><span class="m">1</span><span class="w"> </span><span class="se">\</span>
  1065. -j4
  1066. sudo<span class="w"> </span>make<span class="w"> </span>install
  1067. <span class="c1">## This will build for x86_64 </span>
  1068. make<span class="w"> </span>clean
  1069. make<span class="w"> </span><span class="se">\</span>
  1070. <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>
  1071. <span class="nv">ONLY_CBLAS</span><span class="o">=</span><span class="m">1</span><span class="w"> </span><span class="se">\</span>
  1072. <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>
  1073. <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>
  1074. <span class="nv">HOSTCC</span><span class="o">=</span>gcc<span class="w"> </span><span class="se">\</span>
  1075. <span class="nv">ARM_SOFTFP_ABI</span><span class="o">=</span><span class="m">1</span><span class="w"> </span><span class="se">\</span>
  1076. -j4
  1077. sudo<span class="w"> </span>make<span class="w"> </span>install
  1078. </code></pre></div>
  1079. You can find full list of target architectures in <a href="https://github.com/OpenMathLib/OpenBLAS/blob/develop/TargetList.txt">TargetList.txt</a></p>
  1080. </details>
  1081. <h3 id="iphoneios">iPhone/iOS</h3>
  1082. <p>As none of the current developers uses iOS, the following instructions are what
  1083. was found to work in our Azure CI setup, but as far as we know this builds a
  1084. fully working OpenBLAS for this platform.</p>
  1085. <p>Go to the directory where you unpacked OpenBLAS,and enter the following commands:
  1086. <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
  1087. <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
  1088. 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>
  1089. </code></pre></div>
  1090. Adjust <code>MIN_IOS_VERSION</code> as necessary for your installation. E.g., change the version number
  1091. to the minimum iOS version you want to target and execute this file to build the library.</p>
  1092. <h3 id="mips">MIPS</h3>
  1093. <p>For MIPS targets you will need latest toolchains:</p>
  1094. <ul>
  1095. <li>P5600 - MTI GNU/Linux Toolchain</li>
  1096. <li>I6400, P6600 - IMG GNU/Linux Toolchain</li>
  1097. </ul>
  1098. <p>You can use following commandlines for builds:</p>
  1099. <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>
  1100. <span class="nv">IMG_GCC_PREFIX</span><span class="o">=</span>mips-img-linux-gnu
  1101. <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>
  1102. <span class="c1"># I6400 Build (n32):</span>
  1103. 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
  1104. <span class="c1"># I6400 Build (n64):</span>
  1105. 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
  1106. <span class="c1"># P6600 Build (n32):</span>
  1107. 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
  1108. <span class="c1"># P6600 Build (n64):</span>
  1109. 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
  1110. <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>
  1111. <span class="nv">MTI_GCC_PREFIX</span><span class="o">=</span>mips-mti-linux-gnu
  1112. <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>
  1113. <span class="c1"># P5600 Build:</span>
  1114. 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
  1115. </code></pre></div>
  1116. <h3 id="freebsd_1">FreeBSD</h3>
  1117. <p>You will need to install the following tools from the FreeBSD ports tree:</p>
  1118. <ul>
  1119. <li>lang/gcc</li>
  1120. <li>lang/perl5.12</li>
  1121. <li>ftp/curl</li>
  1122. <li>devel/gmake</li>
  1123. <li>devel/patch</li>
  1124. </ul>
  1125. <p>To compile run the command:
  1126. <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
  1127. </code></pre></div></p>
  1128. <h3 id="cortex-m">Cortex-M</h3>
  1129. <p>Cortex-M is a widely used microcontroller that is present in a variety of
  1130. industrial and consumer electronics. A common variant of the Cortex-M is the
  1131. <code>STM32F4xx</code> series. Here, we will give instructions for building for that
  1132. series.</p>
  1133. <p>First, install the embedded Arm GCC compiler from the Arm website. Then, create
  1134. the following <code>toolchain.cmake</code> file:</p>
  1135. <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>
  1136. <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>
  1137. <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>
  1138. <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>
  1139. <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>
  1140. <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>
  1141. <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>
  1142. <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>
  1143. <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>
  1144. </code></pre></div>
  1145. <p>Then build OpenBLAS with:
  1146. <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>
  1147. </code></pre></div></p>
  1148. <p>In your embedded application, the following functions need to be provided for OpenBLAS to work correctly:
  1149. <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>
  1150. <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>
  1151. </code></pre></div></p>
  1152. <div class="admonition note">
  1153. <p class="admonition-title">Note</p>
  1154. <p>If you are developing for an embedded platform, it is your responsibility
  1155. to make sure that the device has sufficient memory for <code>malloc</code> calls.
  1156. <a href="https://github.com/embeddedartistry/libmemory">Libmemory</a>
  1157. provides one implementation of <code>malloc</code> for embedded platforms.</p>
  1158. </div>
  1159. <div class="footnote">
  1160. <hr />
  1161. <ol>
  1162. <li id="fn:1">
  1163. <p>If the OpenBLAS DLLs are not linked correctly, you may see an error like
  1164. <em>"The application was unable to start correctly (0xc000007b)"</em>, which typically
  1165. 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>
  1166. </li>
  1167. </ol>
  1168. </div>
  1169. <aside class="md-source-file">
  1170. <span class="md-source-file__fact">
  1171. <span class="md-icon" title="Last update">
  1172. <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.1-2.1-2M12.5 7v5.2l4 2.4-1 1L11 13V7h1.5M11 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.2v1.8Z"/></svg>
  1173. </span>
  1174. <span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date">July 4, 2024</span>
  1175. </span>
  1176. <span class="md-source-file__fact">
  1177. <span class="md-icon" title="Created">
  1178. <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-3h-2Z"/></svg>
  1179. </span>
  1180. <span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date">August 4, 2023</span>
  1181. </span>
  1182. </aside>
  1183. </article>
  1184. </div>
  1185. <script>var target=document.getElementById(location.hash.slice(1));target&&target.name&&(target.checked=target.name.startsWith("__tabbed_"))</script>
  1186. </div>
  1187. </main>
  1188. <footer class="md-footer">
  1189. <div class="md-footer-meta md-typeset">
  1190. <div class="md-footer-meta__inner md-grid">
  1191. <div class="md-copyright">
  1192. <div class="md-copyright__highlight">
  1193. Copyright &copy; 2012- OpenBLAS contributors
  1194. </div>
  1195. Made with
  1196. <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
  1197. Material for MkDocs
  1198. </a>
  1199. </div>
  1200. <div class="md-social">
  1201. <a href="https://github.com/OpenMathLib/OpenBLAS" target="_blank" rel="noopener" title="github.com" class="md-social__link">
  1202. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><!--! Font Awesome Free 6.5.2 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.6zm-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.3zm44.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.9zM244.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 8zM97.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-1zm-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.7zm32.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-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"/></svg>
  1203. </a>
  1204. <a href="https://github.com/OpenMathLib/OpenBLAS/LICENSE" target="_blank" rel="noopener" title="github.com" class="md-social__link">
  1205. <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.04 8.04 0 0 1-.57 2.8A7.84 7.84 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 10Z"/></svg>
  1206. </a>
  1207. </div>
  1208. </div>
  1209. </div>
  1210. </footer>
  1211. </div>
  1212. <div class="md-dialog" data-md-component="dialog">
  1213. <div class="md-dialog__inner md-typeset"></div>
  1214. </div>
  1215. <script id="__config" type="application/json">{"base": "..", "features": ["header.autohide"], "search": "../assets/javascripts/workers/search.b8dbb3d2.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>
  1216. <script src="../assets/javascripts/bundle.fe8b6f2b.min.js"></script>
  1217. </body>
  1218. </html>

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