Its hard to believe, but our ArrayFire GPU computing library was <a href="http://sandbox.arrayfire.com/arrayfire-is-now-open-source/">open-sourced a year ago</a>! While we were packing up our booth to head to <a href="http://sandbox.arrayfire.com/arrayfire-at-sc15/">SuperComputing 2015</a> my colleagues started reminiscing on how much our company and library have changed.
<h3>ArrayFire the library</h3>
In terms of raw statistics, the ArrayFire library is a really active project given that GPU computing is still seen as a niche field. Since its inception, ArrayFire has received 3285 commits from 31 developers (11 of which are our employees) and  produced nine (public) releases. At present we have 84 watchers, 1141 stars, and 160 forks of our code. In the last year we have had a total of 1105 opened issues. Of these, 427 are closed, 577 are closed pull requests, and 90 remain open.

Using the popular <a href="http://www.dwheeler.com/sloccount/">SLOCCount</a> program, we can get a lot of interesting statistical information about the ArrayFire library including the number of lines of code per source type and approximate cost of development:
<table>
<thead>
<tr>
<th>Metric</th>
<th>3.0 beta</th>
<th>3.2</th>
</tr>
</thead>
<tbody>
<tr>
<td>cpp</td>
<td>59140</td>
<td>99287</td>
</tr>
<tr>
<td>opencl*</td>
<td>4522</td>
<td>7658</td>
</tr>
<tr>
<td>ansi-c</td>
<td>547</td>
<td>676</td>
</tr>
<tr>
<td>xml</td>
<td>165</td>
<td>171</td>
</tr>
<tr>
<td>sh</td>
<td>0</td>
<td>49</td>
</tr>
<tr>
<td>lines</td>
<td>64,374</td>
<td>107,841</td>
</tr>
<tr>
<td>commits</td>
<td>1,467</td>
<td>3,286</td>
</tr>
<tr>
<td>contributors</td>
<td>21</td>
<td>31</td>
</tr>
<tr>
<td>Estimated Cost</td>
<td>$2,891,353</td>
<td>$3,168,838</td>
</tr>
</tbody>
</table>
* Note: SLOCCount thinks our OpenCL kernels (.cl) are lisp files.

So in the last year contributions from <a href="https://github.com/arrayfire/arrayfire/graphs/contributors">ourselves and others</a> have added approximately $300,000 in functionality to the library. By our own internal estimates, these numbers are not too far off depending if you track development back to the earliest days of our company.

In the last year we have added a ton of new functionality including:
<ul>
	<li>Computer vision: FAST, ORB, Nearest Neighbor, Harris, SUSAN,  SIFT, Difference of Gaussians, Homography, and GLOH</li>
	<li>Image processing: Convolution, DFT, template matching, SOBEL, colorspace conversion, erosion, wrapping, unwrapping, summed area of tables, load/save raw images, and in-place FFTs</li>
	<li>Linear algebra: Matrix multiplcication, in-place factorization, solving routines, single value decomposition.</li>
	<li>Installers: new packaging for Windows, Linux, and OSX installers.</li>
	<li>Language wrappers (discussed below)</li>
	<li>Graphics: Created an integrated our new graphics library, <a href="https://github.com/arrayfire/forge">Forge</a>, into ArrayFire.</li>
	<li>Datatypes: Support for 16- and 64-bit integers.</li>
</ul>
And a wealth of other functionality including support for 16-bit integers, graphics, a unified backend, and convenience debugging/printing functions.
<h3>Third-party contributions</h3>
I have previously written about <a href="http://sandbox.arrayfire.com/open-source-benefits-contributors/">several large contributions to ArrayFire</a>, but a one-year review is always a prime opportunity to reiterate our appreciation for these developers.
<h4>Installers</h4>
Although we now recommend <a href="http://sandbox.arrayfire.com/download/">using our installers for Windows, Linux and OSX</a> due to their integration of Intel Math Kernel Library to accelerate linear algebra functions, we are still grateful for early packaging and distribution work provided by a few key developers.
<ul>
	<li>Debian: <a href="https://github.com/ghisvail">Ghislain Antony Vaillant</a> created Debian packages for <a href="https://github.com/clMathLibraries/clFFT">clFFT</a>,<a href="https://github.com/clMathLibraries/clBLAS">clBLAS</a>, and <a href="https://ftp-master.debian.org/new/arrayfire_3.0.1-1.html">recently added</a> ArrayFire's CPU backend and submitted these to Debian upstream.</li>
	<li>Homebrew / OSX: <a href="https://github.com/glehmann" target="https://github.com/glehmann" rel="noreferrer" data-referer-safe="1">Gaëtan Lehmann</a> and <a href="https://github.com/hmalphettes">Hugues Malphettes</a> created a Homebrew formulae for installing ArrayFire on OSX. Hugues' formula was accepted into the official <a href="https://github.com/Homebrew/homebrew-science">homebrew-science</a> repository.</li>
	<li>Gentoo: <a href="https://github.com/marbre?tab=activity">Marius Brehler</a></li>
	<li>Arch: <a href="https://github.com/svenstaro?tab=repositories">Sven-Hendrik Haase</a></li>
</ul>
<h4>Language wrappers</h4>
Although ArrayFire is principally a C/C++ library, we ensured the C API was sufficiently complete to create wrappers for other languages. To highlight the most active repositories:
<table>
<thead></thead>
<tbody>
<tr>
<td><a href="https://github.com/arrayfire/arrayfire-js">Javascript</a></td>
<td> <a href="https://github.com/unbornchikken">Gábor Mező</a></td>
</tr>
<tr>
<td><a href="https://github.com/arrayfire/arrayfire-rust">Rust</a></td>
<td>ArrayFire developer <a href="https://github.com/9prady9">Pradeep Garigipati</a> with substantial contributions from <a class="aname" href="https://github.com/jramapuram">Jason Ramapuram</a></td>
</tr>
<tr>
<td><a href="https://github.com/arrayfire/arrayfire-dotnet">.NET</a></td>
<td>Was recently created by <a href="https://github.com/royalstream">Steven Burns</a></td>
</tr>
<tr>
<td><a href="https://github.com/arrayfire/arrayfire-go">GO</a></td>
<td><a href="https://github.com/rabarar">Rob Baruch</a> (this project just started, its a great place to get started)</td>
</tr>
<tr>
<td><a href="https://github.com/arrayfire/arrayfire-java">Java</a></td>
<td>ArrayFire developers <a href="https://github.com/9prady9">Pradeep Garigipati</a> and <a href="https://github.com/pavanky">Pavan Yalamanchili</a></td>
</tr>
<tr>
<td><a href="https://github.com/arrayfire/arrayfire-r">R</a></td>
<td>ArrayFire developer <a href="https://github.com/pavanky">Pavan Yalamanchili</a></td>
</tr>
<tr>
<td><a href="https://github.com/arrayfire/arrayfire-fortran">Fortran</a></td>
<td>ArrayFire developer <a href="https://github.com/pavanky">Pavan Yalamanchili</a></td>
</tr>
</tbody>
</table>
Check out ArrayFire's <a href="https://github.com/arrayfire/">full list of repositories</a> for other wrappers.
<h4>Business impact</h4>
There was much debate among the executive team on whether or not we should make ArrayFire open source software. The business impact was quite clear: we would lose considerable revenue by giving our software away for free and the return was not at all evident. To survive what could have been economic disaster for our company, we diversified. About a year  before releasing our software we pursued new consulting opportunities, applied for grants, and sought out long-term partnerships with larger companies.

Due to this diversification, the initial financial impact of going open source was, amusingly, "no impact at all." We had several long-term clients and a handful of grants which was more than enough to keep our engineers busy. For the first few months the most noticeable impact we saw was a significant uptick in website traffic, support forum posts, and downloads due to prominent articles on social media. In fact, at one point ArrayFire was #2 on <a href="https://news.ycombinator.com/">HackerNews</a>, being ousted from the #1 spot only by <a href="https://en.wikipedia.org/wiki/Philae_(spacecraft)">ESA's Rosetta-Philae spacecraft</a> (which just made history by successfully harpooning a comet).

I don't recall the precise date when it happened, but when we received our first client that specifically said that they contacted us "because of your open-source ArrayFire library." We were ecstatic. Since then business due to open-source has grown appreciably. At first many of our customers were academics or small startups which were interested in short-term engagements. Now we see a fairly good mix of short and long-term engagements from a variety of businesses. For example, many small companies ask us to review their code to see what could be accelerated under our 1-day <a href="http://sandbox.arrayfire.com/consulting/">Starter Package</a>. Often these customers come back and ask us to implement the suggestions we put forth. Meanwhile larger companies often seek fixed-fee engagements for well-defined deliverable; however, we do have a handful of clients which hired us on retainers so our engineers can immediately begin work on new projects.

Over-all, we feel that making ArrayFire open-source was beneficial for our company. We took proper measures ahead of time to ensure we could weather a sudden drop in sales revenue and adapted our business model to provide services. Our sales department presently estimates we receive 10 customer inquiries as a result of ArrayFire every week. Considering we spend no funds on advertising and no company resources on promoting ArrayFire (beyond what you read here), the open-source experiment appears to be a success.