2. Why Software Libraries Are Great
Reduce many lines of code to one line
Obsessively tuned by experts; faster than DIY
Well-tested and maintained
Continuously improving
3. 12 Minutes of Library Love
Dusty servers = bad, very bad
Software struggles lead to
under utilization
Everyone loses
9. Portability
Flavors of portability
HW options
CPU fallback
High-performance mobile computing
Libraries can provide portability
10. Scalability
Always start with one device
Potential headaches of adding devices
Performance hit
Development complexity
Libraries can make scaling easy
11. Community
What do you do when bugs arise?
Continuous refinement
Someone to answer questions
Libraries can have great community support
12. Benefits of Using a Library
Development
Documentation
Test and QA
Maintenance
Porting
TIME
COST
TIME
COST
ArrayFire eliminates
hidden costs of software
development
Pain Pleasure
13. Beware of Bad Libraries
Bad libraries are a time sink
Ruin the “library” reputation
17. Scalability
Multi-Device is 1-line of code
array *y = new array[n];
for (int i = 0; i < n; ++i) {
deviceset(i); // change device
array x = randu(5,5); // add work to device’s queue
y[i] = fft(x); // more work in queue
}
// all devices are now computing simultaneously
18. Community
Over 8,000 posts at
http://forums.accelereyes.com
Nightly library update releases
Stable releases a few times a year
v2.0 coming at the end of summer
19. Graphics Functions
#include <arrayfire.h>
using namespace af;
int main() {
// random 3d surface
const int n = 256;
while (1) {
array x = randu(n,n);
// 3d surface plot
surface(x);
}
return 0;
}