(8085,17728,'2015-03-11 01:43:33','2015-03-11 01:43:33','<p>Linear classifiers perform classification based on the linear combinition of the component features. Some examples of Linear Classifiers include: Naive Bayes Classifier, Linear Discriminant Analysis, Logistic Regression and Perceptrons.</p>\r\n<p>ArrayFire\'s easy to use API enables users to write such classifiers from scratch fairly easily. In this post, we show how you can map mathematical equations to ArrayFire code and implement them from scratch.</p>\r\n\r\n<ul>\r\n<li><a href=\"#naive-bayes-classifier\">Naive Bayes Classifier</a><br /></li>\r\n<li><a href=\"#perceptron\">Perceptron</a></li>\r\n</ul>\r\n\r\n<h3 id=\"naive-bayes-classifier\">Naive Bayes Classifier</h3>\r\n<p><a href=\"http://en.wikipedia.org/wiki/Naive_Bayes_classifier\">Naive bayes classifier</a> is a probabilistic classifier that assumes all the features in a feature vector are independent of each other. This assumption simplifies the bayes rule to a simple multiplication of probabilities as show below.</p>\r\n<p>First we start with the simple Baye\'s rule.</p>\r\n<p><br /><span class=\"math\">$$ p(C_k | x) = \\frac{p(C_k)}{p(x)} \\prod\\limits_{i=1}^n p(x_i | C_k) $$</span><br /></p>\r\n<p>Where:</p>\r\n<ul>\r\n<li><br /><span class=\"math\">$$ C_k \\space \\text{is class k} $$</span><br /><br /></li>\r\n<li><br /><span class=\"math\">$$ x \\space \\text{is a feature vector containing the features} \\space \\{ x_0, x_1, x_2, ... x_n \\} $$</span><br /><br /></li>\r\n<li><br /><span class=\"math\">$$ p(C_k | x) \\space \\text {is the posterior probability of class} \\space C_k \\space \\text {given feature vector} \\space x $$</span><br /><br /></li>\r\n<li><br /><span class=\"math\">$$ p(C_k) \\space \\text {is the apriori probability distribution of the class} \\space C_k $$</span><br /><br /></li>\r\n<li><br /><span class=\"math\">$$ p(x | C_k) \\space \\text {is the probability of likelyhood} \\space x \\space belongs to class \\space C_k $$</span><br /></li>\r\n</ul>\r\n<p>Since <code>p(x)</code> is the same for all classes, it can be safely ignored. The classification is then done using the following formula</p>\r\n<p><br /><span class=\"math\">$$\\newcommand{\\argmax}{\\operatornamewithlimits{argmax}}y = argmax_i(p(C_k) \\prod\\limits_{i=1}^n p(x_i | C_k))$$</span><br /></p>\r\n<p>Classification based on Naive Bayes method uses the following phases:</p>\r\n<ul>\r\n<li>Training Phase: The probability ditribution of each feature variable is modeled<br /></li>\r\n<li>Prediction Phase: The probability of a sample belonging to each class is calculated based on the distributions from Phase 1.</li>\r\n</ul>\r\n<p>In our example, we are assuming all the input features fit a normal distribution. This requires us to calculate the mean, <code>mu</code> and the variance <code>Sig2</code> in the training phase.</p>\r\n<p>The necessary ArrayFire code for the training phase can be seen below:</p>\r\n<pre><code>// Iterate through each class\r\nfor (int ii = 0; ii < num_classes; ii++) {\r\n\r\n    // train_feats is of size [num_feats, num_train]\r\n    // train_classes is of size [1, num_train]\r\n\r\n    // Get indices where train_classes matches current class\r\n    array idx = where(train_classes == ii);\r\n\r\n    // Get train_feats from the current class only\r\n    array train_feats_ii = train_feats(span, idx);\r\n\r\n    // Get the distribution parameters\r\n    mu(span, ii)  = mean(train_feats_ii, 1);\r\n    sig2(span,ii)  = var(train_feats_ii, 0, 1);\r\n\r\n    // Calculate priors\r\n    priors[ii] = (float)idx.elements() / (float)num_samples;\r\n}</code></pre>\r\n<p>With the mean and variance of each class known, we can check the probabiltiy of a sample belonging to a particular class using the CDF of the distribution. The class with the highest probability wins.</p>\r\n<p>However when working with a large number of feature variables, multiplication can lead to underflow errors. We can get around this by using <code>log</code> and <code>sum</code> instead of <code>exp</code> and <code>mul</code>.</p>\r\n<p>The prediciton phase can be seen below.</p>\r\n<pre><code>for (int ii = 0; ii < num_classes; ii++) {\r\n\r\n    // test_feats is of size [num_feats, num_test]\r\n    // mu, sig2 are of size  [num_feats, num_classes]\r\n    // mu(span, ii), sig2(span, ii) will get mean and variance of current class\r\n\r\n    // Tile the mean and variance of current class to match test_feats\r\n    array Mu  = tile(mu (span, ii), 1, num_test);\r\n    array Sig2 = tile(sig2(span, ii), 1, num_test) + 0.01; // to avoid dividing by zero\r\n\r\n    array Df = test_feats - Mu;\r\n\r\n    // CDF of normal distribution is as follows\r\n    // array P = exp(-(Df * Df) / 2 * Sig2) / sqrt(2 * af::Pi * Sig2);\r\n    // Multiply the conditional probabilities and the prior of the class\r\n    // probs(span, ii) = priors[ii] * product(P).T();\r\n\r\n    // Calculate log_P instead for numerical stability\r\n    array log_P =  (-(Df * Df) / (2 * Sig2))  - log(sqrt(2 * af::Pi * Sig2));\r\n    // Accumulate the log of conditional probabilities and the prior of the class\r\n    log_probs(span, ii) = log(priors[ii]) + sum(log_P).T();\r\n}\r\n\r\narray val; // ignored\r\narray idx; // Gets the class id\r\n\r\n// Get the class ID with maximum log_probability\r\nmax(val, idx, log_probs, 1);</code></pre>\r\n<h3 id=\"perceptron\">Perceptron</h3>\r\n<p><a href=\"http://en.wikipedia.org/wiki/Perceptron\">Perceptron</a> is one of the first classification algorithms to use supervised learning. The perceptron transforms the weighted input features into the activation in the range <code>[0, 1]</code>.</p>\r\n<figure>\r\n<img src=\"https://docs.google.com/drawings/d/1sAZyAb3Q_YlGbI8ytwjmZg91NLV2_CCH7--yxt5Z7lA/pub?w=480&amp;h=360\">\r\n<figcaption> A visual representation of a perceptron </figcaption>\r\n</figure>\r\n<p>To perform classification on <code>K</code> classes, we use <code>K</code> perceptrons and choose the class with the maximum activation. For the perceptron <code>k</code>, the activation function can be seen below:</p>\r\n<p><br /><span class=\"math\">$$ Y_k = f\\small(W_{k,i} * X_i\\small) $$</span><br /></p>\r\n<p>To get an activation function that is continuous we use sigmoid function show below:</p>\r\n<p><br /><span class=\"math\">$$ sigmoid\\small(Z\\small) = \\frac{1}{1 \\space + \\space \\exp\\small(-Z\\small)} $$</span><br /></p>\r\n\r\n<p>The equivalent ArrayFire code can be seen here:</p>\r\n<pre><code>// Activation function\r\narray sigmoid(const array &Z)\r\n{\r\n    // Transforms Z to a value between [0, 1]\r\n    return 1 / (1 + exp(-Z));\r\n}\r\n\r\n// Predict based on given parameters\r\narray predict(const array &X, const array &Weights)\r\n{\r\n    // Weighted inputs\r\n    array Z = matmul(X, Weights);\r\n    // Transform Weighted inputs to output\r\n    return sigmoid(Z);\r\n}</code></pre>\r\n<p>The weights of the perceptron are trained in an iterative process. The trained weights are then used for prediction on test data. Training a perceptron includes the following steps:</p>\r\n<ol>\r\n<li>Initialize the weights<br /></li>\r\n<li>Predict the output based on training data<br /></li>\r\n<li>Update the weights in proportion to the folloing<br /><br /><span class=\"math\">$$ W_{k,i} = W_{k, i} \\space + \\space \\alpha * \\space \\small(Y_k - T_k\\small)^T \\space * \\space X_i$$</span><br /><br /></li>\r\n<li>if error greater than treshold, go to step 2.</li>\r\n</ol>\r\n<p>The training process of the perceptron can be implemented in ArrayFire using the following code.</p>\r\n<pre><code>    for (int i = 0; i < maxiter; i++) {\r\n\r\n        // Make a prediction based on current weights\r\n        array predicted = predict(input, Weights);\r\n\r\n        // G\r\n        array err = target - predicted;\r\n\r\n        // Get the average error\r\n        float mean_abs_err = mean<float>(abs(err));\r\n        // Stop training if the error is less than specified bounds\r\n        if (mean_abs_err < maxerr) break;\r\n\r\n        // Update the weights based on the input and error\r\n        Weights = Weights + alpha * matmul(transpose(input), err);\r\n    }\r\n</code></pre>\r\n<h3 id=\"results\">Results</h3>\r\n<p>The complete source code for testing and benchmarking these algorithms can be found here:</p>\r\n<ul>\r\n<li><a href=\"https://github.com/arrayfire/arrayfire/blob/devel/examples/machine_learning/naive_bayes.cpp\">Naive Bayes Classifier</a><br /></li>\r\n<li><a href=\"https://github.com/arrayfire/arrayfire/blob/devel/examples/machine_learning/perceptron.cpp\">Peceptron</a></li>\r\n</ul>\r\n<p>We tested these algorithms on a small subset of the MNIST database with 6100 training images, 3900 testing images.</p>\r\n<p>The performance and accuracy results can be seen below:</p>\r\n<table>\r\n<thead>\r\n<tr class=\"header\">\r\n<th align=\"left\">Algorithm</th>\r\n<th align=\"left\">Hardware</th>\r\n<th align=\"left\">Accuracy</th>\r\n<th align=\"left\">Train Time</th>\r\n<th align=\"left\">Predict Time</th>\r\n</tr>\r\n</thead>\r\n<tbody>\r\n<tr class=\"odd\">\r\n<td align=\"left\">Naive Bayes</td>\r\n<td align=\"left\">NVIDIA GTX 680</td>\r\n<td align=\"left\">80.69%</td>\r\n<td align=\"left\">0.003s</td>\r\n<td align=\"left\">0.011s</td>\r\n</tr>\r\n<tr class=\"even\">\r\n<td align=\"left\">Naive Bayes</td>\r\n<td align=\"left\">AMD Radeon 7970</td>\r\n<td align=\"left\">81.19%</td>\r\n<td align=\"left\">0.007s</td>\r\n<td align=\"left\">0.007s</td>\r\n</tr>\r\n<tr class=\"odd\">\r\n<td align=\"left\">Perceptron (1000 iter)</td>\r\n<td align=\"left\">NVIDIA GTX 680</td>\r\n<td align=\"left\">83.64%</td>\r\n<td align=\"left\">2.005s</td>\r\n<td align=\"left\">0.0003s</td>\r\n</tr>\r\n<tr class=\"even\">\r\n<td align=\"left\">Perceptron (1000 iter)</td>\r\n<td align=\"left\">AMD Radeon 7970</td>\r\n<td align=\"left\">85.29%</td>\r\n<td align=\"left\">4.935s</td>\r\n<td align=\"left\">0.0005s</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n<h3 id=\"conclusion\">Conclusion</h3>\r\n<p>We have shown how simple mathematical expressions can easily translate into ArrayFire code. If you are interested in learning more about how ArrayFire can be used to develop Machine Learning applications, follow this blog!</p>\r\n<p>If are going to GTC 2015, you may also be interested in the following tutorials.</p>\r\n<ul>\r\n<li><a href=\"https://registration.gputechconf.com/form/session-listing&amp;doSearch=true&amp;queryInput=S5803\">S5803</a>: Simplified Machine Learning for CUDA<br /></li>\r\n<li><a href=\"https://registration.gputechconf.com/form/session-listing&amp;doSearch=true&amp;queryInput=S5722\">S5722</a>: Deep Belief Networks using ArrayFire</li>\r\n</ul>','Machine Learning with ArrayFire: Linear Classifiers','','inherit','open','open','','8031-revision-v1','','','2015-03-11 01:43:33','2015-03-11 01:43:33','',8031,'http://sandbox.arrayfire.com/8031-revision-v1/',0,'revision','',0),(8097,17728,'2015-03-16 06:19:42','2015-03-16 06:19:42','[content_band inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"10px\" padding_bottom=\"40px\"] [custom_headline type=\"center\" level=\"h2\"]This is the part where you download ArrayFire.[/custom_headline][gap size=\"3%\"]\r\n<p style=\"text-align: center;\">[button  type=\"flat\"  shape=\"rounded\" href=\"https://github.com/arrayfire/arrayfire\" size=\"x-large\" ]Get the source (GitHub repository)[/button]</p>\r\n<hr />\r\n<p style=\"text-align: center;\">[button  type=\"flat\"  shape=\"rounded\" href=\"https://sandbox.arrayfire.com/download-installers\" size=\"x-large\" ]Get the binary installers[/button]</p>\r\n[/content_band]','Download','','inherit','open','open','','5931-revision-v1','','','2015-03-16 06:19:42','2015-03-16 06:19:42','',5931,'http://sandbox.arrayfire.com/5931-revision-v1/',0,'revision','',0),(8098,17728,'2015-03-16 06:20:42','2015-03-16 06:20:42','[content_band inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"10px\" padding_bottom=\"40px\"] [custom_headline type=\"center\" level=\"h2\"]This is the part where you download ArrayFire.[/custom_headline][gap size=\"3%\"]\r\n<p style=\"text-align: center;\">[button  type=\"flat\"  shape=\"rounded\" href=\"https://github.com/arrayfire/arrayfire\" size=\"x-large\" ]Get the source (GitHub repository)[/button]</p>\r\n<p style=\"text-align: center;\">[button  type=\"flat\"  shape=\"rounded\" href=\"https://sandbox.arrayfire.com/download-installers\" size=\"x-large\" ]Get the binary installers[/button]</p>\r\n[/content_band]','Download','','inherit','open','open','','5931-revision-v1','','','2015-03-16 06:20:42','2015-03-16 06:20:42','',5931,'http://sandbox.arrayfire.com/5931-revision-v1/',0,'revision','',0),(8101,7,'2015-03-17 19:07:51','2015-03-17 19:07:51','[content_band inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"10px\" padding_bottom=\"40px\"] [custom_headline type=\"center\" level=\"h2\"]This is the part where you download ArrayFire.[/custom_headline][gap size=\"8%\"]\r\n<p style=\"text-align: center;\">[button  type=\"flat\"  shape=\"rounded\" href=\"https://github.com/arrayfire/arrayfire\" size=\"x-large\" ]Get the source (GitHub repository)[/button]</p>\r\n<p style=\"text-align: center;\">[button  type=\"flat\"  shape=\"rounded\" href=\"https://sandbox.arrayfire.com/download-installers\" size=\"x-large\" ]          Get the binary installers          [/button][gap size=\"8%\"]</p>\r\n[/content_band]','Download','','inherit','open','open','','5931-revision-v1','','','2015-03-17 19:07:51','2015-03-17 19:07:51','',5931,'http://sandbox.arrayfire.com/5931-revision-v1/',0,'revision','',0),(8124,18528,'2015-05-05 16:57:05','2015-05-05 16:57:05','<h3>Introduction</h3>\r\nWith Intel CPUs making up nearly <a href=\"https://www.cpubenchmark.net/market_share.html\">80% of the CPU market</a> and <a href=\"http://jonpeddie.com/press-releases/details/gpu-market-upintel-and-nvidia-graphics-winners-in-q4-amd-down/\">66% of computers using integrated graphics</a> one can easily argue that integrated graphics devices represent one of the greatest markets for GPU-accelerated computing. Here at ArrayFire, we have long recognized the potential of these devices and offer built-in support for Intel CPUs, GPUs, and AMD APUs in the OpenCL backend of our <a href=\"http://www.arrayfire.com\">ArrayFire</a> GPU computing library. Yet one common theme for debate in the office has been how the hardware performs on different operating systems with different drivers across hardware revisions.\r\n\r\nTo answer these questions (and, perhaps, to win some intra-office geek cred) I decided to write a series of blog posts about Intel\'s GPU OpenCL performance. In this first installment I will compare the performance of OpenCL on a 3rd generation Intel processor on Linux and Windows.\r\n<h3>Monte Carlo Pi estimation</h3>\r\nTo evaluate the performance of Intel\'s hardware I took a textbook problem of computing Pi using a Monte Carlo method. This is a classic example of a memory bound application where the time to read/write data from/to memory dominates most of the computation time. Thus, throwing N-more compute cores at the problem may not always achieve a linear acceleration unless careful attention to memory access patterns and cache usage is performed.\r\n\r\nThe Monte Carlo process for computing pi is fairly simple, consisting of three primary steps:\r\n<ol>\r\n	<li>Generate a series of random (x,y) pairs from within the <a href=\"http://en.wikipedia.org/wiki/Unit_square\">unit square</a></li>\r\n	<li>Determine which of these samples reside within the <a href=\"http://en.wikipedia.org/wiki/Unit_circle\">unit circle</a></li>\r\n	<li>Compute the ratio of the samples that reside within the square to those which reside within the circle and then multiply by four (to account for this being only one quadrant of a circle).</li>\r\n</ol>\r\nThere is a great visualization of this process and a demonstration of how the <a href=\"http://commons.wikimedia.org/wiki/File:Pi_30K.gif\">number of samples impacts the Pi estimate on wikipedia</a>.\r\n\r\nIf you were to implement this in C/C++, your code might look like this:\r\n<pre class=\"lang:default decode:true\" title=\"Sample CPU code for Monte Carlo Pi estimation\">...\r\n\r\nint count = 0;\r\nfloat x, y;\r\nvector&lt;float&gt; randomNums(2*samples);\r\n\r\n// init random numbers within the unit square.\r\n// Pack as (x,y) pairs\r\nfor(int i = 0; i &lt; 2*samples; i++)	{\r\n	randomNums[i] = float(rand()) / RAND_MAX;\r\n}\r\n\r\n// count how many samples reside in the circle\r\nfor(int i = 0; i &lt; samples; i++)\r\n{\r\n	x = randomNums[2*i];\r\n	y = randomNums[2*i + 1];\r\n\r\n	if(x*x + y*y &lt; 1.0)\r\n		count++;\r\n}\r\n\r\n// calculate the estimate and print the result\r\nfloat pi_estimate = 4 * float(count) / samples;\r\n\r\n...</pre>\r\n<h3>Benchmark methods</h3>\r\nWe implemented four different versions of the Pi problem with small changes in the implementation which test various aspects of the hardware and software. These five implementations are:\r\n<ol>\r\n	<li>Single core CPU - A direct implementation of the code listing above</li>\r\n	<li>A naive port of the CPU code to the GPU with no optimizations. Region testing is performed on the GPU and the result is summed on the CPU</li>\r\n	<li>An effort to reduce the workload of the CPU by partially summing the region testing results on the GPU</li>\r\n	<li>A classic GPU optimization using coalesced memory load/stores</li>\r\n	<li>And a final integrated-device specific optimization that uses <a href=\"http://sandbox.arrayfire.com/zero-copy-on-integrated-gpus/\">zero-copy memory buffers</a></li>\r\n</ol>\r\nFor these tests we used a few-year old ASUS N56V laptop we had in the office which features an Intel i7-3610QM CPU with a HD Graphics 4000 GT2 GPU. This particular GPU has 16 execution units which can host up to 128 concurrent threads. We installed Window 7 (Intel OpenCL GPU driver 10.18.10.395; Intel OpenCL CPU drivers 5.1.0.25) and Ubuntu 14.10 (GPU driver Beignet 1.1 from git acfc2a2 and CPU driver \"Build 92\"). In future blog posts we will cover 4th and 5th generation hardware (including Iris pro).\r\n<h3>Results and discussion</h3>\r\nOn Linux a single core CPU took <span data-sheets-value=\"[null,3,null,31583]\" data-sheets-userformat=\"[null,null,513,[null,0],null,null,null,null,null,null,null,null,0]\">31.583 ms to execute on a sample size of 20 million sample points. Interestingly, the same code on Windows too over 66 ms to execute on the same sample size (in release mode, with /02 and high power settings selected). This curious result isn\'t particularly important as the OpenCL performance on the CPU does not appear to be degraded between operating systems.</span>\r\n\r\nBelow we plot the speed up of our OpenCL kernels relative to the performance of the Linux single core CPU result above for both the i7-3610QM CPU and HD Graphics 4000 GPU.\r\n\r\n<iframe width=\"694\" height=\"371\" seamless=\"\" frameborder=\"0\" scrolling=\"no\" src=\"https://docs.google.com/spreadsheets/d/1vMeMPs4d78wsbURINCKmAFDFBwIFzpAl438Q-geoeNs/pubchart?oid=2103791532&amp;format=interactive\"></iframe>\r\n\r\nWe see that the naive port of the CPU code directly to OpenCL is slower than the pure CPU implementation by a factor of four. This result is not terribly surprising once you consider the poorly conceived implementation encounters a full O(N) cost for data transfer and summing region test result for the 20 million sample points.\r\n\r\nThe OCL reduction kernel offloads some of the CPU\'s work by partially summing the region detection results on the GPU. This tweak increased the performance of the kernel between 4x (for the OpenCL on the GPU) to 10x (for OpenCL on the CPU). Curiously, the CPU kernels on Ubuntu and Windows perform very well, achieving speed-ups of about 3x the CPU. This is still below the theoretical 4x speed improvement one would expect on this quad-core CPU namely due to thread management and poor memory access patterns.\r\n\r\nLastly we will discuss the coalesced memory and zero copy kernels. The optimization here involves changing the memory access pattern from using strieded memory access:\r\n<pre class=\"lang:default decode:true\" title=\"Sample CPU code for Monte Carlo Pi estimation\">x = randomNums[2*i];\r\ny = randomNums[2*i + 1];</pre>\r\nto using OpenCL\'s float2 data type to access sequential elements, thus improving utilization of the memory bus. This technique improved throughput by 2.2x on Ubuntu and 3.25x on Windows. This makes the GPU about twice as fast as our initial CPU implementation. We see little to no acceleration in using zero copy buffers for this problem because the problem size for the final CPU sum is quite small (on the order of 1000 elements).\r\n<h3>Conclusion and a preview of the next post</h3>\r\nFor the Monte Carlo Pi problem, it appears Ubuntu and Beignet achieve slightly better performance than the current Windows Intel HD Graphics OpenCL drivers; however, given the limited number of trials performed (and lack of statistical error bars) we may conservatively state that the two OpenCL implementations perform similarly on the same hardware.\r\n\r\nWe found that using OpenCL on the GPU achieves better acceleration than OpenCL on the CPU in general. In one of our kernels, OpenCL on the i7-3610QM CPU was slightly faster than on the GPU, but this is probably due to automatic vectorization in the CPU OpenCL backend for this particular kernel.\r\n\r\nIn our next post we will compare the performance of OpenCL on 3rd, 4th, and 5th generation Intel processors using both memory and compute-bound kernels.','Intel OpenCL performance: 3rd generation hardware','','publish','open','open','','intel-opencl-performance-3rd-generation-hardware','','','2015-05-05 16:57:05','2015-05-05 16:57:05','',0,'http://sandbox.arrayfire.com/?p=8124',0,'post','',1),(8125,18528,'2015-04-09 16:02:35','2015-04-09 16:02:35','One of the most powerful aspects of parallel program on integrated GPUs is taking advantage of shared memory and caches. The best example of this is sharing common data between the CPU and GPU via. zero-copy buffers. This technique permits your program to avoid the O(N) cost of copying data to/from the GPU. This feature is particularly useful for applications that deal with real-time data streams, like video processing.\r\n\r\n<!--more-->\r\n\r\nCreating zero copy buffers is not that difficult, but there is one caveat when it comes to using the buffers. First, lets consider how to make zero-copy buffers:\r\n<h4 id=\"method-1-let-opencl-allocate-memory-and-use-map-unmap-buffers\">Method 1: OpenCL allocation of zero-copy buffers</h4>\r\nThe first method of allocating zero-copy buffers is quite simple: let OpenCL do it for you. To create a buffer in this fashion simply specify the <code>CL_MEM_ALLOC_HOST_PTR</code> argument to the <code>cl::Buffer</code> constructor (or<code>clCreateBuffer</code> if you are using the C API):\r\n<pre><code class=\"lang-c++\">// Instruct OpenCL to allocate host memory\r\n::size_t size = N * sizeof(float)\r\nBuffer d_results(context, CL_MEM_ALLOC_HOST_PTR, size);\r\n\r\n... launch kernels, etc\r\n</code></pre>\r\n<h4 id=\"method-2-allocate-aligned-memory-and-use-map-unmap-buffers\">Method 2: Programmer-allocated aligned memory</h4>\r\nIn situations where you are streaming data or doing DMA between devices, it may be necessary to use aligned memory. In this situation, Intel OpenCL devices require that data be allocated with 4k alignment and be a multiple of 64 bytes (a cache line). At present AMD APUs follow this same alignment convention. Aligned allocation requires calls to OS-specific functions, after the memory is allocated, you can use create a buffer using CL_MEM_USE_HOST_PTR function:\r\n<pre><code class=\"lang-c++\">::size_t size = N * sizeof(float); // size must be a multiple of 64\r\n::size_t alignment = 4096;\r\n// Allocate aligned memory on the host. The particular function is OS-dependent.\r\n//  memalign(size_t alignment, size_t size) on Linux, release memory with free(...)\r\n//  _aligned_malloc(size_t size, size_t alignment) on Windows, release with _aligned_free(...)\r\n//  posix_memalign(void ** ptr, size_t alignment, size_t size) on OSX, release with free(...)\r\nfloat * h_results = (float*) memalign(alignment, size);\r\n\r\n// Create an OpenCL buffer using the host pointer\r\nBuffer d_results = cl::Buffer(context, CL_MEM_USE_HOST_PTR, size, t_results);\r\n</code></pre>\r\n<h4 id=\"accessing-memory\">Accessing zero-copy memory buffers</h4>\r\nAfter your buffers are created, how do we access the data contained in them? Given method 2, one might think your code could directly access the elements of \"h_results\", but this probably won\'t work. Perhaps the most misunderstood aspect of zero-copy buffers in OpenCL relates to the state of the buffer after being used in a kernel invocation. It is often thought that the memory in the buffers will be updated immediately after the kernel completes; however, the OpenCL specification <strong>does not guarantee this behavior</strong>. Instead, it is up to the programmer to ensure that the buffer is correctly updated prior to accessing the data. To do so, simply use the OpenCL map/unmap buffer commands:\r\n<pre><code class=\"lang-c++\">// Get exclusive access to the buffer\r\nfloat * temp = (float*) queue.enqueueMapBuffer(d_results, CL_TRUE, CL_MAP_READ, 0, size);\r\n\r\n... use the mapped buffer\r\n\r\n// release the buffer back to OpenCL’s control\r\nqueue.enqueueUnmapMemObject(d_results, temp);</code></pre>\r\nNote that you must unmap the buffer after use to inform OpenCL that it has been given control over the memory location.\r\n<h4 id=\"further-reading\">Further reading</h4>\r\n<a href=\"https://software.intel.com/en-us/articles/getting-the-most-from-opencl-12-how-to-increase-performance-by-minimizing-buffer-copies-on-intel-processor-graphics\">Getting the Most from OpenCL™ 1.2: How to Increase Performance by Minimizing Buffer Copies on Intel® Processor Graphics</a>\r\n\r\n<a href=\"http://developer.amd.com/tools-and-sdks/opencl-zone/amd-accelerated-parallel-processing-app-sdk/opencl-optimization-guide/#50401315_pgfId-503784\">AMD OpenCL Optimization Guide: Mapping and zero-copy buffers</a>\r\n\r\n&nbsp;','Using zero-copy buffers on integrated GPUs','','publish','open','open','','zero-copy-on-integrated-gpus','','\nhttp://developer.amd.com/tools-and-sdks/opencl-zone/amd-accelerated-parallel-processing-app-sdk/opencl-optimization-guide/#50401315_pgfId-503784','2015-04-09 16:06:03','2015-04-09 16:06:03','',0,'http://sandbox.arrayfire.com/?p=8125',0,'post','',1),(8126,18528,'2015-04-07 19:42:45','2015-04-07 19:42:45','One of the most powerful aspects of parallel programming on integrated GPUs is that you may avoid the O(N) copy operation associated with moving data from host to device memory. This feature can be particularly useful for applications that deal with real-time data streams, like video processing.\r\n<h2 id=\"method-1-let-opencl-allocate-memory-and-use-map-unmap-buffers\">Method 1: Let OpenCL allocate memory and use map/unmap buffers</h2>\r\nThe first method of allocating zero-copy buffers is quite simple: let OpenCL do it for you. To create a buffer in this fashion simply specify the<code>CL_MEM_ALLOC_HOST_PTR</code> argument to the <code>cl::Buffer</code> constructor (or<code>clCreateBuffer</code> if you are using the C API):\r\n<pre><code class=\"lang-c++\">// Instruct OpenCL to allocate host memory\r\n::size_t size = N * sizeof(float)\r\nBuffer d_results(context, CL_MEM_ALLOC_HOST_PTR, size);\r\n\r\n<span class=\"hljs-keyword\">...</span> launch kernels, etc\r\n</code></pre>\r\n<h2 id=\"method-2-allocate-aligned-memory-and-use-map-unmap-buffers\">Method 2: Allocate aligned memory and use map/unmap buffers</h2>\r\nIn situations where you are streaming data or doing DMA between devices, it may be necessary to use aligned memory. In this situation, Intel OpenCL devices require that data be allocated with 4k alignment and be a multiple of 64 bytes (a cache line) as follows:\r\n<pre><code class=\"lang-c++\">::size_t size = N * sizeof(float); // size must be a multiple of <span class=\"hljs-number\">64</span>\r\n::size_t alignment = <span class=\"hljs-number\">4096</span>;\r\n// Allocate aligned memory on the host. The particular <span class=\"hljs-keyword\">function</span> is OS-dependent.\r\n//  memalign(size_t alignment, size_t size) on Linux, release memory with free(<span class=\"hljs-keyword\">...</span>)\r\n//  _aligned_malloc(size_t size, size_t alignment) on Windows, release with _aligned_free(<span class=\"hljs-keyword\">...</span>)\r\n//  posix_memalign(void ** ptr, size_t alignment, size_t size) on OSX, release with free(<span class=\"hljs-keyword\">...</span>)\r\nfloat * h_results = (float*) memalign(alignment, size);\r\n\r\n// Create an OpenCL buffer using the host pointer\r\nBuffer d_results = cl::Buffer(context, CL_MEM_USE_HOST_PTR, size, t_results);\r\n</code></pre>\r\n<h2 id=\"accessing-memory\">Accessing memory</h2>\r\nPerhaps the most misunderstood aspect of zero-copy buffers in OpenCL relates to the state of the buffer after being used in a kernel invocation. It is often thought that the memory in the buffers will be updated immediately after the kernel completes; however, the OpenCL specification does not guarantee this behavior. To ensure that a zero-copy buffer is properly updated prior to use, a developer must map (and unmap!) a buffer prior to use in host code. This is actually a quite simple process:\r\n<pre><code class=\"lang-c++\">// Get exclusive access to the buffer\r\nfloat * temp = (float*) queue.enqueueMapBuffer(d_results, CL_TRUE, CL_MAP_READ, <span class=\"hljs-number\">0</span>, size);\r\n\r\n<span class=\"hljs-keyword\">...</span> use the mapped buffer\r\n\r\n// release the buffer back to OpenCL’s control\r\nqueue.enqueueUnmapMemObject(d_results, temp);\r\n</code></pre>\r\n<h2 id=\"further-reading\">Further reading</h2>\r\n<a href=\"https://software.intel.com/en-us/articles/getting-the-most-from-opencl-12-how-to-increase-performance-by-minimizing-buffer-copies-on-intel-processor-graphics\">Getting the Most from OpenCL™ 1.2: How to Increase Performance by Minimizing Buffer Copies on Intel® Processor Graphics</a>','Improving OpenCL performance using zero-copy buffers on Intel GPUs','','inherit','open','open','','8125-revision-v1','','','2015-04-07 19:42:45','2015-04-07 19:42:45','',8125,'http://sandbox.arrayfire.com/8125-revision-v1/',0,'revision','',0),(8128,18528,'2015-04-07 19:51:25','2015-04-07 19:51:25','One of the most powerful aspects of parallel programming on integrated GPUs is that you may avoid the O(N) copy operation associated with moving data from host to device memory. This feature can be particularly useful for applications that deal with real-time data streams, like video processing.\r\n<h2 id=\"method-1-let-opencl-allocate-memory-and-use-map-unmap-buffers\">Method 1: Let OpenCL allocate memory and use map/unmap buffers</h2>\r\nThe first method of allocating zero-copy buffers is quite simple: let OpenCL do it for you. To create a buffer in this fashion simply specify the<code>CL_MEM_ALLOC_HOST_PTR</code> argument to the <code>cl::Buffer</code> constructor (or<code>clCreateBuffer</code> if you are using the C API):\r\n<pre><code class=\"lang-c++\">// Instruct OpenCL to allocate host memory\r\n::size_t size = N * sizeof(float)\r\nBuffer d_results(context, CL_MEM_ALLOC_HOST_PTR, size);\r\n\r\n... launch kernels, etc\r\n</code></pre>\r\n<h2 id=\"method-2-allocate-aligned-memory-and-use-map-unmap-buffers\">Method 2: Allocate aligned memory and use map/unmap buffers</h2>\r\nIn situations where you are streaming data or doing DMA between devices, it may be necessary to use aligned memory. In this situation, Intel OpenCL devices require that data be allocated with 4k alignment and be a multiple of 64 bytes (a cache line) as follows:\r\n<pre><code class=\"lang-c++\">::size_t size = N * sizeof(float); // size must be a multiple of <span class=\"hljs-number\">64</span>\r\n::size_t alignment = <span class=\"hljs-number\">4096</span>;\r\n// Allocate aligned memory on the host. The particular <span class=\"hljs-keyword\">function</span> is OS-dependent.\r\n//  memalign(size_t alignment, size_t size) on Linux, release memory with free(...)\r\n//  _aligned_malloc(size_t size, size_t alignment) on Windows, release with _aligned_free(...)\r\n//  posix_memalign(void ** ptr, size_t alignment, size_t size) on OSX, release with free(...)\r\nfloat * h_results = (float*) memalign(alignment, size);\r\n\r\n// Create an OpenCL buffer using the host pointer\r\nBuffer d_results = cl::Buffer(context, CL_MEM_USE_HOST_PTR, size, t_results);\r\n</code></pre>\r\n<h2 id=\"accessing-memory\">Accessing memory</h2>\r\nPerhaps the most misunderstood aspect of zero-copy buffers in OpenCL relates to the state of the buffer after being used in a kernel invocation. It is often thought that the memory in the buffers will be updated immediately after the kernel completes; however, the OpenCL specification does not guarantee this behavior. To ensure that a zero-copy buffer is properly updated prior to use, a developer must map (and unmap!) a buffer prior to use in host code. This is actually a quite simple process:\r\n<pre><code class=\"lang-c++\">// Get exclusive access to the buffer\r\nfloat * temp = (float*) queue.enqueueMapBuffer(d_results, CL_TRUE, CL_MAP_READ, <span class=\"hljs-number\">0</span>, size);\r\n\r\n... use the mapped buffer\r\n\r\n// release the buffer back to OpenCL’s control\r\nqueue.enqueueUnmapMemObject(d_results, temp);\r\n</code></pre>\r\n<h2 id=\"further-reading\">Further reading</h2>\r\n<a href=\"https://software.intel.com/en-us/articles/getting-the-most-from-opencl-12-how-to-increase-performance-by-minimizing-buffer-copies-on-intel-processor-graphics\">Getting the Most from OpenCL™ 1.2: How to Increase Performance by Minimizing Buffer Copies on Intel® Processor Graphics</a>','Improving OpenCL performance using zero-copy buffers on Intel GPUs','','inherit','open','open','','8125-revision-v1','','','2015-04-07 19:51:25','2015-04-07 19:51:25','',8125,'http://sandbox.arrayfire.com/8125-revision-v1/',0,'revision','',0),(8129,18528,'2015-04-07 19:52:23','2015-04-07 19:52:23','One of the most powerful aspects of parallel programming on integrated GPUs is that you may avoid the O(N) copy operation associated with moving data from host to device memory. This feature can be particularly useful for applications that deal with real-time data streams, like video processing.\r\n<h2 id=\"method-1-let-opencl-allocate-memory-and-use-map-unmap-buffers\">Method 1: Let OpenCL allocate memory and use map/unmap buffers</h2>\r\nThe first method of allocating zero-copy buffers is quite simple: let OpenCL do it for you. To create a buffer in this fashion simply specify the<code>CL_MEM_ALLOC_HOST_PTR</code> argument to the <code>cl::Buffer</code> constructor (or<code>clCreateBuffer</code> if you are using the C API):\r\n<pre><code class=\"lang-c++\">// Instruct OpenCL to allocate host memory\r\n::size_t size = N * sizeof(float)\r\nBuffer d_results(context, CL_MEM_ALLOC_HOST_PTR, size);\r\n\r\n... launch kernels, etc\r\n</code></pre>\r\n<h2 id=\"method-2-allocate-aligned-memory-and-use-map-unmap-buffers\">Method 2: Allocate aligned memory and use map/unmap buffers</h2>\r\nIn situations where you are streaming data or doing DMA between devices, it may be necessary to use aligned memory. In this situation, Intel OpenCL devices require that data be allocated with 4k alignment and be a multiple of 64 bytes (a cache line) as follows:\r\n<pre><code class=\"lang-c++\">::size_t size = N * sizeof(float); // size must be a multiple of 64\r\n::size_t alignment = 4096;\r\n// Allocate aligned memory on the host. The particular <span class=\"hljs-keyword\">function is OS-dependent.\r\n//  memalign(size_t alignment, size_t size) on Linux, release memory with free(...)\r\n//  _aligned_malloc(size_t size, size_t alignment) on Windows, release with _aligned_free(...)\r\n//  posix_memalign(void ** ptr, size_t alignment, size_t size) on OSX, release with free(...)\r\nfloat * h_results = (float*) memalign(alignment, size);\r\n\r\n// Create an OpenCL buffer using the host pointer\r\nBuffer d_results = cl::Buffer(context, CL_MEM_USE_HOST_PTR, size, t_results);\r\n</code></pre>\r\n<h2 id=\"accessing-memory\">Accessing memory</h2>\r\nPerhaps the most misunderstood aspect of zero-copy buffers in OpenCL relates to the state of the buffer after being used in a kernel invocation. It is often thought that the memory in the buffers will be updated immediately after the kernel completes; however, the OpenCL specification does not guarantee this behavior. To ensure that a zero-copy buffer is properly updated prior to use, a developer must map (and unmap!) a buffer prior to use in host code. This is actually a quite simple process:\r\n<pre><code class=\"lang-c++\">// Get exclusive access to the buffer\r\nfloat * temp = (float*) queue.enqueueMapBuffer(d_results, CL_TRUE, CL_MAP_READ, 0, size);\r\n\r\n... use the mapped buffer\r\n\r\n// release the buffer back to OpenCL’s control\r\nqueue.enqueueUnmapMemObject(d_results, temp);\r\n</code></pre>\r\n<h2 id=\"further-reading\">Further reading</h2>\r\n<a href=\"https://software.intel.com/en-us/articles/getting-the-most-from-opencl-12-how-to-increase-performance-by-minimizing-buffer-copies-on-intel-processor-graphics\">Getting the Most from OpenCL™ 1.2: How to Increase Performance by Minimizing Buffer Copies on Intel® Processor Graphics</a>','Improving OpenCL performance using zero-copy buffers on Intel GPUs','','inherit','open','open','','8125-revision-v1','','','2015-04-07 19:52:23','2015-04-07 19:52:23','',8125,'http://sandbox.arrayfire.com/8125-revision-v1/',0,'revision','',0),(8131,7,'2015-04-08 19:02:52','2015-04-08 19:02:52','[content_band inner_container=\"true\" no_margin=\"true\" border=\"top\" padding_top=\"40px\" padding_bottom=\"40px\"][column type=\"one-fifth\"].[/column][column type=\"three-fifths\"][custom_headline type=\"left\" level=\"h3\"]Reveal Imaging, an SAIC Company[/custom_headline][/column][column type=\"one-fifth\" last=\"true\"].[/column][gap size=\"3%\"]\r\n\r\n[column type=\"one-fifth\"].[/column][column type=\"three-fifths\"]<img class=\"alignright size-full wp-image-6896\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/10/reveal-logo-promo-01.png\" alt=\"reveal logo, promo-01\" width=\"360\" height=\"120\" />Iterative reconstruction from projections is typically a function reserved for the medical industry. This approach allows medical professionals to reconstruct computed tomography (CT) images from acquired data; the reconstructed images display virtual “slices” of a scanned object, such as a heart or brain.\r\n\r\nIn reconstructing an image from the data, algorithms are used to approximate the solution. The closer the solution, the better the reconstruction. Multiple iterations produce more accurate solutions, and, thus, higher quality images. This technique, however, consumes computation time; speeding the process through the GPU is one solution to this problem.\r\n<h4>Mission</h4>\r\nReveal Imaging, an SAIC company, uses this CT technology in developing threat-detection products for transportation systems—such as cargo and baggage screening in airports—and in securing facilities and public events. Speed is critical in their technology, and they approached us seeking acceleration.\r\n\r\nReveal Imaging was running its cone-beam reconstructor via CUDA code previously implemented by a different contractor, but the performance was sub-par. They tasked ArrayFire with improving that performance on their GTX690s.\r\n<h4>Action</h4>\r\nOur engineers approached this by following standard CUDA practices. The project consisted mostly of cleaning up the existing code to allow it to run faster.\r\n\r\nFirst we removed the dependence of the permitted slice thickness on the number of GPU cards in the system. Then we allowed for one of the GPUs in the system to be excluded from those used by the reconstruction code and dedicated to driving a display. Next, we assured that the code met specifications with the latest CUDA compilers through version 5.0. Finally, we implemented performance enhancements, bottleneck reductions, and bug fixes previously identified.\r\n<h4>Results</h4>\r\nThe conclusion of the project was followed by a three week testing period, during which time Reveal Imaging determined reliability and overall satisfaction of the code’s performance. The code’s original speed was measured at around 200 slices per second—through our optimization efforts we were able to increase that number to 320 slices per second. Upon completion of the testing period Reveal Imaging was very pleased with the results and end performance of their code.\r\n<blockquote>The changes that you made sped up the system more than expected! How often does anybody get to say that things work better than expected?  —Reveal Imaging</blockquote>\r\nIn the end, Reveal Imaging was able to focus on other development aspects of their project while we focused on what we do best—working relentlessly to achieve the best possible results in parallel computing.\r\n<h6>About SAIC</h6>\r\nScience Applications International Corporation (SAIC) is a leading technology integrator that provides full lifecycle services and solutions in the technical, engineering, and enterprise IT markets. SAIC has approximately 13,000 employees worldwide.[/column][column type=\"one-fifth\" last=\"true\"].[/column][/content_band]','Case Study: Reveal Imaging','','inherit','open','open','','6923-revision-v1','','','2015-04-08 19:02:52','2015-04-08 19:02:52','',6923,'http://sandbox.arrayfire.com/6923-revision-v1/',0,'revision','',0),(8133,7,'2015-04-08 20:22:02','2015-04-08 20:22:02','[content_band inner_container=\"true\" no_margin=\"true\" border=\"top\" padding_top=\"40px\" padding_bottom=\"40px\"][column type=\"one-fifth\"].[/column][column type=\"three-fifths\"][custom_headline type=\"left\" level=\"h3\"]Lincoln Financial Group[/custom_headline][/column][column type=\"one-fifth\" last=\"true\"].[/column][gap size=\"3%\"]\r\n\r\n[column type=\"one-fifth\"].[/column][column type=\"three-fifths\"]<img class=\"alignright size-full wp-image-6895\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/10/lincoln-logo-promo-01.png\" alt=\"lincoln logo, promo-01\" width=\"360\" height=\"120\" /><span class=\"il\">Lincoln</span> Financial Group had ported their CPU code (C/C++) to CUDA and this enabled them to speed up the necessary financial calculations. Their primary objective was to reduce the time taken to run this code. Before porting to CUDA, they required ten to twelve hours to run the entire code. After porting to CUDA, they were able to do the same work in about 30 minutes.\r\n\r\nLincoln Financial Group has several C/C++ programmers in their team and they trained many of them to use CUDA. Their code used CUDA to speed up a calculation using Monte Carlo methods to analyze various scenarios in their hedge-fund projection system (HPS). The major portion of their calculations were carried out on independent policies and thus the entire process was ideal for parallel programming (no communication bottlenecks).\r\n<h4>Mission</h4>\r\nThe CPU code was slow and this was holding them back. Because the code took the entire night to run, they were not able to run several different scenarios and take corrective action based on the results of the code. The primary reason to move to GPUs was to speed up the calculations.\r\n\r\nLincoln Financial Group invested heavily into building CPU+GPU clusters relying on AMAX. They had the code running on four compute nodes, with four GPUs on each node. Each GPU was a NVIDIA K20X. The code ran on 16 GPUs. They were in the process of installing an even bigger system, with 64 total GPUs.\r\n<h4>Action</h4>\r\nOur initial plan was adjusted as the project progressed, and we identified key areas that needed improvement. The first couple of weeks were somewhat tricky because we were not able to get a working version of the codebase that was representative of the code they were actually running. This was because the code was in a very active state of development and integration on their side.\r\n\r\nWe made several suggestions to improve the efficiency of the codebase, but most of these were minor improvements. There were two levels of parallelism in the code—at the kernel level (GPU CUDA code) and the cluster level (MPI). One of the really useful suggestions we made was relevant at the MPI level, where we suggested they organize their policies in a random manner to distribute the computing load in a more uniform manner. This led to a major efficiency increase. This suggestion was immediately implemented by their engineers. Another useful contribution we made was to stress-test their code to get an estimate of how many more policies they could handle. This was really simple to do, but was a big hit within the company.\r\n\r\nThe most frustrating part was that at the very beginning of the assignment we were simply unable to get a working version of their code. Additionally, we were not able to access their machines from our laptops. Both problems were solved in the following week. No significant adjustments to the original plan were required.\r\n<h4>Results</h4>\r\nThe final deliverable was a series of slide decks and detailed technical reports that summarized our findings and analyses about the performance of their codebase. Also required was an executive summary of our findings suitable for higher management.\r\n\r\nThey had already developed the code base using GPUs and their main interest in giving us this project was to get an external assessment of their work and get a \"stamp of approval\" that the code will work as intended and is of sufficiently good quality. In this sense, we were able to provide them with what they wanted.\r\n\r\nIn general, Lincoln Financial Group was extremely satisfied with our input and suggestions. We met their expectations in all areas and exceeded their expectations in a select few.\r\n\r\nWe documented all our findings in the form of detailed technical reports and slide decks. These contain a wealth of significant benchmarks and visuals related to the code base and our experiments with it.\r\n<h6>About Lincoln Financial Group</h6>\r\nHeadquartered in the Philadelphia region, Lincoln Financial Group is a Fortune 500 company offering a diverse range of financial services and solutions. With a strong focus on four core business areas — life insurance, annuities, retirement plan services, and group protection — our business is built around supporting, preserving, and enhancing our customer\'s lifestyles and providing better retirement outcomes. Led by over 9,000 employees, Lincoln Financial provides the tools and advice to help individuals take charge of their futures.[/column][column type=\"one-fifth\" last=\"true\"].[/column][/content_band]','Case Study: Lincoln Financial Group','','inherit','open','open','','6928-revision-v1','','','2015-04-08 20:22:02','2015-04-08 20:22:02','',6928,'http://sandbox.arrayfire.com/6928-revision-v1/',0,'revision','',0),(8135,6,'2015-04-08 20:28:30','2015-04-08 20:28:30','[content_band inner_container=\"true\" no_margin=\"true\" border=\"top\" padding_top=\"40px\" padding_bottom=\"40px\"][column type=\"one-fifth\"].[/column][column type=\"three-fifths\"][custom_headline type=\"left\" level=\"h3\"]Reveal Imaging, an SAIC Company[/custom_headline][/column][column type=\"one-fifth\" last=\"true\"].[/column][gap size=\"3%\"]\r\n\r\n[column type=\"one-fifth\"].[/column][column type=\"three-fifths\"]<img class=\"alignright size-full wp-image-6896\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/10/reveal-logo-promo-01.png\" alt=\"reveal logo, promo-01\" width=\"360\" height=\"120\" />Iterative reconstruction from projections is typically a function reserved for the medical industry. This approach allows medical professionals to reconstruct computed tomography (CT) images from acquired data; the reconstructed images display virtual “slices” of a scanned object, such as a heart or brain.\r\n\r\nIn reconstructing an image from the data, algorithms are used to approximate the solution. The closer the solution, the better the reconstruction. Multiple iterations produce more accurate solutions, and, thus, higher quality images. This technique, however, consumes computation time; speeding the process through the GPU is one solution to this problem.\r\n<h4>Mission</h4>\r\nReveal Imaging, an SAIC company, uses this CT technology in developing threat-detection products for transportation systems—such as cargo and baggage screening in airports—and in securing facilities and public events. Speed is critical in their technology, and they approached us seeking acceleration.\r\n\r\nReveal Imaging was running its cone-beam reconstructor via CUDA code previously implemented by a different contractor, but the performance was sub-par. They tasked ArrayFire with improving that performance on their GTX690s.\r\n<h4>Action</h4>\r\nOur engineers approached this by following standard CUDA practices. The project consisted mostly of cleaning up the existing code to allow it to run faster.\r\n\r\nFirst we removed the dependence of the permitted slice thickness on the number of GPU cards in the system. Then we allowed for one of the GPUs in the system to be excluded from those used by the reconstruction code and dedicated to driving a display. Next, we assured that the code met specifications with the latest CUDA compilers. Finally, we implemented performance enhancements, bottleneck reductions, and bug fixes previously identified.\r\n<h4>Results</h4>\r\nThe conclusion of the project was followed by a three week testing period, during which time Reveal Imaging determined reliability and overall satisfaction of the code’s performance. The code’s original speed was measured at around 200 slices per second—through our optimization efforts we were able to increase that number to 320 slices per second. Upon completion of the testing period, Reveal Imaging was very pleased with the results and end performance of their code.\r\n<blockquote>The changes that you made sped up the system more than expected! How often does anybody get to say that things work better than expected?  —Reveal Imaging</blockquote>\r\nIn the end, Reveal Imaging was able to focus on other development aspects of their project while we focused on what we do best—working relentlessly to achieve the best possible results in parallel computing.\r\n<h6>About SAIC</h6>\r\nScience Applications International Corporation (SAIC) is a leading technology integrator that provides full lifecycle services and solutions in the technical, engineering, and enterprise IT markets. SAIC has approximately 13,000 employees worldwide.[/column][column type=\"one-fifth\" last=\"true\"].[/column][/content_band]','Case Study: Reveal Imaging','','inherit','open','open','','6923-revision-v1','','','2015-04-08 20:28:30','2015-04-08 20:28:30','',6923,'http://sandbox.arrayfire.com/6923-revision-v1/',0,'revision','',0),(8136,6,'2015-04-08 21:03:06','2015-04-08 21:03:06','[content_band inner_container=\"true\" no_margin=\"true\" border=\"top\" padding_top=\"40px\" padding_bottom=\"40px\"][column type=\"one-fifth\"].[/column][column type=\"three-fifths\"][custom_headline type=\"left\" level=\"h3\"]Lincoln Financial Group[/custom_headline][/column][column type=\"one-fifth\" last=\"true\"].[/column][gap size=\"3%\"]\n\n[column type=\"one-fifth\"].[/column][column type=\"three-fifths\"]<img class=\"alignright size-full wp-image-6895\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/10/lincoln-logo-promo-01.png\" alt=\"lincoln logo, promo-01\" width=\"360\" height=\"120\" /><span class=\"il\">Lincoln</span> Financial Group had ported their CPU code (C/C++) to CUDA and this enabled them to speed up the necessary financial calculations. Their primary objective was to reduce the time taken to run this code. Before porting to CUDA, they required ten to twelve hours to run the entire code. After porting to CUDA, they were able to do the same work in about 30 minutes.\n\nLincoln Financial Group has several C/C++ programmers in their team and they trained many of them to use CUDA. Their code used CUDA to speed up a calculation using Monte Carlo methods to analyze various scenarios in their hedge-fund projection system (HPS). The major portion of their calculations were carried out on independent policies and thus the entire process was ideal for parallel programming (no communication bottlenecks).\n<h4>Mission</h4>\nThe CPU code was slow and this was holding them back. Because the code took the entire night to run, they were not able to run several different scenarios and take corrective action based on the results of the code. The primary reason to move to GPUs was to speed up the calculations.\n\nLincoln Financial Group invested heavily into building CPU+GPU clusters relying on AMAX. They had the code running on four compute nodes, with four GPUs on each node. Each GPU was a NVIDIA K20X. The code ran on 16 GPUs. They were in the process of installing an even bigger system, with 64 total GPUs.\n<h4>Action</h4>\nOur initial plan was adjusted as the project progressed, and we identified key areas that needed improvement. The first couple of weeks were somewhat tricky because we were not able to get a working version of the codebase that was representative of the code they were actually running. This was because the code was in a very active state of development and integration on their side.\n\nWe made several suggestions to improve the efficiency of the codebase, but most of these were minor improvements. There were two levels of parallelism in the code—at the kernel level (GPU CUDA code) and the cluster level (MPI). One of the really useful suggestions we made was relevant at the MPI level, where we suggested they organize their policies in a random manner to distribute the computing load in a more uniform manner. This led to a major efficiency increase. This suggestion was immediately implemented by their engineers. Another useful contribution we made was to stress-test their code to get an estimate of how many more policies they could handle. This was really simple to do, but was a big hit within the company.\n\nIn the begging of the project, we were unable to access a working version of their code. Additionally, we were not able to access their machines from our laptops. Both of these challenges were overcome in the following week and no significant adjustments to the original plan were required.\n<h4>Results</h4>\nThe final deliverable consisted of a detailed technical report covering six modules of our assessment of Lincoln Financial Group\'s HPS, including the following system reviews: code base, performance and optimization, fault tolerance, scalability, compatibility with emerging CUDA trends, and disaster recovery. We also delivered an executive summary of our findings suitable for higher management.\n\nLincoln Financial Group had already developed the code base for their HPS. They engaged ArrayFire to obtain an expert assessment of their work, and to get a \"stamp of approval\" that the code will work as intended and is of sufficiently good quality. We successfully delivered on all objectives. Our assessment and findings were fully documented in nearly 100 pages of detailed technical reports and slide modules. These contained a wealth of significant benchmarks and visuals related to the code base and our assessment of their HPS.\n\nLincoln Financial Group was extremely satisfied with our input and suggestions. We met or exceeded their expectations in all project objectives and deliverables.\n<h6>About Lincoln Financial Group</h6>\nHeadquartered in the Philadelphia region, Lincoln Financial Group is a Fortune 500 company offering a diverse range of financial services and solutions. With a strong focus on four core business areas — life insurance, annuities, retirement plan services, and group protection — our business is built around supporting, preserving, and enhancing our customer\'s lifestyles and providing better retirement outcomes. Led by over 9,000 employees, Lincoln Financial provides the tools and advice to help individuals take charge of their futures.[/column][column type=\"one-fifth\" last=\"true\"].[/column][/content_band]','Case Study: Lincoln Financial Group','','inherit','open','open','','6928-autosave-v1','','','2015-04-08 21:03:06','2015-04-08 21:03:06','',6928,'http://sandbox.arrayfire.com/6928-autosave-v1/',0,'revision','',0),(8137,7,'2015-04-08 20:54:01','2015-04-08 20:54:01','[content_band inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"10px\" padding_bottom=\"40px\"][column type=\"one-half\"][custom_headline type=\"left\" level=\"h2\"]Call the ArrayFire team[/custom_headline]\r\n\r\nHire us to accelerate your code, train your pros, or even write new code for your organization!\r\n\r\nWe’ve already helped thousands of organizations speed up their code. We’ve accelerated algorithms,  sped up data sets, and solved challenging problems of all types in the past, and we’re confident that we can accelerate your code, too.\r\n\r\nStart by setting up a free consultation to discuss your project with an ArrayFire expert today!\r\n\r\n[gap size=\"5%\"][button  type=\"flat\" shape=\"rounded\" href=\"http://meetme.so/arrayfire\" size=\"normal\" ]Schedule a consultation[/button][/column][column type=\"one-half\" last=\"true\" class=\"center-text\"][gap size=\"15%\"]<img class=\"aligncenter wp-image-462\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/Bat-signal.png\" alt=\"Bat signal\" width=\"700\" height=\"437\" />[/column][gap size=\"2%\"][/content_band][content_band bg_image=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/11/Epipheo-background1.png\" parallax=\"true\" inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"40px\" padding_bottom=\"40px\"][gap size=\"2%\"]\r\n<p style=\"text-align: left;\">[column type=\"one-third\" ][promo image=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/10/lincoln-logo-promo-01.png\" alt=\"Lincoln Financial Group\"]Lincoln Financial Group ported their CPU code (C/C++) to CUDA. Before porting to CUDA, they required 10-12 hours to run the entire code. After porting to CUDA, they were able to do the same work in about 30 minutes.</p>\r\n<p style=\"text-align: center;\">[button type=\"flat\" shape=\"rounded\" href=\"#example\" size=\"regular\" ]Read the case study[/button][/promo][/column]</p>\r\n<p style=\"text-align: left;\">[column type=\"one-third\"][promo image=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/10/glasses-logo-promo-01.png\" alt=\"Glasses.com\"]The Glasses.com app relies on computer vision to recognize the features of a user’s face. The application then generates an accurate, high-fidelity, three-dimensional model of that face, and virtually places selected frames on the image.</p>\r\n<p style=\"text-align: center;\">[button type=\"flat\" shape=\"rounded\" href=\"http://sandbox.arrayfire.com/case-study-glasses-com-app-with-3dfit-technology/\" size=\"regular\" ]Read the case study[/button][/promo][/column]</p>\r\n<p style=\"text-align: left;\">[column type=\"one-third\" last=\"true\"][promo image=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/10/reveal-logo-promo-01.png\" alt=\"Reveal Imaging\"]Reveal Imaging, an SAIC company, uses ArrayFire in developing threat-detection products for transportation systems—such as cargo and baggage screening in airports—and in securing facilities and public events.</p>\r\n<p style=\"text-align: center;\">[button type=\"flat\" shape=\"rounded\" href=\"http://sandbox.arrayfire.com/<span id=\"editable-post-name\" title=\"Click to edit this part of the permalink\">case-study-reveal-imaging</span>/\" size=\"regular\" ]Read the case study[/button][/promo][/column]</p>\r\n\r\n<div id=\"starter\"></div>\r\n[/content_band]\r\n\r\n[content_band bg_color=\"#f2f2f2\" inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"10px\" padding_bottom=\"40px\"]\r\n\r\n[column type=\"one-half\"] [custom_headline type=\"left\" level=\"h2\"]Starter Package ($799) [/custom_headline] Hire us for a single day. We\'ll match you with one engineer dedicated for a full day, supported by senior and test engineers throughout the day. Here\'s how it works:\r\n\r\n[icon_list] [icon_list_item type=\"angle-double-right\"]We conduct an initial phone call.[/icon_list_item] [icon_list_item type=\"angle-double-right\"]You send us your code or algorithm. [/icon_list_item] [icon_list_item type=\"angle-double-right\"]We analyze your code for potential GPU benefit.[/icon_list_item][icon_list_item type=\"angle-double-right\"]We accelerate as much of your code as is possible within the one-day effort, applying our extensive GPU software libraries.[/icon_list_item][icon_list_item type=\"angle-double-right\"]We produce a final report for you, along with your optimized code.[/icon_list_item] [/icon_list] The final report outlines the best approach to follow for full GPU-acceleration of your code.\r\n\r\n[button type=\"flat\"  shape=\"rounded\" size=\"regular\" href=\"http://sandbox.arrayfire.com/product-category/starter-package/\" title=\"Starter Package\"]Get the Starter Package[/button]\r\n\r\n&nbsp;\r\n\r\n[/column][column type=\"one-half\" last=\"true\" ][gap size=\"15%\"]<img class=\"aligncenter wp-image-4962\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/02/Benchmark-guy-torso-opposite.png\" alt=\"Benchmark guy, torso opposite\" width=\"450\" height=\"397\" />[/column]\r\n<div></div>\r\n[/content_band]\r\n\r\n[content_band inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"10px\" padding_bottom=\"40px\" ]\r\n\r\n[column type=\"one-half\"]\r\n\r\n&nbsp;\r\n\r\n[gap size=\"12%\"]\r\n\r\n<img class=\"aligncenter size-large wp-image-5100\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/Triumvirate_Exported-1024x599.png\" alt=\"Triumvirate_Exported\" width=\"742\" height=\"434\" />[/column]\r\n\r\n[column type=\"one-half\"  last=\"true\" ]\r\n\r\n[custom_headline type=\"left\" level=\"h2\" ]Custom coding[/custom_headline]\r\n\r\nYour hardware can do anything, given the right code. Getting that code right can be tricky when your team is swamped in work or when you\'re new to parallel programming. Bring us in—our team is capable of writing custom code that\'s as unique as your work and tailored to your task. Here\'s what we bring to the table:\r\n\r\n[icon_list] [icon_list_item type=\"angle-double-right\"]Excellence in GPU code[/icon_list_item] [icon_list_item type=\"angle-double-right\"]Well-written, efficient C, C++, Fortran, Java, or .NET [/icon_list_item] [icon_list_item type=\"angle-double-right\"]Application porting and integration[/icon_list_item][icon_list_item type=\"angle-double-right\"]Tuning software to peak hardware performance[/icon_list_item][icon_list_item type=\"angle-double-right\"]Scalability of algorithms to handle enterprise-level programs[/icon_list_item] [/icon_list][button  type=\"flat\" shape=\"rounded\" href=\"http://meetme.so/arrayfire\" size=\"regular\" ]Schedule a consultation[/button][/column] [/content_band]','Consulting, OPSC','','inherit','open','open','','6634-revision-v1','','','2015-04-08 20:54:01','2015-04-08 20:54:01','',6634,'http://sandbox.arrayfire.com/6634-revision-v1/',0,'revision','',0),(8138,7,'2015-06-01 18:23:09','2015-06-01 18:23:09','[content_band inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"10px\" padding_bottom=\"40px\"][column type=\"one-half\"][custom_headline type=\"left\" level=\"h2\"]Call the ArrayFire team[/custom_headline]\n\nHire us to accelerate your code, train your pros, or even write new code for your organization!\n\nWe’ve already helped thousands of organizations speed up their code. We’ve accelerated algorithms,  sped up data sets, and solved challenging problems of all types in the past, and we’re confident that we can accelerate your code, too.\n\nStart by setting up a free consultation to discuss your project with an ArrayFire expert today!\n\n[gap size=\"5%\"][button  type=\"flat\" shape=\"rounded\" href=\"http://meetme.so/arrayfire\" size=\"normal\" ]Schedule a consultation[/button][/column][column type=\"one-half\" last=\"true\" class=\"center-text\"][gap size=\"15%\"]<img class=\"aligncenter wp-image-462\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/Bat-signal.png\" alt=\"Bat signal\" width=\"700\" height=\"437\" />[/column][gap size=\"2%\"][/content_band][content_band bg_color=\"#f2f2f2\" inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"10px\" padding_bottom=\"40px\"]\n\n[column type=\"one-half\"] [custom_headline type=\"left\" level=\"h2\"]Starter Package ($799) [/custom_headline] Hire us for a single day. We\'ll match you with one engineer dedicated for a full day, supported by senior and test engineers throughout the day. Here\'s how it works:\n\n[icon_list] [icon_list_item type=\"angle-double-right\"]We conduct an initial phone call.[/icon_list_item] [icon_list_item type=\"angle-double-right\"]You send us your code or algorithm. [/icon_list_item] [icon_list_item type=\"angle-double-right\"]We analyze your code for potential GPU benefit.[/icon_list_item][icon_list_item type=\"angle-double-right\"]We accelerate as much of your code as is possible within the one-day effort, applying our extensive GPU software libraries.[/icon_list_item][icon_list_item type=\"angle-double-right\"]We produce a final report for you, along with your optimized code.[/icon_list_item] [/icon_list] The final report outlines the best approach to follow for full GPU-acceleration of your code.\n\n[button type=\"flat\"  shape=\"rounded\" size=\"regular\" href=\"http://sandbox.arrayfire.com/product-category/starter-package/\" title=\"Starter Package\"]Get the Starter Package[/button]\n\n&nbsp;\n\n[/column][column type=\"one-half\" last=\"true\" ][gap size=\"15%\"]<img class=\"aligncenter wp-image-4962\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/02/Benchmark-guy-torso-opposite.png\" alt=\"Benchmark guy, torso opposite\" width=\"450\" height=\"397\" />[/column]\n<div></div>\n[/content_band]\n\n[content_band inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"10px\" padding_bottom=\"40px\" ]\n\n[column type=\"one-half\"]\n\n&nbsp;\n\n[gap size=\"12%\"]\n\n<img class=\"aligncenter size-large wp-image-5100\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/Triumvirate_Exported-1024x599.png\" alt=\"Triumvirate_Exported\" width=\"742\" height=\"434\" />[/column]\n\n[column type=\"one-half\"  last=\"true\" ]\n\n[custom_headline type=\"left\" level=\"h2\" ]Custom coding[/custom_headline]\n\nYour hardware can do anything, given the right code. Getting that code right can be tricky when your team is swamped in work or when you\'re new to parallel programming. Bring us in—our team is capable of writing custom code that\'s as unique as your work and tailored to your task. Here\'s what we bring to the table:\n\n[icon_list] [icon_list_item type=\"angle-double-right\"]Excellence in GPU code[/icon_list_item] [icon_list_item type=\"angle-double-right\"]Well-written, efficient C, C++, Fortran, Java, or .NET [/icon_list_item] [icon_list_item type=\"angle-double-right\"]Application porting and integration[/icon_list_item][icon_list_item type=\"angle-double-right\"]Tuning software to peak hardware performance[/icon_list_item][icon_list_item type=\"angle-double-right\"]Scalability of algorithms to handle enterprise-level programs[/icon_list_item] [/icon_list][button  type=\"flat\" shape=\"rounded\" href=\"http://meetme.so/arrayfire\" size=\"regular\" ]Schedule a consultation[/button][/column] [/content_band]\n\n[content_band bg_color=\"#f2f2f2\" inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"10px\" padding_bottom=\"40px\"][custom_headline type=\"left\"  level=\"h2\" ]Case studies[/custom_headline][gap size=\"4%\"]\n\n[column type=\"one-half\"][promo image=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/10/glasses-logo-promo-01.png\" alt=\"Glasses.com\"]The Glasses.com app relies on computer vision to recognize the features of a user’s face. The application then generates an accurate, high-fidelity, three-dimensional model of that face, and virtually places selected frames on the image.\n<p style=\"text-align: center;\">[button type=\"flat\" shape=\"rounded\" href=\"http://sandbox.arrayfire.com/case-study-glasses-com-app-with-3dfit-technology/\" size=\"regular\" ]Read the case study[/button][/promo][/column]</p>\n[column type=\"one-half\" last=\"true\"][promo image=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/10/reveal-logo-promo-01.png\" alt=\"Reveal Imaging\"]Reveal Imaging, an SAIC company, uses ArrayFire in developing threat-detection products for transportation systems—such as cargo and baggage screening in airports—and in securing facilities and public events.\n<p style=\"text-align: center;\">[button type=\"flat\" shape=\"rounded\" href=\"http://sandbox.arrayfire.com/case-study-reveal-imaging/\" size=\"regular\" ]Read the case study[/button][/promo][/column][/content_band]</p>','Consulting','','inherit','open','open','','6634-autosave-v1','','','2015-06-01 18:23:09','2015-06-01 18:23:09','',6634,'http://sandbox.arrayfire.com/6634-autosave-v1/',0,'revision','',0),(8139,7,'2015-04-08 20:57:02','2015-04-08 20:57:02','[content_band inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"10px\" padding_bottom=\"40px\"][column type=\"one-half\"][custom_headline type=\"left\" level=\"h2\"]Call the ArrayFire team[/custom_headline]\r\n\r\nHire us to accelerate your code, train your pros, or even write new code for your organization!\r\n\r\nWe’ve already helped thousands of organizations speed up their code. We’ve accelerated algorithms,  sped up data sets, and solved challenging problems of all types in the past, and we’re confident that we can accelerate your code, too.\r\n\r\nStart by setting up a free consultation to discuss your project with an ArrayFire expert today!\r\n\r\n[gap size=\"5%\"][button  type=\"flat\" shape=\"rounded\" href=\"http://meetme.so/arrayfire\" size=\"normal\" ]Schedule a consultation[/button][/column][column type=\"one-half\" last=\"true\" class=\"center-text\"][gap size=\"15%\"]<img class=\"aligncenter wp-image-462\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/Bat-signal.png\" alt=\"Bat signal\" width=\"700\" height=\"437\" />[/column][gap size=\"2%\"][/content_band][content_band bg_image=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/11/Epipheo-background1.png\" parallax=\"true\" inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"40px\" padding_bottom=\"40px\"][gap size=\"2%\"]\r\n<p style=\"text-align: left;\">[column type=\"one-third\" ][promo image=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/10/lincoln-logo-promo-01.png\" alt=\"Lincoln Financial Group\"]Lincoln Financial Group ported their CPU code (C/C++) to CUDA. Before porting to CUDA, they required 10-12 hours to run the entire code. After porting to CUDA, they were able to do the same work in about 30 minutes.</p>\r\n<p style=\"text-align: center;\">[button type=\"flat\" shape=\"rounded\" href=\"#example\" size=\"regular\" ]Read the case study[/button][/promo][/column]</p>\r\n<p style=\"text-align: left;\">[column type=\"one-third\"][promo image=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/10/glasses-logo-promo-01.png\" alt=\"Glasses.com\"]The Glasses.com app relies on computer vision to recognize the features of a user’s face. The application then generates an accurate, high-fidelity, three-dimensional model of that face, and virtually places selected frames on the image.</p>\r\n<p style=\"text-align: center;\">[button type=\"flat\" shape=\"rounded\" href=\"http://sandbox.arrayfire.com/case-study-glasses-com-app-with-3dfit-technology/\" size=\"regular\" ]Read the case study[/button][/promo][/column]</p>\r\n<p style=\"text-align: left;\">[column type=\"one-third\" last=\"true\"][promo image=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/10/reveal-logo-promo-01.png\" alt=\"Reveal Imaging\"]Reveal Imaging, an SAIC company, uses ArrayFire in developing threat-detection products for transportation systems—such as cargo and baggage screening in airports—and in securing facilities and public events.</p>\r\n<p style=\"text-align: center;\">[button type=\"flat\" shape=\"rounded\" href=\"http://sandbox.arrayfire.com/case-study-reveal-imaging/\" size=\"regular\" ]Read the case study[/button][/promo][/column]</p>\r\n\r\n<div id=\"starter\"></div>\r\n[/content_band]\r\n\r\n[content_band bg_color=\"#f2f2f2\" inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"10px\" padding_bottom=\"40px\"]\r\n\r\n[column type=\"one-half\"] [custom_headline type=\"left\" level=\"h2\"]Starter Package ($799) [/custom_headline] Hire us for a single day. We\'ll match you with one engineer dedicated for a full day, supported by senior and test engineers throughout the day. Here\'s how it works:\r\n\r\n[icon_list] [icon_list_item type=\"angle-double-right\"]We conduct an initial phone call.[/icon_list_item] [icon_list_item type=\"angle-double-right\"]You send us your code or algorithm. [/icon_list_item] [icon_list_item type=\"angle-double-right\"]We analyze your code for potential GPU benefit.[/icon_list_item][icon_list_item type=\"angle-double-right\"]We accelerate as much of your code as is possible within the one-day effort, applying our extensive GPU software libraries.[/icon_list_item][icon_list_item type=\"angle-double-right\"]We produce a final report for you, along with your optimized code.[/icon_list_item] [/icon_list] The final report outlines the best approach to follow for full GPU-acceleration of your code.\r\n\r\n[button type=\"flat\"  shape=\"rounded\" size=\"regular\" href=\"http://sandbox.arrayfire.com/product-category/starter-package/\" title=\"Starter Package\"]Get the Starter Package[/button]\r\n\r\n&nbsp;\r\n\r\n[/column][column type=\"one-half\" last=\"true\" ][gap size=\"15%\"]<img class=\"aligncenter wp-image-4962\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/02/Benchmark-guy-torso-opposite.png\" alt=\"Benchmark guy, torso opposite\" width=\"450\" height=\"397\" />[/column]\r\n<div></div>\r\n[/content_band]\r\n\r\n[content_band inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"10px\" padding_bottom=\"40px\" ]\r\n\r\n[column type=\"one-half\"]\r\n\r\n&nbsp;\r\n\r\n[gap size=\"12%\"]\r\n\r\n<img class=\"aligncenter size-large wp-image-5100\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/Triumvirate_Exported-1024x599.png\" alt=\"Triumvirate_Exported\" width=\"742\" height=\"434\" />[/column]\r\n\r\n[column type=\"one-half\"  last=\"true\" ]\r\n\r\n[custom_headline type=\"left\" level=\"h2\" ]Custom coding[/custom_headline]\r\n\r\nYour hardware can do anything, given the right code. Getting that code right can be tricky when your team is swamped in work or when you\'re new to parallel programming. Bring us in—our team is capable of writing custom code that\'s as unique as your work and tailored to your task. Here\'s what we bring to the table:\r\n\r\n[icon_list] [icon_list_item type=\"angle-double-right\"]Excellence in GPU code[/icon_list_item] [icon_list_item type=\"angle-double-right\"]Well-written, efficient C, C++, Fortran, Java, or .NET [/icon_list_item] [icon_list_item type=\"angle-double-right\"]Application porting and integration[/icon_list_item][icon_list_item type=\"angle-double-right\"]Tuning software to peak hardware performance[/icon_list_item][icon_list_item type=\"angle-double-right\"]Scalability of algorithms to handle enterprise-level programs[/icon_list_item] [/icon_list][button  type=\"flat\" shape=\"rounded\" href=\"http://meetme.so/arrayfire\" size=\"regular\" ]Schedule a consultation[/button][/column] [/content_band]','Consulting, OPSC','','inherit','open','open','','6634-revision-v1','','','2015-04-08 20:57:02','2015-04-08 20:57:02','',6634,'http://sandbox.arrayfire.com/6634-revision-v1/',0,'revision','',0),(8140,6,'2015-04-08 21:03:09','2015-04-08 21:03:09','[content_band inner_container=\"true\" no_margin=\"true\" border=\"top\" padding_top=\"40px\" padding_bottom=\"40px\"][column type=\"one-fifth\"].[/column][column type=\"three-fifths\"][custom_headline type=\"left\" level=\"h3\"]Lincoln Financial Group[/custom_headline][/column][column type=\"one-fifth\" last=\"true\"].[/column][gap size=\"3%\"]\r\n\r\n[column type=\"one-fifth\"].[/column][column type=\"three-fifths\"]<img class=\"alignright size-full wp-image-6895\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/10/lincoln-logo-promo-01.png\" alt=\"lincoln logo, promo-01\" width=\"360\" height=\"120\" /><span class=\"il\">Lincoln</span> Financial Group had ported their CPU code (C/C++) to CUDA and this enabled them to speed up the necessary financial calculations. Their primary objective was to reduce the time taken to run this code. Before porting to CUDA, they required ten to twelve hours to run the entire code. After porting to CUDA, they were able to do the same work in about 30 minutes.\r\n\r\nLincoln Financial Group has several C/C++ programmers in their team and they trained many of them to use CUDA. Their code used CUDA to speed up a calculation using Monte Carlo methods to analyze various scenarios in their hedge-fund projection system (HPS). The major portion of their calculations were carried out on independent policies and thus the entire process was ideal for parallel programming (no communication bottlenecks).\r\n<h4>Mission</h4>\r\nThe CPU code was slow and this was holding them back. Because the code took the entire night to run, they were not able to run several different scenarios and take corrective action based on the results of the code. The primary reason to move to GPUs was to speed up the calculations.\r\n\r\nLincoln Financial Group invested heavily into building CPU+GPU clusters relying on AMAX. They had the code running on four compute nodes, with four GPUs on each node. Each GPU was a NVIDIA K20X. The code ran on 16 GPUs. They were in the process of installing an even bigger system, with 64 total GPUs.\r\n<h4>Action</h4>\r\nOur initial plan was adjusted as the project progressed, and we identified key areas that needed improvement. The first couple of weeks were somewhat tricky because we were not able to get a working version of the codebase that was representative of the code they were actually running. This was because the code was in a very active state of development and integration on their side.\r\n\r\nWe made several suggestions to improve the efficiency of the codebase, but most of these were minor improvements. There were two levels of parallelism in the code—at the kernel level (GPU CUDA code) and the cluster level (MPI). One of the really useful suggestions we made was relevant at the MPI level, where we suggested they organize their policies in a random manner to distribute the computing load in a more uniform manner. This led to a major efficiency increase. This suggestion was immediately implemented by their engineers. Another useful contribution we made was to stress-test their code to get an estimate of how many more policies they could handle. This was really simple to do, but was a big hit within the company.\r\n\r\nIn the begging of the project, we were unable to access a working version of their code. Additionally, we were not able to access their machines from our laptops. Both of these challenges were overcome in the following week and no significant adjustments to the original plan were required.\r\n<h4>Results</h4>\r\nThe final deliverable consisted of a detailed technical report covering six modules of our assessment of Lincoln Financial Group\'s HPS, including the following system reviews: code base, performance and optimization, fault tolerance, scalability, compatibility with emerging CUDA trends, and disaster recovery. We also delivered an executive summary of our findings suitable for higher management.\r\n\r\nLincoln Financial Group had already developed the code base for their HPS. They engaged ArrayFire to obtain an expert assessment of their work, and to get a \"stamp of approval\" that the code will work as intended and is of sufficiently good quality. We successfully delivered on all objectives. Our assessment and findings were fully documented in nearly 100 pages of detailed technical reports and slide modules. These contained a wealth of significant benchmarks and visuals related to the code base and our assessment of their HPS.\r\n\r\nLincoln Financial Group was extremely satisfied with our input and suggestions. We met or exceeded their expectations in all project objectives and deliverables.\r\n<h6>About Lincoln Financial Group</h6>\r\nHeadquartered in the Philadelphia region, Lincoln Financial Group is a Fortune 500 company offering a diverse range of financial services and solutions. With a strong focus on four core business areas — life insurance, annuities, retirement plan services, and group protection — our business is built around supporting, preserving, and enhancing our customer\'s lifestyles and providing better retirement outcomes. Led by over 9,000 employees, Lincoln Financial provides the tools and advice to help individuals take charge of their futures.[/column][column type=\"one-fifth\" last=\"true\"].[/column][/content_band]','Case Study: Lincoln Financial Group','','inherit','open','open','','6928-revision-v1','','','2015-04-08 21:03:09','2015-04-08 21:03:09','',6928,'http://sandbox.arrayfire.com/6928-revision-v1/',0,'revision','',0),(8141,7,'2015-04-08 21:05:26','2015-04-08 21:05:26','[content_band inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"10px\" padding_bottom=\"40px\"][column type=\"one-half\"][custom_headline type=\"left\" level=\"h2\"]Call the ArrayFire team[/custom_headline]\r\n\r\nHire us to accelerate your code, train your pros, or even write new code for your organization!\r\n\r\nWe’ve already helped thousands of organizations speed up their code. We’ve accelerated algorithms,  sped up data sets, and solved challenging problems of all types in the past, and we’re confident that we can accelerate your code, too.\r\n\r\nStart by setting up a free consultation to discuss your project with an ArrayFire expert today!\r\n\r\n[gap size=\"5%\"][button  type=\"flat\" shape=\"rounded\" href=\"http://meetme.so/arrayfire\" size=\"normal\" ]Schedule a consultation[/button][/column][column type=\"one-half\" last=\"true\" class=\"center-text\"][gap size=\"15%\"]<img class=\"aligncenter wp-image-462\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/Bat-signal.png\" alt=\"Bat signal\" width=\"700\" height=\"437\" />[/column][gap size=\"2%\"][/content_band][content_band bg_image=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/11/Epipheo-background1.png\" parallax=\"true\" inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"40px\" padding_bottom=\"40px\"][gap size=\"2%\"]\r\n<p style=\"text-align: left;\">[column type=\"one-third\" ][promo image=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/10/lincoln-logo-promo-01.png\" alt=\"Lincoln Financial Group\"]Lincoln Financial Group ported their CPU code (C/C++) to CUDA. Before porting to CUDA, they required 10-12 hours to run the entire code. After porting to CUDA, they were able to do the same work in about 30 minutes.</p>\r\n<p style=\"text-align: center;\">[button type=\"flat\" shape=\"rounded\" href=\"http://sandbox.arrayfire.com/case-study-lincoln-financial-group/\" size=\"regular\" ]Read the case study[/button][/promo][/column]</p>\r\n<p style=\"text-align: left;\">[column type=\"one-third\"][promo image=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/10/glasses-logo-promo-01.png\" alt=\"Glasses.com\"]The Glasses.com app relies on computer vision to recognize the features of a user’s face. The application then generates an accurate, high-fidelity, three-dimensional model of that face, and virtually places selected frames on the image.</p>\r\n<p style=\"text-align: center;\">[button type=\"flat\" shape=\"rounded\" href=\"http://sandbox.arrayfire.com/case-study-glasses-com-app-with-3dfit-technology/\" size=\"regular\" ]Read the case study[/button][/promo][/column]</p>\r\n<p style=\"text-align: left;\">[column type=\"one-third\" last=\"true\"][promo image=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/10/reveal-logo-promo-01.png\" alt=\"Reveal Imaging\"]Reveal Imaging, an SAIC company, uses ArrayFire in developing threat-detection products for transportation systems—such as cargo and baggage screening in airports—and in securing facilities and public events.</p>\r\n<p style=\"text-align: center;\">[button type=\"flat\" shape=\"rounded\" href=\"http://sandbox.arrayfire.com/case-study-reveal-imaging/\" size=\"regular\" ]Read the case study[/button][/promo][/column]</p>\r\n\r\n<div id=\"starter\"></div>\r\n[/content_band]\r\n\r\n[content_band bg_color=\"#f2f2f2\" inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"10px\" padding_bottom=\"40px\"]\r\n\r\n[column type=\"one-half\"] [custom_headline type=\"left\" level=\"h2\"]Starter Package ($799) [/custom_headline] Hire us for a single day. We\'ll match you with one engineer dedicated for a full day, supported by senior and test engineers throughout the day. Here\'s how it works:\r\n\r\n[icon_list] [icon_list_item type=\"angle-double-right\"]We conduct an initial phone call.[/icon_list_item] [icon_list_item type=\"angle-double-right\"]You send us your code or algorithm. [/icon_list_item] [icon_list_item type=\"angle-double-right\"]We analyze your code for potential GPU benefit.[/icon_list_item][icon_list_item type=\"angle-double-right\"]We accelerate as much of your code as is possible within the one-day effort, applying our extensive GPU software libraries.[/icon_list_item][icon_list_item type=\"angle-double-right\"]We produce a final report for you, along with your optimized code.[/icon_list_item] [/icon_list] The final report outlines the best approach to follow for full GPU-acceleration of your code.\r\n\r\n[button type=\"flat\"  shape=\"rounded\" size=\"regular\" href=\"http://sandbox.arrayfire.com/product-category/starter-package/\" title=\"Starter Package\"]Get the Starter Package[/button]\r\n\r\n&nbsp;\r\n\r\n[/column][column type=\"one-half\" last=\"true\" ][gap size=\"15%\"]<img class=\"aligncenter wp-image-4962\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/02/Benchmark-guy-torso-opposite.png\" alt=\"Benchmark guy, torso opposite\" width=\"450\" height=\"397\" />[/column]\r\n<div></div>\r\n[/content_band]\r\n\r\n[content_band inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"10px\" padding_bottom=\"40px\" ]\r\n\r\n[column type=\"one-half\"]\r\n\r\n&nbsp;\r\n\r\n[gap size=\"12%\"]\r\n\r\n<img class=\"aligncenter size-large wp-image-5100\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/Triumvirate_Exported-1024x599.png\" alt=\"Triumvirate_Exported\" width=\"742\" height=\"434\" />[/column]\r\n\r\n[column type=\"one-half\"  last=\"true\" ]\r\n\r\n[custom_headline type=\"left\" level=\"h2\" ]Custom coding[/custom_headline]\r\n\r\nYour hardware can do anything, given the right code. Getting that code right can be tricky when your team is swamped in work or when you\'re new to parallel programming. Bring us in—our team is capable of writing custom code that\'s as unique as your work and tailored to your task. Here\'s what we bring to the table:\r\n\r\n[icon_list] [icon_list_item type=\"angle-double-right\"]Excellence in GPU code[/icon_list_item] [icon_list_item type=\"angle-double-right\"]Well-written, efficient C, C++, Fortran, Java, or .NET [/icon_list_item] [icon_list_item type=\"angle-double-right\"]Application porting and integration[/icon_list_item][icon_list_item type=\"angle-double-right\"]Tuning software to peak hardware performance[/icon_list_item][icon_list_item type=\"angle-double-right\"]Scalability of algorithms to handle enterprise-level programs[/icon_list_item] [/icon_list][button  type=\"flat\" shape=\"rounded\" href=\"http://meetme.so/arrayfire\" size=\"regular\" ]Schedule a consultation[/button][/column] [/content_band]','Consulting, OPSC','','inherit','open','open','','6634-revision-v1','','','2015-04-08 21:05:26','2015-04-08 21:05:26','',6634,'http://sandbox.arrayfire.com/6634-revision-v1/',0,'revision','',0),(8142,18528,'2015-04-09 15:13:58','2015-04-09 15:13:58','One of the most powerful aspects of parallel programming on integrated GPUs is that you may avoid the O(N) copy operation associated with moving data from host to device memory. This feature can be particularly useful for applications that deal with real-time data streams, like video processing.\r\n<h2 id=\"method-1-let-opencl-allocate-memory-and-use-map-unmap-buffers\">Method 1: Let OpenCL allocate memory and use map/unmap buffers</h2>\r\nThe first method of allocating zero-copy buffers is quite simple: let OpenCL do it for you. To create a buffer in this fashion simply specify the<code>CL_MEM_ALLOC_HOST_PTR</code> argument to the <code>cl::Buffer</code> constructor (or<code>clCreateBuffer</code> if you are using the C API):\r\n<pre><code class=\"lang-c++\">// Instruct OpenCL to allocate host memory\r\n::size_t size = N * sizeof(float)\r\nBuffer d_results(context, CL_MEM_ALLOC_HOST_PTR, size);\r\n\r\n... launch kernels, etc\r\n</code></pre>\r\n<h2 id=\"method-2-allocate-aligned-memory-and-use-map-unmap-buffers\">Method 2: Allocate aligned memory and use map/unmap buffers</h2>\r\nIn situations where you are streaming data or doing DMA between devices, it may be necessary to use aligned memory. In this situation, Intel OpenCL devices require that data be allocated with 4k alignment and be a multiple of 64 bytes (a cache line) as follows:\r\n<pre><code class=\"lang-c++\">::size_t size = N * sizeof(float); // size must be a multiple of 64\r\n::size_t alignment = 4096;\r\n// Allocate aligned memory on the host. The particular <span class=\"hljs-keyword\">function is OS-dependent.\r\n//  memalign(size_t alignment, size_t size) on Linux, release memory with free(...)\r\n//  _aligned_malloc(size_t size, size_t alignment) on Windows, release with _aligned_free(...)\r\n//  posix_memalign(void ** ptr, size_t alignment, size_t size) on OSX, release with free(...)\r\nfloat * h_results = (float*) memalign(alignment, size);\r\n\r\n// Create an OpenCL buffer using the host pointer\r\nBuffer d_results = cl::Buffer(context, CL_MEM_USE_HOST_PTR, size, t_results);\r\n</span></code></pre>\r\n<h2 id=\"accessing-memory\">Accessing memory</h2>\r\nPerhaps the most misunderstood aspect of zero-copy buffers in OpenCL relates to the state of the buffer after being used in a kernel invocation. It is often thought that the memory in the buffers will be updated immediately after the kernel completes; however, the OpenCL specification does not guarantee this behavior. To ensure that a zero-copy buffer is properly updated prior to use, a developer must map (and unmap!) a buffer prior to use in host code. This is actually a quite simple process:\r\n<pre><code class=\"lang-c++\">// Get exclusive access to the buffer\r\nfloat * temp = (float*) queue.enqueueMapBuffer(d_results, CL_TRUE, CL_MAP_READ, 0, size);\r\n\r\n... use the mapped buffer\r\n\r\n// release the buffer back to OpenCL’s control\r\nqueue.enqueueUnmapMemObject(d_results, temp);\r\n</code></pre>\r\n<h2 id=\"further-reading\">Further reading</h2>\r\n<a href=\"https://software.intel.com/en-us/articles/getting-the-most-from-opencl-12-how-to-increase-performance-by-minimizing-buffer-copies-on-intel-processor-graphics\">Getting the Most from OpenCL™ 1.2: How to Increase Performance by Minimizing Buffer Copies on Intel® Processor Graphics</a>','Improving OpenCL performance using zero-copy buffers on Intel GPUs','','inherit','open','open','','8125-revision-v1','','','2015-04-09 15:13:58','2015-04-09 15:13:58','',8125,'http://sandbox.arrayfire.com/8125-revision-v1/',0,'revision','',0),(8144,18528,'2015-04-09 15:15:52','2015-04-09 15:15:52','One of the most powerful aspects of parallel programming on integrated GPUs is that you may avoid the O(N) copy operation associated with moving data from host to device memory. This feature can be particularly useful for applications that deal with real-time data streams, like video processing.\r\n<h2 id=\"method-1-let-opencl-allocate-memory-and-use-map-unmap-buffers\">Method 1: Let OpenCL allocate memory and use map/unmap buffers</h2>\r\nThe first method of allocating zero-copy buffers is quite simple: let OpenCL do it for you. To create a buffer in this fashion simply specify the<code>CL_MEM_ALLOC_HOST_PTR</code> argument to the <code>cl::Buffer</code> constructor (or<code>clCreateBuffer</code> if you are using the C API):\r\n<pre><code class=\"lang-c++\">// Instruct OpenCL to allocate host memory\r\n::size_t size = N * sizeof(float)\r\nBuffer d_results(context, CL_MEM_ALLOC_HOST_PTR, size);\r\n\r\n... launch kernels, etc\r\n</code></pre>\r\n<h3 id=\"method-2-allocate-aligned-memory-and-use-map-unmap-buffers\">Method 2: Allocate aligned memory and use map/unmap buffers</h3>\r\nIn situations where you are streaming data or doing DMA between devices, it may be necessary to use aligned memory. In this situation, Intel OpenCL devices require that data be allocated with 4k alignment and be a multiple of 64 bytes (a cache line) as follows:\r\n<pre><code class=\"lang-c++\">::size_t size = N * sizeof(float); // size must be a multiple of 64\r\n::size_t alignment = 4096;\r\n// Allocate aligned memory on the host. The particular <span class=\"hljs-keyword\">function is OS-dependent.\r\n//  memalign(size_t alignment, size_t size) on Linux, release memory with free(...)\r\n//  _aligned_malloc(size_t size, size_t alignment) on Windows, release with _aligned_free(...)\r\n//  posix_memalign(void ** ptr, size_t alignment, size_t size) on OSX, release with free(...)\r\nfloat * h_results = (float*) memalign(alignment, size);\r\n\r\n// Create an OpenCL buffer using the host pointer\r\nBuffer d_results = cl::Buffer(context, CL_MEM_USE_HOST_PTR, size, t_results);\r\n</span></code></pre>\r\n<h3 id=\"accessing-memory\">Accessing memory</h3>\r\nPerhaps the most misunderstood aspect of zero-copy buffers in OpenCL relates to the state of the buffer after being used in a kernel invocation. It is often thought that the memory in the buffers will be updated immediately after the kernel completes; however, the OpenCL specification does not guarantee this behavior. To ensure that a zero-copy buffer is properly updated prior to use, a developer must map (and unmap!) a buffer prior to use in host code. This is actually a quite simple process:\r\n<pre><code class=\"lang-c++\">// Get exclusive access to the buffer\r\nfloat * temp = (float*) queue.enqueueMapBuffer(d_results, CL_TRUE, CL_MAP_READ, 0, size);\r\n\r\n... use the mapped buffer\r\n\r\n// release the buffer back to OpenCL’s control\r\nqueue.enqueueUnmapMemObject(d_results, temp);\r\n</code></pre>\r\n<h3 id=\"further-reading\">Further reading</h3>\r\n<a href=\"https://software.intel.com/en-us/articles/getting-the-most-from-opencl-12-how-to-increase-performance-by-minimizing-buffer-copies-on-intel-processor-graphics\">Getting the Most from OpenCL™ 1.2: How to Increase Performance by Minimizing Buffer Copies on Intel® Processor Graphics</a>','Improving OpenCL performance using zero-copy buffers on Intel GPUs','','inherit','open','open','','8125-revision-v1','','','2015-04-09 15:15:52','2015-04-09 15:15:52','',8125,'http://sandbox.arrayfire.com/8125-revision-v1/',0,'revision','',0),(8146,18528,'2015-04-09 15:16:08','2015-04-09 15:16:08','One of the most powerful aspects of parallel programming on integrated GPUs is that you may avoid the O(N) copy operation associated with moving data from host to device memory. This feature can be particularly useful for applications that deal with real-time data streams, like video processing.\r\n<h3 id=\"method-1-let-opencl-allocate-memory-and-use-map-unmap-buffers\">Method 1: Let OpenCL allocate memory and use map/unmap buffers</h3>\r\nThe first method of allocating zero-copy buffers is quite simple: let OpenCL do it for you. To create a buffer in this fashion simply specify the<code>CL_MEM_ALLOC_HOST_PTR</code> argument to the <code>cl::Buffer</code> constructor (or<code>clCreateBuffer</code> if you are using the C API):\r\n<pre><code class=\"lang-c++\">// Instruct OpenCL to allocate host memory\r\n::size_t size = N * sizeof(float)\r\nBuffer d_results(context, CL_MEM_ALLOC_HOST_PTR, size);\r\n\r\n... launch kernels, etc\r\n</code></pre>\r\n<h3 id=\"method-2-allocate-aligned-memory-and-use-map-unmap-buffers\">Method 2: Allocate aligned memory and use map/unmap buffers</h3>\r\nIn situations where you are streaming data or doing DMA between devices, it may be necessary to use aligned memory. In this situation, Intel OpenCL devices require that data be allocated with 4k alignment and be a multiple of 64 bytes (a cache line) as follows:\r\n<pre><code class=\"lang-c++\">::size_t size = N * sizeof(float); // size must be a multiple of 64\r\n::size_t alignment = 4096;\r\n// Allocate aligned memory on the host. The particular <span class=\"hljs-keyword\">function is OS-dependent.\r\n//  memalign(size_t alignment, size_t size) on Linux, release memory with free(...)\r\n//  _aligned_malloc(size_t size, size_t alignment) on Windows, release with _aligned_free(...)\r\n//  posix_memalign(void ** ptr, size_t alignment, size_t size) on OSX, release with free(...)\r\nfloat * h_results = (float*) memalign(alignment, size);\r\n\r\n// Create an OpenCL buffer using the host pointer\r\nBuffer d_results = cl::Buffer(context, CL_MEM_USE_HOST_PTR, size, t_results);\r\n</span></code></pre>\r\n<h3 id=\"accessing-memory\">Accessing memory</h3>\r\nPerhaps the most misunderstood aspect of zero-copy buffers in OpenCL relates to the state of the buffer after being used in a kernel invocation. It is often thought that the memory in the buffers will be updated immediately after the kernel completes; however, the OpenCL specification does not guarantee this behavior. To ensure that a zero-copy buffer is properly updated prior to use, a developer must map (and unmap!) a buffer prior to use in host code. This is actually a quite simple process:\r\n<pre><code class=\"lang-c++\">// Get exclusive access to the buffer\r\nfloat * temp = (float*) queue.enqueueMapBuffer(d_results, CL_TRUE, CL_MAP_READ, 0, size);\r\n\r\n... use the mapped buffer\r\n\r\n// release the buffer back to OpenCL’s control\r\nqueue.enqueueUnmapMemObject(d_results, temp);\r\n</code></pre>\r\n<h3 id=\"further-reading\">Further reading</h3>\r\n<a href=\"https://software.intel.com/en-us/articles/getting-the-most-from-opencl-12-how-to-increase-performance-by-minimizing-buffer-copies-on-intel-processor-graphics\">Getting the Most from OpenCL™ 1.2: How to Increase Performance by Minimizing Buffer Copies on Intel® Processor Graphics</a>','Improving OpenCL performance using zero-copy buffers on Intel GPUs','','inherit','open','open','','8125-revision-v1','','','2015-04-09 15:16:08','2015-04-09 15:16:08','',8125,'http://sandbox.arrayfire.com/8125-revision-v1/',0,'revision','',0),(8147,18528,'2015-04-09 15:17:02','2015-04-09 15:17:02','One of the most powerful aspects of parallel programming on integrated GPUs is that you may avoid the O(N) copy operation associated with moving data from host to device memory. This feature can be particularly useful for applications that deal with real-time data streams, like video processing.\r\n<h4 id=\"method-1-let-opencl-allocate-memory-and-use-map-unmap-buffers\">Method 1: Let OpenCL allocate memory and use map/unmap buffers</h4>\r\nThe first method of allocating zero-copy buffers is quite simple: let OpenCL do it for you. To create a buffer in this fashion simply specify the<code>CL_MEM_ALLOC_HOST_PTR</code> argument to the <code>cl::Buffer</code> constructor (or<code>clCreateBuffer</code> if you are using the C API):\r\n<pre><code class=\"lang-c++\">// Instruct OpenCL to allocate host memory\r\n::size_t size = N * sizeof(float)\r\nBuffer d_results(context, CL_MEM_ALLOC_HOST_PTR, size);\r\n\r\n... launch kernels, etc\r\n</code></pre>\r\n<h4 id=\"method-2-allocate-aligned-memory-and-use-map-unmap-buffers\">Method 2: Allocate aligned memory and use map/unmap buffers</h4>\r\nIn situations where you are streaming data or doing DMA between devices, it may be necessary to use aligned memory. In this situation, Intel OpenCL devices require that data be allocated with 4k alignment and be a multiple of 64 bytes (a cache line) as follows:\r\n<pre><code class=\"lang-c++\">::size_t size = N * sizeof(float); // size must be a multiple of 64\r\n::size_t alignment = 4096;\r\n// Allocate aligned memory on the host. The particular <span class=\"hljs-keyword\">function is OS-dependent.\r\n//  memalign(size_t alignment, size_t size) on Linux, release memory with free(...)\r\n//  _aligned_malloc(size_t size, size_t alignment) on Windows, release with _aligned_free(...)\r\n//  posix_memalign(void ** ptr, size_t alignment, size_t size) on OSX, release with free(...)\r\nfloat * h_results = (float*) memalign(alignment, size);\r\n\r\n// Create an OpenCL buffer using the host pointer\r\nBuffer d_results = cl::Buffer(context, CL_MEM_USE_HOST_PTR, size, t_results);\r\n</span></code></pre>\r\n<h4 id=\"accessing-memory\">Accessing memory</h4>\r\nPerhaps the most misunderstood aspect of zero-copy buffers in OpenCL relates to the state of the buffer after being used in a kernel invocation. It is often thought that the memory in the buffers will be updated immediately after the kernel completes; however, the OpenCL specification does not guarantee this behavior. To ensure that a zero-copy buffer is properly updated prior to use, a developer must map (and unmap!) a buffer prior to use in host code. This is actually a quite simple process:\r\n<pre><code class=\"lang-c++\">// Get exclusive access to the buffer\r\nfloat * temp = (float*) queue.enqueueMapBuffer(d_results, CL_TRUE, CL_MAP_READ, 0, size);\r\n\r\n... use the mapped buffer\r\n\r\n// release the buffer back to OpenCL’s control\r\nqueue.enqueueUnmapMemObject(d_results, temp);\r\n</code></pre>\r\n<h4 id=\"further-reading\">Further reading</h4>\r\n<a href=\"https://software.intel.com/en-us/articles/getting-the-most-from-opencl-12-how-to-increase-performance-by-minimizing-buffer-copies-on-intel-processor-graphics\">Getting the Most from OpenCL™ 1.2: How to Increase Performance by Minimizing Buffer Copies on Intel® Processor Graphics</a>','Improving OpenCL performance using zero-copy buffers on Intel GPUs','','inherit','open','open','','8125-revision-v1','','','2015-04-09 15:17:02','2015-04-09 15:17:02','',8125,'http://sandbox.arrayfire.com/8125-revision-v1/',0,'revision','',0),(8148,18528,'2015-04-09 15:17:43','2015-04-09 15:17:43','One of the most powerful aspects of parallel programming on integrated GPUs is that you may avoid the O(N) copy operation associated with moving data from host to device memory. This feature can be particularly useful for applications that deal with real-time data streams, like video processing.\r\n<h4 id=\"method-1-let-opencl-allocate-memory-and-use-map-unmap-buffers\">Method 1: Let OpenCL allocate memory and use map/unmap buffers</h4>\r\nThe first method of allocating zero-copy buffers is quite simple: let OpenCL do it for you. To create a buffer in this fashion simply specify the<code>CL_MEM_ALLOC_HOST_PTR</code> argument to the <code>cl::Buffer</code> constructor (or<code>clCreateBuffer</code> if you are using the C API):\r\n<pre><code class=\"lang-c++\">// Instruct OpenCL to allocate host memory\r\n::size_t size = N * sizeof(float)\r\nBuffer d_results(context, CL_MEM_ALLOC_HOST_PTR, size);\r\n\r\n... launch kernels, etc\r\n</code></pre>\r\n<h4 id=\"method-2-allocate-aligned-memory-and-use-map-unmap-buffers\">Method 2: Allocate aligned memory and use map/unmap buffers</h4>\r\nIn situations where you are streaming data or doing DMA between devices, it may be necessary to use aligned memory. In this situation, Intel OpenCL devices require that data be allocated with 4k alignment and be a multiple of 64 bytes (a cache line) as follows:\r\n<pre><code class=\"lang-c++\">::size_t size = N * sizeof(float); // size must be a multiple of 64\r\n::size_t alignment = 4096;\r\n// Allocate aligned memory on the host. The particular function is OS-dependent.\r\n//  memalign(size_t alignment, size_t size) on Linux, release memory with free(...)\r\n//  _aligned_malloc(size_t size, size_t alignment) on Windows, release with _aligned_free(...)\r\n//  posix_memalign(void ** ptr, size_t alignment, size_t size) on OSX, release with free(...)\r\nfloat * h_results = (float*) memalign(alignment, size);\r\n\r\n// Create an OpenCL buffer using the host pointer\r\nBuffer d_results = cl::Buffer(context, CL_MEM_USE_HOST_PTR, size, t_results);\r\n</code></pre>\r\n<h4 id=\"accessing-memory\">Accessing memory</h4>\r\nPerhaps the most misunderstood aspect of zero-copy buffers in OpenCL relates to the state of the buffer after being used in a kernel invocation. It is often thought that the memory in the buffers will be updated immediately after the kernel completes; however, the OpenCL specification does not guarantee this behavior. To ensure that a zero-copy buffer is properly updated prior to use, a developer must map (and unmap!) a buffer prior to use in host code. This is actually a quite simple process:\r\n<pre><code class=\"lang-c++\">// Get exclusive access to the buffer\r\nfloat * temp = (float*) queue.enqueueMapBuffer(d_results, CL_TRUE, CL_MAP_READ, 0, size);\r\n\r\n... use the mapped buffer\r\n\r\n// release the buffer back to OpenCL’s control\r\nqueue.enqueueUnmapMemObject(d_results, temp);\r\n</code></pre>\r\n<h4 id=\"further-reading\">Further reading</h4>\r\n<a href=\"https://software.intel.com/en-us/articles/getting-the-most-from-opencl-12-how-to-increase-performance-by-minimizing-buffer-copies-on-intel-processor-graphics\">Getting the Most from OpenCL™ 1.2: How to Increase Performance by Minimizing Buffer Copies on Intel® Processor Graphics</a>','Improving OpenCL performance using zero-copy buffers on Intel GPUs','','inherit','open','open','','8125-revision-v1','','','2015-04-09 15:17:43','2015-04-09 15:17:43','',8125,'http://sandbox.arrayfire.com/8125-revision-v1/',0,'revision','',0),(8149,18528,'2015-04-09 15:26:13','2015-04-09 15:26:13','One of the most powerful aspects of parallel programming on integrated GPUs is that you may avoid the O(N) copy operation associated with moving data from host to device memory. This feature can be particularly useful for applications that deal with real-time data streams, like video processing.\r\n<h4 id=\"method-1-let-opencl-allocate-memory-and-use-map-unmap-buffers\">Method 1: OpenCL allocation of zero-copy buffers</h4>\r\nThe first method of allocating zero-copy buffers is quite simple: let OpenCL do it for you. To create a buffer in this fashion simply specify the<code>CL_MEM_ALLOC_HOST_PTR</code> argument to the <code>cl::Buffer</code> constructor (or<code>clCreateBuffer</code> if you are using the C API):\r\n<pre><code class=\"lang-c++\">// Instruct OpenCL to allocate host memory\r\n::size_t size = N * sizeof(float)\r\nBuffer d_results(context, CL_MEM_ALLOC_HOST_PTR, size);\r\n\r\n... launch kernels, etc\r\n</code></pre>\r\n<h4 id=\"method-2-allocate-aligned-memory-and-use-map-unmap-buffers\">Method 2: Programmer-allocated aligned memory</h4>\r\nIn situations where you are streaming data or doing DMA between devices, it may be necessary to use aligned memory. In this situation, Intel OpenCL devices require that data be allocated with 4k alignment and be a multiple of 64 bytes (a cache line). At present AMD APUs follow this same alignment convention. Allocating memory in this fashion is quite simple:\r\n<pre><code class=\"lang-c++\">::size_t size = N * sizeof(float); // size must be a multiple of 64\r\n::size_t alignment = 4096;\r\n// Allocate aligned memory on the host. The particular function is OS-dependent.\r\n//  memalign(size_t alignment, size_t size) on Linux, release memory with free(...)\r\n//  _aligned_malloc(size_t size, size_t alignment) on Windows, release with _aligned_free(...)\r\n//  posix_memalign(void ** ptr, size_t alignment, size_t size) on OSX, release with free(...)\r\nfloat * h_results = (float*) memalign(alignment, size);\r\n\r\n// Create an OpenCL buffer using the host pointer\r\nBuffer d_results = cl::Buffer(context, CL_MEM_USE_HOST_PTR, size, t_results);\r\n</code></pre>\r\n<h4 id=\"accessing-memory\">Accessing zero-copy memory buffers</h4>\r\nPerhaps the most misunderstood aspect of zero-copy buffers in OpenCL relates to the state of the buffer after being used in a kernel invocation. It is often thought that the memory in the buffers will be updated immediately after the kernel completes; however, the OpenCL specification <strong>does not guarantee this behavior</strong>. Instead, it is up to the programmer to ensure that the buffer is updated by using OpenCL map/unmap buffer commands:\r\n<pre><code class=\"lang-c++\">// Get exclusive access to the buffer\r\nfloat * temp = (float*) queue.enqueueMapBuffer(d_results, CL_TRUE, CL_MAP_READ, 0, size);\r\n\r\n... use the mapped buffer\r\n\r\n// release the buffer back to OpenCL’s control\r\nqueue.enqueueUnmapMemObject(d_results, temp);\r\n</code></pre>\r\n<h4 id=\"further-reading\">Further reading</h4>\r\n<a href=\"https://software.intel.com/en-us/articles/getting-the-most-from-opencl-12-how-to-increase-performance-by-minimizing-buffer-copies-on-intel-processor-graphics\">Getting the Most from OpenCL™ 1.2: How to Increase Performance by Minimizing Buffer Copies on Intel® Processor Graphics</a>\r\n\r\n<a href=\"http://developer.amd.com/tools-and-sdks/opencl-zone/amd-accelerated-parallel-processing-app-sdk/opencl-optimization-guide/#50401315_pgfId-503784\">AMD OpenCL Optimization Guide: Mapping and zero-copy buffers</a>\r\n\r\n&nbsp;','Improving OpenCL performance using zero-copy buffers on integrated GPUs','','inherit','open','open','','8125-revision-v1','','','2015-04-09 15:26:13','2015-04-09 15:26:13','',8125,'http://sandbox.arrayfire.com/8125-revision-v1/',0,'revision','',0),(8150,18528,'2015-04-09 15:29:07','2015-04-09 15:29:07','One of the most powerful aspects of parallel programming on integrated GPUs is that you may avoid the O(N) copy operation associated with moving data from host to device memory. This feature can be particularly useful for applications that deal with real-time data streams, like video processing.\r\n<h4 id=\"method-1-let-opencl-allocate-memory-and-use-map-unmap-buffers\">Method 1: OpenCL allocation of zero-copy buffers</h4>\r\nThe first method of allocating zero-copy buffers is quite simple: let OpenCL do it for you. To create a buffer in this fashion simply specify the <code>CL_MEM_ALLOC_HOST_PTR</code> argument to the <code>cl::Buffer</code> constructor (or<code>clCreateBuffer</code> if you are using the C API):\r\n<pre><code class=\"lang-c++\">// Instruct OpenCL to allocate host memory\r\n::size_t size = N * sizeof(float)\r\nBuffer d_results(context, CL_MEM_ALLOC_HOST_PTR, size);\r\n\r\n... launch kernels, etc\r\n</code></pre>\r\n<h4 id=\"method-2-allocate-aligned-memory-and-use-map-unmap-buffers\">Method 2: Programmer-allocated aligned memory</h4>\r\nIn situations where you are streaming data or doing DMA between devices, it may be necessary to use aligned memory. In this situation, Intel OpenCL devices require that data be allocated with 4k alignment and be a multiple of 64 bytes (a cache line). At present AMD APUs follow this same alignment convention. Aligned allocation requires calls to OS-specific functions, after the memory is allocated, you can use create a buffer using CL_MEM_USE_HOST_PTR function:\r\n<pre><code class=\"lang-c++\">::size_t size = N * sizeof(float); // size must be a multiple of 64\r\n::size_t alignment = 4096;\r\n// Allocate aligned memory on the host. The particular function is OS-dependent.\r\n//  memalign(size_t alignment, size_t size) on Linux, release memory with free(...)\r\n//  _aligned_malloc(size_t size, size_t alignment) on Windows, release with _aligned_free(...)\r\n//  posix_memalign(void ** ptr, size_t alignment, size_t size) on OSX, release with free(...)\r\nfloat * h_results = (float*) memalign(alignment, size);\r\n\r\n// Create an OpenCL buffer using the host pointer\r\nBuffer d_results = cl::Buffer(context, CL_MEM_USE_HOST_PTR, size, t_results);\r\n</code></pre>\r\n<h4 id=\"accessing-memory\">Accessing zero-copy memory buffers</h4>\r\nPerhaps the most misunderstood aspect of zero-copy buffers in OpenCL relates to the state of the buffer after being used in a kernel invocation. It is often thought that the memory in the buffers will be updated immediately after the kernel completes; however, the OpenCL specification <strong>does not guarantee this behavior</strong>. Instead, it is up to the programmer to ensure that the buffer is updated by using OpenCL map/unmap buffer commands:\r\n<pre><code class=\"lang-c++\">// Get exclusive access to the buffer\r\nfloat * temp = (float*) queue.enqueueMapBuffer(d_results, CL_TRUE, CL_MAP_READ, 0, size);\r\n\r\n... use the mapped buffer\r\n\r\n// release the buffer back to OpenCL’s control\r\nqueue.enqueueUnmapMemObject(d_results, temp);\r\n</code></pre>\r\n<h4 id=\"further-reading\">Further reading</h4>\r\n<a href=\"https://software.intel.com/en-us/articles/getting-the-most-from-opencl-12-how-to-increase-performance-by-minimizing-buffer-copies-on-intel-processor-graphics\">Getting the Most from OpenCL™ 1.2: How to Increase Performance by Minimizing Buffer Copies on Intel® Processor Graphics</a>\r\n\r\n<a href=\"http://developer.amd.com/tools-and-sdks/opencl-zone/amd-accelerated-parallel-processing-app-sdk/opencl-optimization-guide/#50401315_pgfId-503784\">AMD OpenCL Optimization Guide: Mapping and zero-copy buffers</a>\r\n\r\n&nbsp;','Improving OpenCL performance using zero-copy buffers on integrated GPUs','','inherit','open','open','','8125-revision-v1','','','2015-04-09 15:29:07','2015-04-09 15:29:07','',8125,'http://sandbox.arrayfire.com/8125-revision-v1/',0,'revision','',0),(8151,18528,'2015-04-09 15:33:25','2015-04-09 15:33:25','One of the most powerful aspects of parallel programming on integrated GPUs is that you may avoid the O(N) copy operation associated with moving data from host to device memory. This feature can be particularly useful for applications that deal with real-time data streams, like video processing.\r\n<h4 id=\"method-1-let-opencl-allocate-memory-and-use-map-unmap-buffers\">Method 1: OpenCL allocation of zero-copy buffers</h4>\r\nThe first method of allocating zero-copy buffers is quite simple: let OpenCL do it for you. To create a buffer in this fashion simply specify the <code>CL_MEM_ALLOC_HOST_PTR</code> argument to the <code>cl::Buffer</code> constructor (or<code>clCreateBuffer</code> if you are using the C API):\r\n<pre><code class=\"lang-c++\">// Instruct OpenCL to allocate host memory\r\n::size_t size = N * sizeof(float)\r\nBuffer d_results(context, CL_MEM_ALLOC_HOST_PTR, size);\r\n\r\n... launch kernels, etc\r\n</code></pre>\r\n<h4 id=\"method-2-allocate-aligned-memory-and-use-map-unmap-buffers\">Method 2: Programmer-allocated aligned memory</h4>\r\nIn situations where you are streaming data or doing DMA between devices, it may be necessary to use aligned memory. In this situation, Intel OpenCL devices require that data be allocated with 4k alignment and be a multiple of 64 bytes (a cache line). At present AMD APUs follow this same alignment convention. Aligned allocation requires calls to OS-specific functions, after the memory is allocated, you can use create a buffer using CL_MEM_USE_HOST_PTR function:\r\n<pre><code class=\"lang-c++\">::size_t size = N * sizeof(float); // size must be a multiple of 64\r\n::size_t alignment = 4096;\r\n// Allocate aligned memory on the host. The particular function is OS-dependent.\r\n//  memalign(size_t alignment, size_t size) on Linux, release memory with free(...)\r\n//  _aligned_malloc(size_t size, size_t alignment) on Windows, release with _aligned_free(...)\r\n//  posix_memalign(void ** ptr, size_t alignment, size_t size) on OSX, release with free(...)\r\nfloat * h_results = (float*) memalign(alignment, size);\r\n\r\n// Create an OpenCL buffer using the host pointer\r\nBuffer d_results = cl::Buffer(context, CL_MEM_USE_HOST_PTR, size, t_results);\r\n</code></pre>\r\n<h4 id=\"accessing-memory\">Accessing zero-copy memory buffers</h4>\r\nPerhaps the most misunderstood aspect of zero-copy buffers in OpenCL relates to the state of the buffer after being used in a kernel invocation. It is often thought that the memory in the buffers will be updated immediately after the kernel completes; however, the OpenCL specification <strong>does not guarantee this behavior</strong>. Instead, it is up to the programmer to ensure that the buffer is updated by using OpenCL map/unmap buffer commands:\r\n<pre><code class=\"lang-c++\">// Get exclusive access to the buffer\r\nfloat * temp = (float*) queue.enqueueMapBuffer(d_results, CL_TRUE, CL_MAP_READ, 0, size);\r\n\r\n... use the mapped buffer\r\n\r\n// release the buffer back to OpenCL’s control\r\nqueue.enqueueUnmapMemObject(d_results, temp);\r\n</code></pre>\r\n<h4>Benchmarking</h4>\r\n<h4></h4>\r\n<h4 id=\"further-reading\">Further reading</h4>\r\n<a href=\"https://software.intel.com/en-us/articles/getting-the-most-from-opencl-12-how-to-increase-performance-by-minimizing-buffer-copies-on-intel-processor-graphics\">Getting the Most from OpenCL™ 1.2: How to Increase Performance by Minimizing Buffer Copies on Intel® Processor Graphics</a>\r\n\r\n<a href=\"http://developer.amd.com/tools-and-sdks/opencl-zone/amd-accelerated-parallel-processing-app-sdk/opencl-optimization-guide/#50401315_pgfId-503784\">AMD OpenCL Optimization Guide: Mapping and zero-copy buffers</a>\r\n\r\n&nbsp;','Improving OpenCL performance using zero-copy buffers on integrated GPUs','','inherit','open','open','','8125-revision-v1','','','2015-04-09 15:33:25','2015-04-09 15:33:25','',8125,'http://sandbox.arrayfire.com/8125-revision-v1/',0,'revision','',0),(8152,18528,'2015-04-09 15:56:37','2015-04-09 15:56:37','One of the most powerful aspects of parallel program on integrated GPUs is taking advantage of shared memory and caches. The best example of this is sharing common data between the CPU and GPU via. zero-copy buffers. This technique permits your program to avoid the O(N) cost of copying data to/from the GPU. This feature is particularly useful for applications that deal with real-time data streams, like video processing.\r\n\r\nCreating zero copy buffers is not that difficult, but there is one caveat when it comes to using the buffers. First, lets consider how to make zero-copy buffers:\r\n<h4 id=\"method-1-let-opencl-allocate-memory-and-use-map-unmap-buffers\">Method 1: OpenCL allocation of zero-copy buffers</h4>\r\nThe first method of allocating zero-copy buffers is quite simple: let OpenCL do it for you. To create a buffer in this fashion simply specify the <code>CL_MEM_ALLOC_HOST_PTR</code> argument to the <code>cl::Buffer</code> constructor (or<code>clCreateBuffer</code> if you are using the C API):\r\n<pre><code class=\"lang-c++\">// Instruct OpenCL to allocate host memory\r\n::size_t size = N * sizeof(float)\r\nBuffer d_results(context, CL_MEM_ALLOC_HOST_PTR, size);\r\n\r\n... launch kernels, etc\r\n</code></pre>\r\n<h4 id=\"method-2-allocate-aligned-memory-and-use-map-unmap-buffers\">Method 2: Programmer-allocated aligned memory</h4>\r\nIn situations where you are streaming data or doing DMA between devices, it may be necessary to use aligned memory. In this situation, Intel OpenCL devices require that data be allocated with 4k alignment and be a multiple of 64 bytes (a cache line). At present AMD APUs follow this same alignment convention. Aligned allocation requires calls to OS-specific functions, after the memory is allocated, you can use create a buffer using CL_MEM_USE_HOST_PTR function:\r\n<pre><code class=\"lang-c++\">::size_t size = N * sizeof(float); // size must be a multiple of 64\r\n::size_t alignment = 4096;\r\n// Allocate aligned memory on the host. The particular function is OS-dependent.\r\n//  memalign(size_t alignment, size_t size) on Linux, release memory with free(...)\r\n//  _aligned_malloc(size_t size, size_t alignment) on Windows, release with _aligned_free(...)\r\n//  posix_memalign(void ** ptr, size_t alignment, size_t size) on OSX, release with free(...)\r\nfloat * h_results = (float*) memalign(alignment, size);\r\n\r\n// Create an OpenCL buffer using the host pointer\r\nBuffer d_results = cl::Buffer(context, CL_MEM_USE_HOST_PTR, size, t_results);\r\n</code></pre>\r\n<h4 id=\"accessing-memory\">Accessing zero-copy memory buffers</h4>\r\nAfter your buffers are created, how do we access the data contained in them? Given method 2, one might think your code could directly access the elements of \"h_results\", but this probably won\'t work. Perhaps the most misunderstood aspect of zero-copy buffers in OpenCL relates to the state of the buffer after being used in a kernel invocation. It is often thought that the memory in the buffers will be updated immediately after the kernel completes; however, the OpenCL specification <strong>does not guarantee this behavior</strong>. Instead, it is up to the programmer to ensure that the buffer is correctly updated prior to accessing the data. To do so, simply use the OpenCL map/unmap buffer commands:\r\n<pre><code class=\"lang-c++\">// Get exclusive access to the buffer\r\nfloat * temp = (float*) queue.enqueueMapBuffer(d_results, CL_TRUE, CL_MAP_READ, 0, size);\r\n\r\n... use the mapped buffer\r\n\r\n// release the buffer back to OpenCL’s control\r\nqueue.enqueueUnmapMemObject(d_results, temp);</code></pre>\r\nNote that you must unmap the buffer after use to inform OpenCL that it has been given control over the memory location.\r\n<h4 id=\"further-reading\">Further reading</h4>\r\n<a href=\"https://software.intel.com/en-us/articles/getting-the-most-from-opencl-12-how-to-increase-performance-by-minimizing-buffer-copies-on-intel-processor-graphics\">Getting the Most from OpenCL™ 1.2: How to Increase Performance by Minimizing Buffer Copies on Intel® Processor Graphics</a>\r\n\r\n<a href=\"http://developer.amd.com/tools-and-sdks/opencl-zone/amd-accelerated-parallel-processing-app-sdk/opencl-optimization-guide/#50401315_pgfId-503784\">AMD OpenCL Optimization Guide: Mapping and zero-copy buffers</a>\r\n\r\n&nbsp;','Improving OpenCL performance using zero-copy buffers on integrated GPUs','','inherit','open','open','','8125-revision-v1','','','2015-04-09 15:56:37','2015-04-09 15:56:37','',8125,'http://sandbox.arrayfire.com/8125-revision-v1/',0,'revision','',0),(8153,18528,'2015-04-09 16:03:06','2015-04-09 16:03:06','One of the most powerful aspects of parallel program on integrated GPUs is taking advantage of shared memory and caches. The best example of this is sharing common data between the CPU and GPU via. zero-copy buffers. This technique permits your program to avoid the O(N) cost of copying data to/from the GPU. This feature is particularly useful for applications that deal with real-time data streams, like video processing.\r\n\r\n<!--more-->\r\n\r\nCreating zero copy buffers is not that difficult, but there is one caveat when it comes to using the buffers. First, lets consider how to make zero-copy buffers:\r\n<h4 id=\"method-1-let-opencl-allocate-memory-and-use-map-unmap-buffers\">Method 1: OpenCL allocation of zero-copy buffers</h4>\r\nThe first method of allocating zero-copy buffers is quite simple: let OpenCL do it for you. To create a buffer in this fashion simply specify the <code>CL_MEM_ALLOC_HOST_PTR</code> argument to the <code>cl::Buffer</code> constructor (or<code>clCreateBuffer</code> if you are using the C API):\r\n<pre><code class=\"lang-c++\">// Instruct OpenCL to allocate host memory\r\n::size_t size = N * sizeof(float)\r\nBuffer d_results(context, CL_MEM_ALLOC_HOST_PTR, size);\r\n\r\n... launch kernels, etc\r\n</code></pre>\r\n<h4 id=\"method-2-allocate-aligned-memory-and-use-map-unmap-buffers\">Method 2: Programmer-allocated aligned memory</h4>\r\nIn situations where you are streaming data or doing DMA between devices, it may be necessary to use aligned memory. In this situation, Intel OpenCL devices require that data be allocated with 4k alignment and be a multiple of 64 bytes (a cache line). At present AMD APUs follow this same alignment convention. Aligned allocation requires calls to OS-specific functions, after the memory is allocated, you can use create a buffer using CL_MEM_USE_HOST_PTR function:\r\n<pre><code class=\"lang-c++\">::size_t size = N * sizeof(float); // size must be a multiple of 64\r\n::size_t alignment = 4096;\r\n// Allocate aligned memory on the host. The particular function is OS-dependent.\r\n//  memalign(size_t alignment, size_t size) on Linux, release memory with free(...)\r\n//  _aligned_malloc(size_t size, size_t alignment) on Windows, release with _aligned_free(...)\r\n//  posix_memalign(void ** ptr, size_t alignment, size_t size) on OSX, release with free(...)\r\nfloat * h_results = (float*) memalign(alignment, size);\r\n\r\n// Create an OpenCL buffer using the host pointer\r\nBuffer d_results = cl::Buffer(context, CL_MEM_USE_HOST_PTR, size, t_results);\r\n</code></pre>\r\n<h4 id=\"accessing-memory\">Accessing zero-copy memory buffers</h4>\r\nAfter your buffers are created, how do we access the data contained in them? Given method 2, one might think your code could directly access the elements of \"h_results\", but this probably won\'t work. Perhaps the most misunderstood aspect of zero-copy buffers in OpenCL relates to the state of the buffer after being used in a kernel invocation. It is often thought that the memory in the buffers will be updated immediately after the kernel completes; however, the OpenCL specification <strong>does not guarantee this behavior</strong>. Instead, it is up to the programmer to ensure that the buffer is correctly updated prior to accessing the data. To do so, simply use the OpenCL map/unmap buffer commands:\r\n<pre><code class=\"lang-c++\">// Get exclusive access to the buffer\r\nfloat * temp = (float*) queue.enqueueMapBuffer(d_results, CL_TRUE, CL_MAP_READ, 0, size);\r\n\r\n... use the mapped buffer\r\n\r\n// release the buffer back to OpenCL’s control\r\nqueue.enqueueUnmapMemObject(d_results, temp);</code></pre>\r\nNote that you must unmap the buffer after use to inform OpenCL that it has been given control over the memory location.\r\n<h4 id=\"further-reading\">Further reading</h4>\r\n<a href=\"https://software.intel.com/en-us/articles/getting-the-most-from-opencl-12-how-to-increase-performance-by-minimizing-buffer-copies-on-intel-processor-graphics\">Getting the Most from OpenCL™ 1.2: How to Increase Performance by Minimizing Buffer Copies on Intel® Processor Graphics</a>\r\n\r\n<a href=\"http://developer.amd.com/tools-and-sdks/opencl-zone/amd-accelerated-parallel-processing-app-sdk/opencl-optimization-guide/#50401315_pgfId-503784\">AMD OpenCL Optimization Guide: Mapping and zero-copy buffers</a>\r\n\r\n&nbsp;','Improving OpenCL performance using zero-copy buffers on integrated GPUs','','inherit','open','open','','8125-revision-v1','','','2015-04-09 16:03:06','2015-04-09 16:03:06','',8125,'http://sandbox.arrayfire.com/8125-revision-v1/',0,'revision','',0),(8154,18528,'2015-04-09 16:06:03','2015-04-09 16:06:03','One of the most powerful aspects of parallel program on integrated GPUs is taking advantage of shared memory and caches. The best example of this is sharing common data between the CPU and GPU via. zero-copy buffers. This technique permits your program to avoid the O(N) cost of copying data to/from the GPU. This feature is particularly useful for applications that deal with real-time data streams, like video processing.\r\n\r\n<!--more-->\r\n\r\nCreating zero copy buffers is not that difficult, but there is one caveat when it comes to using the buffers. First, lets consider how to make zero-copy buffers:\r\n<h4 id=\"method-1-let-opencl-allocate-memory-and-use-map-unmap-buffers\">Method 1: OpenCL allocation of zero-copy buffers</h4>\r\nThe first method of allocating zero-copy buffers is quite simple: let OpenCL do it for you. To create a buffer in this fashion simply specify the <code>CL_MEM_ALLOC_HOST_PTR</code> argument to the <code>cl::Buffer</code> constructor (or<code>clCreateBuffer</code> if you are using the C API):\r\n<pre><code class=\"lang-c++\">// Instruct OpenCL to allocate host memory\r\n::size_t size = N * sizeof(float)\r\nBuffer d_results(context, CL_MEM_ALLOC_HOST_PTR, size);\r\n\r\n... launch kernels, etc\r\n</code></pre>\r\n<h4 id=\"method-2-allocate-aligned-memory-and-use-map-unmap-buffers\">Method 2: Programmer-allocated aligned memory</h4>\r\nIn situations where you are streaming data or doing DMA between devices, it may be necessary to use aligned memory. In this situation, Intel OpenCL devices require that data be allocated with 4k alignment and be a multiple of 64 bytes (a cache line). At present AMD APUs follow this same alignment convention. Aligned allocation requires calls to OS-specific functions, after the memory is allocated, you can use create a buffer using CL_MEM_USE_HOST_PTR function:\r\n<pre><code class=\"lang-c++\">::size_t size = N * sizeof(float); // size must be a multiple of 64\r\n::size_t alignment = 4096;\r\n// Allocate aligned memory on the host. The particular function is OS-dependent.\r\n//  memalign(size_t alignment, size_t size) on Linux, release memory with free(...)\r\n//  _aligned_malloc(size_t size, size_t alignment) on Windows, release with _aligned_free(...)\r\n//  posix_memalign(void ** ptr, size_t alignment, size_t size) on OSX, release with free(...)\r\nfloat * h_results = (float*) memalign(alignment, size);\r\n\r\n// Create an OpenCL buffer using the host pointer\r\nBuffer d_results = cl::Buffer(context, CL_MEM_USE_HOST_PTR, size, t_results);\r\n</code></pre>\r\n<h4 id=\"accessing-memory\">Accessing zero-copy memory buffers</h4>\r\nAfter your buffers are created, how do we access the data contained in them? Given method 2, one might think your code could directly access the elements of \"h_results\", but this probably won\'t work. Perhaps the most misunderstood aspect of zero-copy buffers in OpenCL relates to the state of the buffer after being used in a kernel invocation. It is often thought that the memory in the buffers will be updated immediately after the kernel completes; however, the OpenCL specification <strong>does not guarantee this behavior</strong>. Instead, it is up to the programmer to ensure that the buffer is correctly updated prior to accessing the data. To do so, simply use the OpenCL map/unmap buffer commands:\r\n<pre><code class=\"lang-c++\">// Get exclusive access to the buffer\r\nfloat * temp = (float*) queue.enqueueMapBuffer(d_results, CL_TRUE, CL_MAP_READ, 0, size);\r\n\r\n... use the mapped buffer\r\n\r\n// release the buffer back to OpenCL’s control\r\nqueue.enqueueUnmapMemObject(d_results, temp);</code></pre>\r\nNote that you must unmap the buffer after use to inform OpenCL that it has been given control over the memory location.\r\n<h4 id=\"further-reading\">Further reading</h4>\r\n<a href=\"https://software.intel.com/en-us/articles/getting-the-most-from-opencl-12-how-to-increase-performance-by-minimizing-buffer-copies-on-intel-processor-graphics\">Getting the Most from OpenCL™ 1.2: How to Increase Performance by Minimizing Buffer Copies on Intel® Processor Graphics</a>\r\n\r\n<a href=\"http://developer.amd.com/tools-and-sdks/opencl-zone/amd-accelerated-parallel-processing-app-sdk/opencl-optimization-guide/#50401315_pgfId-503784\">AMD OpenCL Optimization Guide: Mapping and zero-copy buffers</a>\r\n\r\n&nbsp;','Using zero-copy buffers on integrated GPUs','','inherit','open','open','','8125-revision-v1','','','2015-04-09 16:06:03','2015-04-09 16:06:03','',8125,'http://sandbox.arrayfire.com/8125-revision-v1/',0,'revision','',0),(8157,7,'2015-04-17 19:19:18','2015-04-17 19:19:18','[content_band inner_container=\"true\" no_margin=\"true\" border=\"bottom\" padding_top=\"40px\" padding_bottom=\"40px\"][column type=\"one-half\"] [custom_headline type=\"left\" level=\"h3\" ]About[/custom_headline]ArrayFire is the software shop for CUDA and OpenCL. Since 2007, ArrayFire has offered the most productive solutions for accelerating code using GPUs. Today, ArrayFire delivers products which are used to accelerate C, C++, and Fortran codes on CUDA GPUs and OpenCL devices. ArrayFire has thousands of customers. These customers come from a wide range of industries, including defense and intelligence, life science, oil and gas, finance, manufacturing, media, and others.\r\n\r\nArrayFire has had success accelerating numerous application types, including math and numerical algorithms, image processing, signal processing, statistics, optimization, and more. Many ArrayFire customers are realizing 100X speed-up with much less effort than is typically required to accelerate code.[/column][column type=\"one-half\" last=\"true\" fade=\"true\"][image src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/dj-Flame.png\"] [/column]\r\n<div id=\"contact\"></div>\r\n[line][column type=\"one-third\"][custom_headline type=\"center\" level=\"h5\" accent=\"false\"]Email[/custom_headline]\r\n<p style=\"text-align: center;\">Sales: sales@arrayfire.com\r\nSupport: support@arrayfire.com\r\nCareers: jobs@arrayfire.com[/column]</p>\r\n[column type=\"one-third\"][custom_headline type=\"center\" level=\"h5\" accent=\"false\"]Phone[/custom_headline]\r\n<p style=\"text-align: center;\">Sales: +1 (800) 570-1941 x 1\r\nTechnical Support: +1 (800) 570-1941 x 2 [/column]</p>\r\n[column type=\"one-third\" last=\"true\"][custom_headline type=\"center\" level=\"h5\" accent=\"false\"]Headquarters[/custom_headline]\r\n<p style=\"text-align: center;\">3405 Piedmont Rd NE STE 100\r\nAtlanta, GA 30305[/column] [/content_band]</p>\r\n[content_band bg_color=\"#f2f2f2\" inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"40px\" padding_bottom=\"40px\" ][custom_headline type=\"left\" level=\"h3\" ]Careers[/custom_headline]As a global leader in GPU computing software, our business opportunities are always expanding. We are constantly searching for talented, qualified individuals to join the ArrayFire team. ArrayFire is committed to providing employees with the opportunity to grow and learn, the freedom to express ideas and contribute to new developments, and the motivation to succeed. To start the application process, simply email us your resume and let us know which position(s) you\'re interested in.\r\n\r\n&nbsp;\r\n\r\n[column type=\"one-third\"][promo image=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/little-boba-fett.png\" alt=\"Alt Text\"][custom_headline type=\"left\" level=\"h5\"  class=\"mtn\"]Software Engineer - Atlanta, GA[/custom_headline]\r\n\r\n<strong>Responsibilities:</strong> Develop in C/C++, Fortran, CUDA, and OpenCL. Respond to forum posts and customer support tickets.\r\n\r\n<strong>Qualifications</strong>: A background in any of high-performance computing, operating systems, or compilers. Several years of C/C++ and at least one year of CUDA or similar technology. Familiarity with Fortran is a plus. Undergraduate or graduate work in CS or related field. [/promo][/column]\r\n\r\n[column type=\"one-third\"][promo image=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/uncle-sam.png\" alt=\"Alt Text\"] [custom_headline type=\"left\" level=\"h5\"  class=\"mtn\"]Application Engineer - Atlanta, GA[/custom_headline]\r\n\r\n<strong>Responsibilities: </strong>Work closely with customers to develop software solutions using our products. Develop technical marketing materials including demos, webinars, tutorials, etc. Respond to forum posts and customer support tickets.\r\n\r\n<strong>Qualifications:</strong> Undergraduate or graduate work in CS or related field. Strong programming skills in C/C++. Excellent communication skills.[/promo][/column]\r\n\r\n[column type=\"one-third\" last=\"true\"][promo image=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/i-see-pride-i-see-power.png\" alt=\"Alt Text\"][custom_headline type=\"left\" level=\"h5\" class=\"mtn\"]Web/Dev Engineer - Atlanta, GA[/custom_headline]\r\n\r\n<strong>Responsibilities: </strong>Develop PHP/MySQL backend infrastructure with basic HTML/CSS/JavaScript frontend work. Developing lightweight webapps for system monitoring. Maintaining Wordpress and SalesForce integration. Maintaining server/cluster infrastructure.\r\n\r\n<strong>Qualifications:</strong> Strong PHP and MySQL experience. Very comfortable at a shell prompt. Proficient in HTML, CSS, and JavaScript. Familiarity with Wordpress or SalesForce is a plus.[/promo][/column][/content_band]','Company','','inherit','open','open','','329-revision-v1','','','2015-04-17 19:19:18','2015-04-17 19:19:18','',329,'http://sandbox.arrayfire.com/329-revision-v1/',0,'revision','',0),(8160,7,'2015-04-24 13:47:17','2015-04-24 13:47:17','[content_band inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"10px\" padding_bottom=\"40px\"][column type=\"one-half\" ][custom_headline type=\"left\" level=\"h2\" ]Faster code[/custom_headline]\r\n\r\nArrayFire allows your code to run its fastest. It beats efforts to manually write CUDA or OpenCL kernels. It beats compiler optimizations. It beats other libraries. ArrayFire is the simply best way to accelerate your code.\r\n\r\nWant proof? Check out our benchmarks. All benchmarks were performed on a NVIDIA Tesla C2050 with an Intel i7-950 processor (updates coming soon). The benchmarks compare ArrayFire with several popular CPU-based acceleration libraries, including <a href=\"http://software.intel.com/en-us/articles/intel-mkl/\" target=\"_new\">Intel Math Kernel Library</a>, <a href=\"http://software.intel.com/en-us/articles/intel-ipp/\" target=\"_new\">Intel Integrated Performance Primitives</a>, <a href=\"http://eigen.tuxfamily.org/index.php?title=Main_Page\" target=\"_new\">Eigen</a>, and <a href=\"http://arma.sourceforge.net/\" target=\"_new\">Armadillo</a>.\r\n\r\n[button type=\"flat\" shape=\"rounded\" size=\"regular\" href=\"http://sandbox.arrayfire.com/download\" title=\"Download now!\"]Download ArrayFire[/button]\r\n\r\n&nbsp;\r\n\r\n[/column]\r\n\r\n[column type=\"one-half\"  last=\"true\" fade=\"true\" fade_animation=\"in-from-left\" ][gap size=\"10%\"][tab_nav type=\"four-up\"][tab_nav_item title=\"Base\" active=\"true\"][tab_nav_item title=\"Linear Algebra\" active=\"\"][tab_nav_item title=\"Convolution\" active=\"\"][tab_nav_item title=\"Utility\" active=\"\"][/tab_nav][tabs][tab active=\"true\"][accordion id=\"my-accordion\"] [accordion_item title=\"Matrix Multiply\" parent_id=\"my-accordion\"]<img class=\"aligncenter wp-image-351 size-full\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/matrix_multiply-e1409845945961.png\" alt=\"Matrix Multiply\" width=\"482\" height=\"344\" />[/accordion_item] [accordion_item title=\"Matrix Transpose\" parent_id=\"my-accordion\"]<img class=\"aligncenter wp-image-352 size-full\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/matrix_transpose-e1409846117548.png\" alt=\"Matrix Transpose\" width=\"482\" height=\"344\" />[/accordion_item] [accordion_item title=\"FFT\" parent_id=\"my-accordion\"]<img class=\"aligncenter wp-image-349 size-full\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/fft-e1409846374468.png\" alt=\"FFT\" width=\"491\" height=\"350\" />[/accordion_item][/accordion][/tab][tab][accordion id=\"my-accordion\"] [accordion_item title=\"LU\" parent_id=\"my-accordion\"]<img class=\"aligncenter size-full wp-image-350\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/lu-e1409846254351.png\" alt=\"LU\" width=\"491\" height=\"350\" />[/accordion_item] [accordion_item title=\"SVD\" parent_id=\"my-accordion\"]<img class=\"aligncenter size-full wp-image-357\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/svd-e1409846164788.png\" alt=\"SVD\" width=\"491\" height=\"350\" />[/accordion_item] [accordion_item title=\"Solve: Ax=b\" parent_id=\"my-accordion\"]<img class=\"aligncenter size-full wp-image-354\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/solve-e1409846072990.png\" alt=\"Solve\" width=\"491\" height=\"350\" />[/accordion_item][/accordion][/tab][tab][accordion id=\"my-accordion\"] [accordion_item title=\"Separable Convolution\" parent_id=\"my-accordion\"]<img class=\"aligncenter size-full wp-image-348\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/convs-e1409846211948.png\" alt=\"Separable Convolution\" width=\"491\" height=\"350\" />[/accordion_item] [accordion_item title=\"CONV\" parent_id=\"my-accordion\"]<img class=\"aligncenter size-full wp-image-347\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/conv-e1409846333930.png\" alt=\"Conv\" width=\"491\" height=\"350\" />[/accordion_item][/accordion][/tab][tab][accordion id=\"my-accordion\"] [accordion_item title=\"Sum\" parent_id=\"my-accordion\"]<img class=\"aligncenter size-full wp-image-356\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/sum-e1409846033653.png\" alt=\"sum\" width=\"491\" height=\"350\" />[/accordion_item] [accordion_item title=\"Sort\" parent_id=\"my-accordion\"]<img class=\"aligncenter size-full wp-image-355\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/sort-e1409845987155.png\" alt=\"sort\" width=\"491\" height=\"350\" />[/accordion_item] [accordion_item title=\"Cumulative Sum\" parent_id=\"my-accordion\"]<img class=\"aligncenter size-full wp-image-353\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/scan-e1409845901355.png\" alt=\"scan\" width=\"491\" height=\"350\" />[/accordion_item][/accordion][/tab][/tabs][/column][/content_band]\r\n\r\n[content_band bg_color=\"#f2f2f2\" inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"40px\" padding_bottom=\"40px\"]\r\n\r\n[column type=\"one-half\"][gap size=\"10%\"]<img class=\"aligncenter wp-image-4801 size-full\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/comingatyou-e1409844224608.png\" alt=\"comingatyou\" width=\"433\" height=\"302\" />\r\n\r\n[gap size=\"13%\"][/column][column type=\"one-half\" last=\"true\"][custom_headline type=\"left\" level=\"h2\"]Hardware neutral[/custom_headline]\r\n\r\nArrayFire supports CUDA-capable NVIDIA GPUs, OpenCL devices, and a C-programming backend. The OpenCL devices include AMD GPUs/APUs and Intel Xeon Phi co-processors. It also supports mobile OpenCL devices from ARM, Qualcomm, and others. With ArrayFire, you can easily switch between CUDA or OpenCL without changing your code.\r\n\r\nArrayFire is a high-performance software library designed for maximum productivity and speed without the hassle of writing difficult low-level device code. Each of <a href=\"http://www.sandbox.arrayfire.com/docs/modules.htm\">ArrayFire\'s functions</a> has been hand-tuned by our CUDA and OpenCL experts. [gap size=\"5%\"]\r\n\r\n[/column]\r\n\r\n[/content_band]\r\n\r\n[content_band inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"40px\" padding_bottom=\"40px\"]\r\n\r\n[column type=\"one-half\"][custom_headline type=\"left\" level=\"h2\"]Open Source[/custom_headline]\r\n\r\nArrayFire is open source—it’s all there and it’s all free. We\'re big fans of freedom, collaboration, and perpetual motion. Adapt ArrayFire to meet your needs, watch it blaze, and tell us all about it!\r\n\r\nBe sure to check out all of the ArrayFire functions (and a lot more!) in our <a href=\"http://www.sandbox.arrayfire.com/docs/index.htm\">documentation</a>. And don’t forget to visit our <a href=\"https://groups.google.com/forum/#!forum/arrayfire-users\">forums</a> to connect with the ArrayFire community and pick up acceleration tips and best practices.\r\n\r\n[/column]\r\n\r\n[column type=\"one-half\" last=\"true\"][gap size=\"3%\"][counter num_start=\"0\" num_end=\"1010\" num_speed=\"5000\"  num_color=\"#f08027\" text_below=\"stars\" text_color=\"#212c43\"]\r\n\r\n[counter num_start=\"0\" num_end=\"115\" num_speed=\"5000\"  num_color=\"#f08027\"  text_below=\"forks\" text_color=\"#212c43\"]\r\n\r\n[counter num_start=\"0\" num_end=\"240\" num_speed=\"5000\"  num_color=\"#f08027\"  text_below=\"functions\" text_color=\"#212c43\"]\r\n\r\n[counter num_start=\"0\" num_end=\"1703\" num_speed=\"5000\"  num_color=\"#f08027\"  text_below=\"commits\" text_color=\"#212c43\"]\r\n\r\n[/column][/content_band]','Why ArrayFire?','','inherit','open','open','','7054-revision-v1','','','2015-04-24 13:47:17','2015-04-24 13:47:17','',7054,'http://sandbox.arrayfire.com/7054-revision-v1/',0,'revision','',0),(8172,7,'2015-04-30 19:55:27','2015-04-30 19:55:27','Missed visiting ArrayFire at GTC this year? We\'ve got you covered! You can now check out the recordings of all our <a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgzd7\" target=\"_blank\">GTC 2015 talks and tutorials</a> at your own convenience. Learn about accelerating your code from the best in the business.\r\n<h3>Talks</h3>\r\n<h5><span style=\"text-decoration: underline;\"><a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgx47\" target=\"_blank\">Real-Time and High Resolution Feature Tracking and Object Recognition</a></span></h5>\r\n<h6>Peter Andreas Entschev</h6>\r\nThis session will cover real-time feature tracking and object recognition in high resolution videos using GPUs and productive software libraries including ArrayFire. Feature tracking and object recognition are computer vision problems that have challenged researchers for decades. Over the last 15 years, numerous approaches were proposed to solve these problems, some of the most important being SIFT, SURF and ORB. Traditionally, these approaches are so computationally complex that processing more than a few frames per second is impossible. Using an NVIDIA K20 GPU with ORB, we are able to process more than 30 frames per second on images in the order of 10000x10000 pixels. Multiple quality and timing benchmarks will be presented, covering some of the most robust feature tracking methods.\r\n<h5><span style=\"text-decoration: underline;\"><a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgxfp\" target=\"_blank\">Fast Triangle Counting for Social Network Analytics on the K40</a></span></h5>\r\n<h6>Oded Green</h6>\r\nIn this session we will explore a new approach for counting triangles in networks that partitions the work at multiple parallel granularties. This new approach is highly scalable and is appropriate for both sparse and dense networks.\r\n<h3>Tutorials</h3>\r\n<h5><span style=\"text-decoration: underline;\"><a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgxyc\" target=\"_blank\">Introduction to GPU Computing Using the ArrayFire Acceleration Library</a></span></h5>\r\n<h6>John Melonakos</h6>\r\nNew to GPU computing and don\'t know where to start? Are you an expert in GPU computing and tired of writing your kernels from scratch? If that is the case, this tutorial is perfect for you! In today\'s tutorial we will introduce you to a simple and intuitive API that will make GPU computing highly productive and stress free. Last November, the ArrayFire library was open-source and made available to the general public. In today\'s talk we will walk you through the installation process, introduce the ArrayFire API, and show several applications that have been developed using the API.\r\n<h5><span style=\"text-decoration: underline;\"><a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgy4h\" target=\"_blank\">Image Learning and Computer Vision in CUDA</a></span></h5>\r\n<h6>Peter Andreas Entschev</h6>\r\nAnalyzing a massive data set? Need fast results? Need computer vision algorithms? Not sure when and where to start? The answer is here and now! In this tutorial we will give you the tools to bring your favorite computer vision algorithm to life. In this tutorial we will go over key challenges for implementing computer vision and machine learning algorithms on the GPU. We will walk you through several computer vision algorithms for the GPU (ORB, Fast, SIFT) and give you the hands experience to implement you own algorithms.\r\n<h5><span style=\"text-decoration: underline;\"><a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgyxk\" target=\"_blank\">Simplified Machine Learning Programming for CUDA</a></span></h5>\r\n<h6>Umar Arshad</h6>\r\nLooking for a simplified way to program machine learning algorithms? This tutorial will give you hands on experience implementing Deep Belief Networks using ArrayFire and other CUDA tools. Learn the best practices for implementing parallel versions of popular algorithms on GPUs. Instead of reinventing the wheel, you will learn where to find and how to use excellent versions of these algorithms already available in CUDA and ArrayFire libraries. You will walk away equipped with the best tools and knowledge for implementing accelerated machine learning algorithms.\r\n<h5><span style=\"text-decoration: underline;\"><a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgzc7\" target=\"_blank\">Application Development for Mobile Devices: A Case Study for the Tegra K1</a></span></h5>\r\n<h6>Oded Green</h6>\r\nEmbedded systems are ubiquitous in today\'s world. The Tegra K1 is a front-runner for low-power efficient high performance embedded systems. In this tutorial we will share with you our experience in developing applications for the Tegra K1. We will show how the ArrayFire library and its simple API can be used to deploy stable applications for the Tegra K1 in a quick manner. Specifically, we will cover the zero-copy capabilities of CUDA and show how ArrayFire leverages that capability to efficiently run a very large number of algorithms in real-time. Using ArrayFire\'s graphic package it is easy to create stunning visuals using Tegra\'s OpenGL 4.4 capability, this too will be discussed in today\'s tutorial.','GTC 2015 ArrayFire Recordings','','publish','closed','closed','','gtc-2015-arrayfire-recordings','','','2015-04-30 19:55:27','2015-04-30 19:55:27','',0,'http://sandbox.arrayfire.com/?p=8172',0,'post','',0),(8173,7,'2015-04-30 19:40:57','2015-04-30 19:40:57','Missed visiting ArrayFire at GTC this year? We\'ve got you covered! You can now check out the recordings of all our <a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgzd7\" target=\"_blank\">GTC 2015 talks and tutorials</a> at your own convenience. Learn about accelerating your code from the best in the business.\r\n<h2>Talks</h2>\r\n<h3><a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgx47\" target=\"_blank\">Real-Time and High Resolution Feature Tracking and Object Recognition</a></h3>\r\n<h4>Peter Andreas Entschev</h4>\r\nThis session will cover real-time feature tracking and object recognition in high resolution videos using GPUs and productive software libraries including ArrayFire. Feature tracking and object recognition are computer vision problems that have challenged researchers for decades. Over the last 15 years, numerous approaches were proposed to solve these problems, some of the most important being SIFT, SURF and ORB. Traditionally, these approaches are so computationally complex that processing more than a few frames per second is impossible. Using an NVIDIA K20 GPU with ORB, we are able to process more than 30 frames per second on images in the order of 10000x10000 pixels. Multiple quality and timing benchmarks will be presented, covering some of the most robust feature tracking methods.\r\n\r\n<a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgxfp\" target=\"_blank\">Fast Triangle Counting for Social Network Analytics on the K40</a>\r\n\r\nOded Green\r\n\r\nIn this session we will explore a new approach for counting triangles in networks that partitions the work at multiple parallel granularties. This new approach is highly scalable and is appropriate for both sparse and dense networks.\r\n\r\nTutorials\r\n\r\n<a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgxyc\" target=\"_blank\">Introduction to GPU Computing Using the ArrayFire Acceleration Library</a>\r\n\r\nJohn Melonakos\r\n\r\nNew to GPU computing and don\'t know where to start? Are you an expert in GPU computing and tired of writing your kernels from scratch? If that is the case, this tutorial is perfect for you! In today\'s tutorial we will introduce you to a simple and intuitive API that will make GPU computing highly productive and stress free. Last November, the ArrayFire library was open-source and made available to the general public. In today\'s talk we will walk you through the installation process, introduce the ArrayFire API, and show several applications that have been developed using the API.\r\n\r\n<a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgy4h\" target=\"_blank\">Image Learning and Computer Vision in CUDA</a>\r\n\r\nPeter Andreas Entschev\r\n\r\nAnalyzing a massive data set? Need fast results? Need computer vision algorithms? Not sure when and where to start? The answer is here and now! In this tutorial we will give you the tools to bring your favorite computer vision algorithm to life. In this tutorial we will go over key challenges for implementing computer vision and machine learning algorithms on the GPU. We will walk you through several computer vision algorithms for the GPU (ORB, Fast, SIFT) and give you the hands experience to implement you own algorithms.\r\n\r\n<a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgyxk\" target=\"_blank\">Simplified Machine Learning Programming for CUDA</a>\r\n\r\nUmar Arshad\r\n\r\nLooking for a simplified way to program machine learning algorithms? This tutorial will give you hands on experience implementing Deep Belief Networks using ArrayFire and other CUDA tools. Learn the best practices for implementing parallel versions of popular algorithms on GPUs. Instead of reinventing the wheel, you will learn where to find and how to use excellent versions of these algorithms already available in CUDA and ArrayFire libraries. You will walk away equipped with the best tools and knowledge for implementing accelerated machine learning algorithms.\r\n\r\n<a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgzc7\" target=\"_blank\">Application Development for Mobile Devices: A Case Study for the Tegra K1</a>\r\n\r\nOded Green\r\n\r\nEmbedded systems are ubiquitous in today\'s world. The Tegra K1 is a front-runner for low-power efficient high performance embedded systems. In this tutorial we will share with you our experience in developing applications for the Tegra K1. We will show how the ArrayFire library and its simple API can be used to deploy stable applications for the Tegra K1 in a quick manner. Specifically, we will cover the zero-copy capabilities of CUDA and show how ArrayFire leverages that capability to efficiently run a very large number of algorithms in real-time. Using ArrayFire\'s graphic package it is easy to create stunning visuals using Tegra\'s OpenGL 4.4 capability, this too will be discussed in today\'s tutorial.','GTC 2015 ArrayFire Recordings','','inherit','closed','closed','','8172-revision-v1','','','2015-04-30 19:40:57','2015-04-30 19:40:57','',8172,'http://sandbox.arrayfire.com/8172-revision-v1/',0,'revision','',0),(8174,7,'2015-04-30 19:41:43','2015-04-30 19:41:43','Missed visiting ArrayFire at GTC this year? We\'ve got you covered! You can now check out the recordings of all our <a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgzd7\" target=\"_blank\">GTC 2015 talks and tutorials</a> at your own convenience. Learn about accelerating your code from the best in the business.\r\n<h3>Talks</h3>\r\n<h4><a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgx47\" target=\"_blank\">Real-Time and High Resolution Feature Tracking and Object Recognition</a></h4>\r\n<h5>Peter Andreas Entschev</h5>\r\nThis session will cover real-time feature tracking and object recognition in high resolution videos using GPUs and productive software libraries including ArrayFire. Feature tracking and object recognition are computer vision problems that have challenged researchers for decades. Over the last 15 years, numerous approaches were proposed to solve these problems, some of the most important being SIFT, SURF and ORB. Traditionally, these approaches are so computationally complex that processing more than a few frames per second is impossible. Using an NVIDIA K20 GPU with ORB, we are able to process more than 30 frames per second on images in the order of 10000x10000 pixels. Multiple quality and timing benchmarks will be presented, covering some of the most robust feature tracking methods.\r\n\r\n<a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgxfp\" target=\"_blank\">Fast Triangle Counting for Social Network Analytics on the K40</a>\r\n\r\nOded Green\r\n\r\nIn this session we will explore a new approach for counting triangles in networks that partitions the work at multiple parallel granularties. This new approach is highly scalable and is appropriate for both sparse and dense networks.\r\n\r\nTutorials\r\n\r\n<a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgxyc\" target=\"_blank\">Introduction to GPU Computing Using the ArrayFire Acceleration Library</a>\r\n\r\nJohn Melonakos\r\n\r\nNew to GPU computing and don\'t know where to start? Are you an expert in GPU computing and tired of writing your kernels from scratch? If that is the case, this tutorial is perfect for you! In today\'s tutorial we will introduce you to a simple and intuitive API that will make GPU computing highly productive and stress free. Last November, the ArrayFire library was open-source and made available to the general public. In today\'s talk we will walk you through the installation process, introduce the ArrayFire API, and show several applications that have been developed using the API.\r\n\r\n<a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgy4h\" target=\"_blank\">Image Learning and Computer Vision in CUDA</a>\r\n\r\nPeter Andreas Entschev\r\n\r\nAnalyzing a massive data set? Need fast results? Need computer vision algorithms? Not sure when and where to start? The answer is here and now! In this tutorial we will give you the tools to bring your favorite computer vision algorithm to life. In this tutorial we will go over key challenges for implementing computer vision and machine learning algorithms on the GPU. We will walk you through several computer vision algorithms for the GPU (ORB, Fast, SIFT) and give you the hands experience to implement you own algorithms.\r\n\r\n<a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgyxk\" target=\"_blank\">Simplified Machine Learning Programming for CUDA</a>\r\n\r\nUmar Arshad\r\n\r\nLooking for a simplified way to program machine learning algorithms? This tutorial will give you hands on experience implementing Deep Belief Networks using ArrayFire and other CUDA tools. Learn the best practices for implementing parallel versions of popular algorithms on GPUs. Instead of reinventing the wheel, you will learn where to find and how to use excellent versions of these algorithms already available in CUDA and ArrayFire libraries. You will walk away equipped with the best tools and knowledge for implementing accelerated machine learning algorithms.\r\n\r\n<a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgzc7\" target=\"_blank\">Application Development for Mobile Devices: A Case Study for the Tegra K1</a>\r\n\r\nOded Green\r\n\r\nEmbedded systems are ubiquitous in today\'s world. The Tegra K1 is a front-runner for low-power efficient high performance embedded systems. In this tutorial we will share with you our experience in developing applications for the Tegra K1. We will show how the ArrayFire library and its simple API can be used to deploy stable applications for the Tegra K1 in a quick manner. Specifically, we will cover the zero-copy capabilities of CUDA and show how ArrayFire leverages that capability to efficiently run a very large number of algorithms in real-time. Using ArrayFire\'s graphic package it is easy to create stunning visuals using Tegra\'s OpenGL 4.4 capability, this too will be discussed in today\'s tutorial.','GTC 2015 ArrayFire Recordings','','inherit','closed','closed','','8172-revision-v1','','','2015-04-30 19:41:43','2015-04-30 19:41:43','',8172,'http://sandbox.arrayfire.com/8172-revision-v1/',0,'revision','',0),(8175,7,'2015-04-30 19:42:09','2015-04-30 19:42:09','Missed visiting ArrayFire at GTC this year? We\'ve got you covered! You can now check out the recordings of all our <a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgzd7\" target=\"_blank\">GTC 2015 talks and tutorials</a> at your own convenience. Learn about accelerating your code from the best in the business.\r\n<h3>Talks</h3>\r\n<a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgx47\" target=\"_blank\">Real-Time and High Resolution Feature Tracking and Object Recognition</a>\r\n\r\nPeter Andreas Entschev\r\n\r\nThis session will cover real-time feature tracking and object recognition in high resolution videos using GPUs and productive software libraries including ArrayFire. Feature tracking and object recognition are computer vision problems that have challenged researchers for decades. Over the last 15 years, numerous approaches were proposed to solve these problems, some of the most important being SIFT, SURF and ORB. Traditionally, these approaches are so computationally complex that processing more than a few frames per second is impossible. Using an NVIDIA K20 GPU with ORB, we are able to process more than 30 frames per second on images in the order of 10000x10000 pixels. Multiple quality and timing benchmarks will be presented, covering some of the most robust feature tracking methods.\r\n\r\n<a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgxfp\" target=\"_blank\">Fast Triangle Counting for Social Network Analytics on the K40</a>\r\n\r\nOded Green\r\n\r\nIn this session we will explore a new approach for counting triangles in networks that partitions the work at multiple parallel granularties. This new approach is highly scalable and is appropriate for both sparse and dense networks.\r\n\r\nTutorials\r\n\r\n<a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgxyc\" target=\"_blank\">Introduction to GPU Computing Using the ArrayFire Acceleration Library</a>\r\n\r\nJohn Melonakos\r\n\r\nNew to GPU computing and don\'t know where to start? Are you an expert in GPU computing and tired of writing your kernels from scratch? If that is the case, this tutorial is perfect for you! In today\'s tutorial we will introduce you to a simple and intuitive API that will make GPU computing highly productive and stress free. Last November, the ArrayFire library was open-source and made available to the general public. In today\'s talk we will walk you through the installation process, introduce the ArrayFire API, and show several applications that have been developed using the API.\r\n\r\n<a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgy4h\" target=\"_blank\">Image Learning and Computer Vision in CUDA</a>\r\n\r\nPeter Andreas Entschev\r\n\r\nAnalyzing a massive data set? Need fast results? Need computer vision algorithms? Not sure when and where to start? The answer is here and now! In this tutorial we will give you the tools to bring your favorite computer vision algorithm to life. In this tutorial we will go over key challenges for implementing computer vision and machine learning algorithms on the GPU. We will walk you through several computer vision algorithms for the GPU (ORB, Fast, SIFT) and give you the hands experience to implement you own algorithms.\r\n\r\n<a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgyxk\" target=\"_blank\">Simplified Machine Learning Programming for CUDA</a>\r\n\r\nUmar Arshad\r\n\r\nLooking for a simplified way to program machine learning algorithms? This tutorial will give you hands on experience implementing Deep Belief Networks using ArrayFire and other CUDA tools. Learn the best practices for implementing parallel versions of popular algorithms on GPUs. Instead of reinventing the wheel, you will learn where to find and how to use excellent versions of these algorithms already available in CUDA and ArrayFire libraries. You will walk away equipped with the best tools and knowledge for implementing accelerated machine learning algorithms.\r\n\r\n<a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgzc7\" target=\"_blank\">Application Development for Mobile Devices: A Case Study for the Tegra K1</a>\r\n\r\nOded Green\r\n\r\nEmbedded systems are ubiquitous in today\'s world. The Tegra K1 is a front-runner for low-power efficient high performance embedded systems. In this tutorial we will share with you our experience in developing applications for the Tegra K1. We will show how the ArrayFire library and its simple API can be used to deploy stable applications for the Tegra K1 in a quick manner. Specifically, we will cover the zero-copy capabilities of CUDA and show how ArrayFire leverages that capability to efficiently run a very large number of algorithms in real-time. Using ArrayFire\'s graphic package it is easy to create stunning visuals using Tegra\'s OpenGL 4.4 capability, this too will be discussed in today\'s tutorial.','GTC 2015 ArrayFire Recordings','','inherit','closed','closed','','8172-revision-v1','','','2015-04-30 19:42:09','2015-04-30 19:42:09','',8172,'http://sandbox.arrayfire.com/8172-revision-v1/',0,'revision','',0),(8176,7,'2015-04-30 19:42:24','2015-04-30 19:42:24','Missed visiting ArrayFire at GTC this year? We\'ve got you covered! You can now check out the recordings of all our <a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgzd7\" target=\"_blank\">GTC 2015 talks and tutorials</a> at your own convenience. Learn about accelerating your code from the best in the business.\r\n<h3>Talks</h3>\r\n<h5><a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgx47\" target=\"_blank\">Real-Time and High Resolution Feature Tracking and Object Recognition</a></h5>\r\n<h6>Peter Andreas Entschev</h6>\r\nThis session will cover real-time feature tracking and object recognition in high resolution videos using GPUs and productive software libraries including ArrayFire. Feature tracking and object recognition are computer vision problems that have challenged researchers for decades. Over the last 15 years, numerous approaches were proposed to solve these problems, some of the most important being SIFT, SURF and ORB. Traditionally, these approaches are so computationally complex that processing more than a few frames per second is impossible. Using an NVIDIA K20 GPU with ORB, we are able to process more than 30 frames per second on images in the order of 10000x10000 pixels. Multiple quality and timing benchmarks will be presented, covering some of the most robust feature tracking methods.\r\n\r\n<a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgxfp\" target=\"_blank\">Fast Triangle Counting for Social Network Analytics on the K40</a>\r\n\r\nOded Green\r\n\r\nIn this session we will explore a new approach for counting triangles in networks that partitions the work at multiple parallel granularties. This new approach is highly scalable and is appropriate for both sparse and dense networks.\r\n\r\nTutorials\r\n\r\n<a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgxyc\" target=\"_blank\">Introduction to GPU Computing Using the ArrayFire Acceleration Library</a>\r\n\r\nJohn Melonakos\r\n\r\nNew to GPU computing and don\'t know where to start? Are you an expert in GPU computing and tired of writing your kernels from scratch? If that is the case, this tutorial is perfect for you! In today\'s tutorial we will introduce you to a simple and intuitive API that will make GPU computing highly productive and stress free. Last November, the ArrayFire library was open-source and made available to the general public. In today\'s talk we will walk you through the installation process, introduce the ArrayFire API, and show several applications that have been developed using the API.\r\n\r\n<a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgy4h\" target=\"_blank\">Image Learning and Computer Vision in CUDA</a>\r\n\r\nPeter Andreas Entschev\r\n\r\nAnalyzing a massive data set? Need fast results? Need computer vision algorithms? Not sure when and where to start? The answer is here and now! In this tutorial we will give you the tools to bring your favorite computer vision algorithm to life. In this tutorial we will go over key challenges for implementing computer vision and machine learning algorithms on the GPU. We will walk you through several computer vision algorithms for the GPU (ORB, Fast, SIFT) and give you the hands experience to implement you own algorithms.\r\n\r\n<a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgyxk\" target=\"_blank\">Simplified Machine Learning Programming for CUDA</a>\r\n\r\nUmar Arshad\r\n\r\nLooking for a simplified way to program machine learning algorithms? This tutorial will give you hands on experience implementing Deep Belief Networks using ArrayFire and other CUDA tools. Learn the best practices for implementing parallel versions of popular algorithms on GPUs. Instead of reinventing the wheel, you will learn where to find and how to use excellent versions of these algorithms already available in CUDA and ArrayFire libraries. You will walk away equipped with the best tools and knowledge for implementing accelerated machine learning algorithms.\r\n\r\n<a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgzc7\" target=\"_blank\">Application Development for Mobile Devices: A Case Study for the Tegra K1</a>\r\n\r\nOded Green\r\n\r\nEmbedded systems are ubiquitous in today\'s world. The Tegra K1 is a front-runner for low-power efficient high performance embedded systems. In this tutorial we will share with you our experience in developing applications for the Tegra K1. We will show how the ArrayFire library and its simple API can be used to deploy stable applications for the Tegra K1 in a quick manner. Specifically, we will cover the zero-copy capabilities of CUDA and show how ArrayFire leverages that capability to efficiently run a very large number of algorithms in real-time. Using ArrayFire\'s graphic package it is easy to create stunning visuals using Tegra\'s OpenGL 4.4 capability, this too will be discussed in today\'s tutorial.','GTC 2015 ArrayFire Recordings','','inherit','closed','closed','','8172-revision-v1','','','2015-04-30 19:42:24','2015-04-30 19:42:24','',8172,'http://sandbox.arrayfire.com/8172-revision-v1/',0,'revision','',0),(8177,7,'2015-04-30 19:43:45','2015-04-30 19:43:45','Missed visiting ArrayFire at GTC this year? We\'ve got you covered! You can now check out the recordings of all our <a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgzd7\" target=\"_blank\">GTC 2015 talks and tutorials</a> at your own convenience. Learn about accelerating your code from the best in the business.\r\n<h3>Talks</h3>\r\n<h5><a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgx47\" target=\"_blank\">Real-Time and High Resolution Feature Tracking and Object Recognition</a></h5>\r\n<h6>Peter Andreas Entschev</h6>\r\nThis session will cover real-time feature tracking and object recognition in high resolution videos using GPUs and productive software libraries including ArrayFire. Feature tracking and object recognition are computer vision problems that have challenged researchers for decades. Over the last 15 years, numerous approaches were proposed to solve these problems, some of the most important being SIFT, SURF and ORB. Traditionally, these approaches are so computationally complex that processing more than a few frames per second is impossible. Using an NVIDIA K20 GPU with ORB, we are able to process more than 30 frames per second on images in the order of 10000x10000 pixels. Multiple quality and timing benchmarks will be presented, covering some of the most robust feature tracking methods.\r\n<h5><a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgxfp\" target=\"_blank\">Fast Triangle Counting for Social Network Analytics on the K40</a></h5>\r\n<h6>Oded Green</h6>\r\nIn this session we will explore a new approach for counting triangles in networks that partitions the work at multiple parallel granularties. This new approach is highly scalable and is appropriate for both sparse and dense networks.\r\n\r\nTutorials\r\n<h5><a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgxyc\" target=\"_blank\">Introduction to GPU Computing Using the ArrayFire Acceleration Library</a></h5>\r\n<h6>John Melonakos</h6>\r\nNew to GPU computing and don\'t know where to start? Are you an expert in GPU computing and tired of writing your kernels from scratch? If that is the case, this tutorial is perfect for you! In today\'s tutorial we will introduce you to a simple and intuitive API that will make GPU computing highly productive and stress free. Last November, the ArrayFire library was open-source and made available to the general public. In today\'s talk we will walk you through the installation process, introduce the ArrayFire API, and show several applications that have been developed using the API.\r\n<h5><a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgy4h\" target=\"_blank\">Image Learning and Computer Vision in CUDA</a></h5>\r\n<h6>Peter Andreas Entschev</h6>\r\nAnalyzing a massive data set? Need fast results? Need computer vision algorithms? Not sure when and where to start? The answer is here and now! In this tutorial we will give you the tools to bring your favorite computer vision algorithm to life. In this tutorial we will go over key challenges for implementing computer vision and machine learning algorithms on the GPU. We will walk you through several computer vision algorithms for the GPU (ORB, Fast, SIFT) and give you the hands experience to implement you own algorithms.\r\n<h5><a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgyxk\" target=\"_blank\">Simplified Machine Learning Programming for CUDA</a></h5>\r\n<h6>Umar Arshad</h6>\r\nLooking for a simplified way to program machine learning algorithms? This tutorial will give you hands on experience implementing Deep Belief Networks using ArrayFire and other CUDA tools. Learn the best practices for implementing parallel versions of popular algorithms on GPUs. Instead of reinventing the wheel, you will learn where to find and how to use excellent versions of these algorithms already available in CUDA and ArrayFire libraries. You will walk away equipped with the best tools and knowledge for implementing accelerated machine learning algorithms.\r\n<h5><a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgzc7\" target=\"_blank\">Application Development for Mobile Devices: A Case Study for the Tegra K1</a></h5>\r\n<h6>Oded Green</h6>\r\nEmbedded systems are ubiquitous in today\'s world. The Tegra K1 is a front-runner for low-power efficient high performance embedded systems. In this tutorial we will share with you our experience in developing applications for the Tegra K1. We will show how the ArrayFire library and its simple API can be used to deploy stable applications for the Tegra K1 in a quick manner. Specifically, we will cover the zero-copy capabilities of CUDA and show how ArrayFire leverages that capability to efficiently run a very large number of algorithms in real-time. Using ArrayFire\'s graphic package it is easy to create stunning visuals using Tegra\'s OpenGL 4.4 capability, this too will be discussed in today\'s tutorial.','GTC 2015 ArrayFire Recordings','','inherit','closed','closed','','8172-revision-v1','','','2015-04-30 19:43:45','2015-04-30 19:43:45','',8172,'http://sandbox.arrayfire.com/8172-revision-v1/',0,'revision','',0),(8178,7,'2015-04-30 19:44:26','2015-04-30 19:44:26','Missed visiting ArrayFire at GTC this year? We\'ve got you covered! You can now check out the recordings of all our <a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgzd7\" target=\"_blank\">GTC 2015 talks and tutorials</a> at your own convenience. Learn about accelerating your code from the best in the business.\r\n<h4>Talks</h4>\r\n<h5><a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgx47\" target=\"_blank\">Real-Time and High Resolution Feature Tracking and Object Recognition</a></h5>\r\n<h6>Peter Andreas Entschev</h6>\r\nThis session will cover real-time feature tracking and object recognition in high resolution videos using GPUs and productive software libraries including ArrayFire. Feature tracking and object recognition are computer vision problems that have challenged researchers for decades. Over the last 15 years, numerous approaches were proposed to solve these problems, some of the most important being SIFT, SURF and ORB. Traditionally, these approaches are so computationally complex that processing more than a few frames per second is impossible. Using an NVIDIA K20 GPU with ORB, we are able to process more than 30 frames per second on images in the order of 10000x10000 pixels. Multiple quality and timing benchmarks will be presented, covering some of the most robust feature tracking methods.\r\n<h5><a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgxfp\" target=\"_blank\">Fast Triangle Counting for Social Network Analytics on the K40</a></h5>\r\n<h6>Oded Green</h6>\r\nIn this session we will explore a new approach for counting triangles in networks that partitions the work at multiple parallel granularties. This new approach is highly scalable and is appropriate for both sparse and dense networks.\r\n\r\nTutorials\r\n<h5><a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgxyc\" target=\"_blank\">Introduction to GPU Computing Using the ArrayFire Acceleration Library</a></h5>\r\n<h6>John Melonakos</h6>\r\nNew to GPU computing and don\'t know where to start? Are you an expert in GPU computing and tired of writing your kernels from scratch? If that is the case, this tutorial is perfect for you! In today\'s tutorial we will introduce you to a simple and intuitive API that will make GPU computing highly productive and stress free. Last November, the ArrayFire library was open-source and made available to the general public. In today\'s talk we will walk you through the installation process, introduce the ArrayFire API, and show several applications that have been developed using the API.\r\n<h5><a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgy4h\" target=\"_blank\">Image Learning and Computer Vision in CUDA</a></h5>\r\n<h6>Peter Andreas Entschev</h6>\r\nAnalyzing a massive data set? Need fast results? Need computer vision algorithms? Not sure when and where to start? The answer is here and now! In this tutorial we will give you the tools to bring your favorite computer vision algorithm to life. In this tutorial we will go over key challenges for implementing computer vision and machine learning algorithms on the GPU. We will walk you through several computer vision algorithms for the GPU (ORB, Fast, SIFT) and give you the hands experience to implement you own algorithms.\r\n<h5><a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgyxk\" target=\"_blank\">Simplified Machine Learning Programming for CUDA</a></h5>\r\n<h6>Umar Arshad</h6>\r\nLooking for a simplified way to program machine learning algorithms? This tutorial will give you hands on experience implementing Deep Belief Networks using ArrayFire and other CUDA tools. Learn the best practices for implementing parallel versions of popular algorithms on GPUs. Instead of reinventing the wheel, you will learn where to find and how to use excellent versions of these algorithms already available in CUDA and ArrayFire libraries. You will walk away equipped with the best tools and knowledge for implementing accelerated machine learning algorithms.\r\n<h5><a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgzc7\" target=\"_blank\">Application Development for Mobile Devices: A Case Study for the Tegra K1</a></h5>\r\n<h6>Oded Green</h6>\r\nEmbedded systems are ubiquitous in today\'s world. The Tegra K1 is a front-runner for low-power efficient high performance embedded systems. In this tutorial we will share with you our experience in developing applications for the Tegra K1. We will show how the ArrayFire library and its simple API can be used to deploy stable applications for the Tegra K1 in a quick manner. Specifically, we will cover the zero-copy capabilities of CUDA and show how ArrayFire leverages that capability to efficiently run a very large number of algorithms in real-time. Using ArrayFire\'s graphic package it is easy to create stunning visuals using Tegra\'s OpenGL 4.4 capability, this too will be discussed in today\'s tutorial.','GTC 2015 ArrayFire Recordings','','inherit','closed','closed','','8172-revision-v1','','','2015-04-30 19:44:26','2015-04-30 19:44:26','',8172,'http://sandbox.arrayfire.com/8172-revision-v1/',0,'revision','',0),(8179,7,'2015-04-30 19:44:48','2015-04-30 19:44:48','Missed visiting ArrayFire at GTC this year? We\'ve got you covered! You can now check out the recordings of all our <a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgzd7\" target=\"_blank\">GTC 2015 talks and tutorials</a> at your own convenience. Learn about accelerating your code from the best in the business.\r\n<h3>Talks</h3>\r\n<h5><a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgx47\" target=\"_blank\">Real-Time and High Resolution Feature Tracking and Object Recognition</a></h5>\r\n<h6>Peter Andreas Entschev</h6>\r\nThis session will cover real-time feature tracking and object recognition in high resolution videos using GPUs and productive software libraries including ArrayFire. Feature tracking and object recognition are computer vision problems that have challenged researchers for decades. Over the last 15 years, numerous approaches were proposed to solve these problems, some of the most important being SIFT, SURF and ORB. Traditionally, these approaches are so computationally complex that processing more than a few frames per second is impossible. Using an NVIDIA K20 GPU with ORB, we are able to process more than 30 frames per second on images in the order of 10000x10000 pixels. Multiple quality and timing benchmarks will be presented, covering some of the most robust feature tracking methods.\r\n<h5><a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgxfp\" target=\"_blank\">Fast Triangle Counting for Social Network Analytics on the K40</a></h5>\r\n<h6>Oded Green</h6>\r\nIn this session we will explore a new approach for counting triangles in networks that partitions the work at multiple parallel granularties. This new approach is highly scalable and is appropriate for both sparse and dense networks.\r\n<h3>Tutorials</h3>\r\n<h5><a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgxyc\" target=\"_blank\">Introduction to GPU Computing Using the ArrayFire Acceleration Library</a></h5>\r\n<h6>John Melonakos</h6>\r\nNew to GPU computing and don\'t know where to start? Are you an expert in GPU computing and tired of writing your kernels from scratch? If that is the case, this tutorial is perfect for you! In today\'s tutorial we will introduce you to a simple and intuitive API that will make GPU computing highly productive and stress free. Last November, the ArrayFire library was open-source and made available to the general public. In today\'s talk we will walk you through the installation process, introduce the ArrayFire API, and show several applications that have been developed using the API.\r\n<h5><a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgy4h\" target=\"_blank\">Image Learning and Computer Vision in CUDA</a></h5>\r\n<h6>Peter Andreas Entschev</h6>\r\nAnalyzing a massive data set? Need fast results? Need computer vision algorithms? Not sure when and where to start? The answer is here and now! In this tutorial we will give you the tools to bring your favorite computer vision algorithm to life. In this tutorial we will go over key challenges for implementing computer vision and machine learning algorithms on the GPU. We will walk you through several computer vision algorithms for the GPU (ORB, Fast, SIFT) and give you the hands experience to implement you own algorithms.\r\n<h5><a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgyxk\" target=\"_blank\">Simplified Machine Learning Programming for CUDA</a></h5>\r\n<h6>Umar Arshad</h6>\r\nLooking for a simplified way to program machine learning algorithms? This tutorial will give you hands on experience implementing Deep Belief Networks using ArrayFire and other CUDA tools. Learn the best practices for implementing parallel versions of popular algorithms on GPUs. Instead of reinventing the wheel, you will learn where to find and how to use excellent versions of these algorithms already available in CUDA and ArrayFire libraries. You will walk away equipped with the best tools and knowledge for implementing accelerated machine learning algorithms.\r\n<h5><a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgzc7\" target=\"_blank\">Application Development for Mobile Devices: A Case Study for the Tegra K1</a></h5>\r\n<h6>Oded Green</h6>\r\nEmbedded systems are ubiquitous in today\'s world. The Tegra K1 is a front-runner for low-power efficient high performance embedded systems. In this tutorial we will share with you our experience in developing applications for the Tegra K1. We will show how the ArrayFire library and its simple API can be used to deploy stable applications for the Tegra K1 in a quick manner. Specifically, we will cover the zero-copy capabilities of CUDA and show how ArrayFire leverages that capability to efficiently run a very large number of algorithms in real-time. Using ArrayFire\'s graphic package it is easy to create stunning visuals using Tegra\'s OpenGL 4.4 capability, this too will be discussed in today\'s tutorial.','GTC 2015 ArrayFire Recordings','','inherit','closed','closed','','8172-revision-v1','','','2015-04-30 19:44:48','2015-04-30 19:44:48','',8172,'http://sandbox.arrayfire.com/8172-revision-v1/',0,'revision','',0),(8181,7,'2015-04-30 19:54:59','2015-04-30 19:54:59','Missed visiting ArrayFire at GTC this year? We\'ve got you covered! You can now check out the recordings of all our <a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgzd7\" target=\"_blank\">GTC 2015 talks and tutorials</a> at your own convenience. Learn about accelerating your code from the best in the business.\r\n<h3>Talks</h3>\r\n<h5><span style=\"text-decoration: underline;\"><a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgx47\" target=\"_blank\">Real-Time and High Resolution Feature Tracking and Object Recognition</a></span></h5>\r\n<h6>Peter Andreas Entschev</h6>\r\nThis session will cover real-time feature tracking and object recognition in high resolution videos using GPUs and productive software libraries including ArrayFire. Feature tracking and object recognition are computer vision problems that have challenged researchers for decades. Over the last 15 years, numerous approaches were proposed to solve these problems, some of the most important being SIFT, SURF and ORB. Traditionally, these approaches are so computationally complex that processing more than a few frames per second is impossible. Using an NVIDIA K20 GPU with ORB, we are able to process more than 30 frames per second on images in the order of 10000x10000 pixels. Multiple quality and timing benchmarks will be presented, covering some of the most robust feature tracking methods.\r\n<h5><span style=\"text-decoration: underline;\"><a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgxfp\" target=\"_blank\">Fast Triangle Counting for Social Network Analytics on the K40</a></span></h5>\r\n<h6>Oded Green</h6>\r\nIn this session we will explore a new approach for counting triangles in networks that partitions the work at multiple parallel granularties. This new approach is highly scalable and is appropriate for both sparse and dense networks.\r\n<h3>Tutorials</h3>\r\n<h5><span style=\"text-decoration: underline;\"><a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgxyc\" target=\"_blank\">Introduction to GPU Computing Using the ArrayFire Acceleration Library</a></span></h5>\r\n<h6>John Melonakos</h6>\r\nNew to GPU computing and don\'t know where to start? Are you an expert in GPU computing and tired of writing your kernels from scratch? If that is the case, this tutorial is perfect for you! In today\'s tutorial we will introduce you to a simple and intuitive API that will make GPU computing highly productive and stress free. Last November, the ArrayFire library was open-source and made available to the general public. In today\'s talk we will walk you through the installation process, introduce the ArrayFire API, and show several applications that have been developed using the API.\r\n<h5><span style=\"text-decoration: underline;\"><a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgy4h\" target=\"_blank\">Image Learning and Computer Vision in CUDA</a></span></h5>\r\n<h6>Peter Andreas Entschev</h6>\r\nAnalyzing a massive data set? Need fast results? Need computer vision algorithms? Not sure when and where to start? The answer is here and now! In this tutorial we will give you the tools to bring your favorite computer vision algorithm to life. In this tutorial we will go over key challenges for implementing computer vision and machine learning algorithms on the GPU. We will walk you through several computer vision algorithms for the GPU (ORB, Fast, SIFT) and give you the hands experience to implement you own algorithms.\r\n<h5><span style=\"text-decoration: underline;\"><a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgyxk\" target=\"_blank\">Simplified Machine Learning Programming for CUDA</a></span></h5>\r\n<h6>Umar Arshad</h6>\r\nLooking for a simplified way to program machine learning algorithms? This tutorial will give you hands on experience implementing Deep Belief Networks using ArrayFire and other CUDA tools. Learn the best practices for implementing parallel versions of popular algorithms on GPUs. Instead of reinventing the wheel, you will learn where to find and how to use excellent versions of these algorithms already available in CUDA and ArrayFire libraries. You will walk away equipped with the best tools and knowledge for implementing accelerated machine learning algorithms.\r\n<h5><span style=\"text-decoration: underline;\"><a href=\"http://go.sandbox.arrayfire.com/l/37882/2015-04-30/qgzc7\" target=\"_blank\">Application Development for Mobile Devices: A Case Study for the Tegra K1</a></span></h5>\r\n<h6>Oded Green</h6>\r\nEmbedded systems are ubiquitous in today\'s world. The Tegra K1 is a front-runner for low-power efficient high performance embedded systems. In this tutorial we will share with you our experience in developing applications for the Tegra K1. We will show how the ArrayFire library and its simple API can be used to deploy stable applications for the Tegra K1 in a quick manner. Specifically, we will cover the zero-copy capabilities of CUDA and show how ArrayFire leverages that capability to efficiently run a very large number of algorithms in real-time. Using ArrayFire\'s graphic package it is easy to create stunning visuals using Tegra\'s OpenGL 4.4 capability, this too will be discussed in today\'s tutorial.','GTC 2015 ArrayFire Recordings','','inherit','closed','closed','','8172-revision-v1','','','2015-04-30 19:54:59','2015-04-30 19:54:59','',8172,'http://sandbox.arrayfire.com/8172-revision-v1/',0,'revision','',0),(8182,18528,'2015-12-04 15:28:56','2015-12-04 15:28:56','Under Windows and Mac the Intel GPU drivers include OpenCL support; however, on Linux OpenCL on Intel GPUs is implemented through an open source project called <a href=\"http://www.freedesktop.org/wiki/Software/Beignet/\">Beignet</a> (pronnounced like \"ben-yay\", a type of <a href=\"http://en.wikipedia.org/wiki/Beignet\">French pastry</a> akin to a what we would call a \"fritter\" in English). Below I have written a step-by-step guide on how you can get Beignet running on an Ubuntu 14.10 system which has an Intel 3rd, 4th, or 5th <a href=\"http://ark.intel.com/\">generation Intel processor</a>. Instructions for other variants of Linux will be similar, except for the commands to install the prerequisite packages.\n\nThere are several little caveats which need to be discussed up front. Foremost, the Beignet project supports the following hardware:\n<ul>\n	<li>3rd Generation Intel Core Processors</li>\n	<li>Intel “Bay Trail” platforms with Intel HD Graphics</li>\n	<li>4th Generation Intel Core Processors (requires a kernel patch be applied for shared memory!)</li>\n	<li>5th Generation Intel Core Processors \"Broadwell\".</li>\n</ul>\nThere are also a few noteworthy issues of which you should be aware:\n<ul>\n	<li>If your computer is running a Linux kernel in the 3.15 or 3.16 branch, you will need to disable some register whitelist functionality every time you reboot your system. This can be accomplished by running <code>echo 0 &gt; /sys/module/i915/parameters/enable_cmd_parser</code> as root.</li>\n	<li>4th Generation Intel Processors (i.e. i3/5/7-4xxx) require a kernel patch for shared/local memory to function.</li>\n	<li>There is no double precision support</li>\n	<li>OpenGL-OpenCL interop via <code>cl_khr_gl_sharing</code> is not supported</li>\n</ul>\nThere are additional release notes that can be found on the <a href=\"http://www.freedesktop.org/wiki/Software/Beignet/\">Beignet</a> project page.\n<h3>Installing prerequisites</h3>\n<pre><code>sudo apt-get install build-essential g++ cmake \nsudo apt-get install clang libclang-3.5-dev libclang-dev libclang1\nsudo apt-get install ocl-icd-opencl-dev ocl-icd-libopencl1</code></pre>\nNote, if you are on a Ubuntu 14.04 system, you should install <code>libclang-3.4-dev</code> instead, then run <code>update-alternatives</code> to point <code>llvm-link</code> and <code>llvm-as</code> to the correct version. The latter can be accomplished using the following commands:\n<pre><code>sudo update-alternatives --install /usr/bin/llvm-link llvm-link /usr/bin/llvm-link-3.4 34\nsudo update-alternatives --install /usr/bin/llvm-as llvm-as /usr/bin/llvm-as-3.4 34  \n</code></pre>\nIf you want to use the standard OpenCL ICD loader, you will also need to install these packages:\n<pre><code>sudo apt-get install opencl-headers ocl-icd-dev ocl-icd-libopencl1    \n</code></pre>\nI would also recomment you install the <code>clinfo</code> program so that you can verify that your installation is successful:\n<pre><code>sudo apt-get install clinfo    \n</code></pre>\n<h3>Check out and compile Beignet</h3>\n<pre><code>git clone git://anongit.freedesktop.org/beignet\ncd beignet\ngit checkout Release_v1.0.0\nmkdir build\ncd build\ncmake ..   \n</code></pre>\nNOTE: There may be newer releases of Beinget. To find releases type\n\nDuring the CMake stage, ensure that the OCL ICD header file is installed, otherwise the library will not create an installable client driver. If everything went fine, go ahead and compile the source using\n<pre><code>make    \n</code></pre>\n(Note, you can do make -jN with N &gt; 1 to do a parallel build.)\nNext we verify that Beignet is functioning correctly on your hardware by running unit tests. These can be found in the <code>utest</code> folder. The unit tests require some enviornmental variables be set prior to invocation:\n<pre><code>cd utests\ncat setenv.sh\n[copy all of the export commands, run them in your shell]\n./utest_run   \n</code></pre>\nIf a significant fraction of the unit tests fail and you have a 3.15 or 3.16 kernel, you need to disable register whitelisting using a command similar to the following:\n<pre><code>sudo su\necho 0 &gt; /sys/module/i915/parameters/enable_cmd_parser\nexit    \n</code></pre>\nand try re-running the tests. Please note that this change is not permanent and you will need to re-run it if you reboot your system. Alternatively, you could add this command to a startup script. The Beignet release notes mention there is a kernel patch to fix this issue which you could backport if you so desired.\n\nIf most of the tests pass, but those that involve local memory (~20-30 of the tests) fail, you will need to apply the <a href=\"#kernel-patch\">kernel patch</a> listed below.\n\nIf all was well, install Beignet to your system:\n<pre><code>sudo make install   \n</code></pre>\nYou can see a list of installed software in the <code>install_manifest.txt</code> file in the build directory.\n<h3>Verify Beignet is installed</h3>\nIn a terminal run the <code>clinfo</code> program. You should see something like this:\n<pre><code>$ clinfo\n...      \nPlatform Name:              Intel Gen OCL Driver\nNumber of devices:          1\nDevice Type:                CL_DEVICE_TYPE_GPU\n...\nName:                       Intel(R) HD Graphics Haswell GT2 Desktop\nVendor:                     Intel\nDevice OpenCL C version:    OpenCL C 1.2 beignet 0.9.1\nDriver version:             0.9.1\nProfile:                    FULL_PROFILE\nVersion:                    OpenCL 1.2 beignet 0.9.1\nExtensions:                 cl_khr_global_int32_base_atomics \n                            cl_khr_global_int32_extended_atomics \n                            cl_khr_local_int32_base_atomics \n                            cl_khr_local_int32_extended_atomics \n                            cl_khr_byte_addressable_store cl_khr_icd   \n</code></pre>\nTake note that the Intel OpenCL driver is loaded for a GPU device using <code>beignet</code>. This indicates the Installable Client Driver (ICD) is correctly installed. Also note the extensions listed.\n<h3>Applying the kernel patch to enable OpenCL shared local memory.</h3>\nIf you are using Beignet on a 4th generation Intel processor, you will need to apply a kernel patch to enable shared/local memory. This is a fairly lengthy process that will require at least 70 GB of hard disk space and perhaps an hour of compilation time if the build is executed in parallel.\n\nIn the next few paragraphs I\'ll walk you through how you can apply the kernel patch. I have based my instructions on the <a href=\"https://help.ubuntu.com/community/Kernel/Compile\">kernel compilation instructions for Ubuntu</a>. Instructions for other variants of Linux will be significantly different.\n\nInstall prerequisites:\n<pre><code>sudo apt-get build-dep linux-image-`uname -r`    \n</code></pre>\nMake a working directory for the kernel somewhere and download the source\n<pre><code>mkdir kernel\ncd kernel\napt-get source linux-image-`uname -r`    \n</code></pre>\nNext we see if we can automatically apply the patch. First download the patch:\n<pre><code>wget https://01.org/sites/default/files/disable-batchbuffer-security.patch    \n</code></pre>\nNow <code>cd</code> into the kernel directory:\n<pre><code>cd linux-3.16.0    \n</code></pre>\nCheck some details about the patch\n<pre><code>git apply --stat ../disable-batchbuffer-security.patch    \n</code></pre>\nTry automatically applying the patch:\n<pre><code>git apply --check ../disable-batchbuffer-security.patch    \n</code></pre>\nIf it automatically applies with no errors, just apply it:\n<pre><code>git apply ../disable-batchbuffer-security.patch    \n</code></pre>\nIf it did not work (as was the case on my system), the change is fairly simple. Open the <code>drivers/gpu/drm/i915/i915_gem_execbuffer.c</code> file in an editor:\n<pre><code>gedit drivers/gpu/drm/i915/i915_gem_execbuffer.c   \n</code></pre>\nIn the <code>i915_gem_do_execbuffer</code> function, find the following code:\n<pre><code>flags = 0;\nif (args-&gt;flags &amp; I915_EXEC_SECURE) {\n    if (!file-&gt;is_master || !capable(CAP_SYS_ADMIN))\n        return -EPERM;    \n</code></pre>\nAnd add the line <code>flags |= I915_DISPATCH_SECURE;</code> as follows:\n<pre><code>flags = 0;\nflags |= I915_DISPATCH_SECURE;\nif (args-&gt;flags &amp; I915_EXEC_SECURE) {\n    if (!file-&gt;is_master || !capable(CAP_SYS_ADMIN))\n        return -EPERM;  \n</code></pre>\nThis was inserted on line 998 for me. Save the file. Now we need to compile and install the modified kernel.\n\nNow we build the new kernel. Run the following commands from within the kernel source directory:\n<pre><code>fakeroot debian/rules clean\nDEB_BUILD_OPTIONS=parallel=8 fakeroot debian/rules binary-headers binary-generic    \n</code></pre>\nThis will build some Debian packages and place them in the directory <em>above</em> the kernel source root.\n\nAfter the kernel has compiled, install it:\n<pre><code>cd ../ (or go back into the kernel directory)\nsudo dpkg -i linux-headers-3.16.0-29-generic_3.16.0-29.54_amd64.deb \nsudo dpkg -i linux-image-3.16.0-29-generic_3.16.0-29.54_amd64.deb    \n</code></pre>\n(you might have to change the numeric kernel version to match what you compiled) Now add the kernel to the boot options:\n<pre><code>sudo update-grub\nsudo reboot    \n</code></pre>\nNow go back and re-run the Beignet unit test framework from above. With any luck everything will work fine.','OpenCL on Intel HD / Iris graphics on Linux','','inherit','closed','closed','','7739-autosave-v1','','','2015-12-04 15:28:56','2015-12-04 15:28:56','',7739,'http://sandbox.arrayfire.com/7739-autosave-v1/',0,'revision','',0),(8183,18528,'2015-05-01 16:43:01','2015-05-01 16:43:01','Under Windows and Mac the Intel GPU drivers include OpenCL support; however, on Linux OpenCL on Intel GPUs is implemented through an open source project called <a href=\"http://www.freedesktop.org/wiki/Software/Beignet/\">Beignet</a> (pronnounced like \"ben-yay\", a type of <a href=\"http://en.wikipedia.org/wiki/Beignet\">French pastry</a> akin to a what we would call a \"fritter\" in English). Below I have written a step-by-step guide on how you can get Beignet running on an Ubuntu 14.10 system which has an Intel 3rd, 4th, or 5th <a href=\"http://ark.intel.com/\">generation Intel processor</a>. Instructions for other variants of Linux will be similar, except for the commands to install the prerequisite packages.\r\n\r\nThere are several little caveats which need to be discussed up front. Foremost, the Beignet project supports the following hardware:\r\n<ul>\r\n	<li>3rd Generation Intel Core Processors</li>\r\n	<li>Intel “Bay Trail” platforms with Intel HD Graphics</li>\r\n	<li>4th Generation Intel Core Processors (requires a kernel patch be applied for shared memory!)</li>\r\n	<li>5th Generation Intel Core Processors \"Broadwell\".</li>\r\n</ul>\r\nThere are also a few noteworthy issues of which you should be aware:\r\n<ul>\r\n	<li>If your computer is running a Linux kernel in the 3.15 or 3.16 branch, you will need to disable some register whitelist functionality every time you reboot your system. This can be accomplished by running <code>echo 0 &gt; /sys/module/i915/parameters/enable_cmd_parser</code> as root.</li>\r\n	<li>4th Generation Intel Processors (i.e. i3/5/7-4xxx) require a kernel patch for shared/local memory to function.</li>\r\n	<li>There is no double precision support</li>\r\n	<li>OpenGL-OpenCL interop via <code>cl_khr_gl_sharing</code> is not supported</li>\r\n</ul>\r\nThere are additional release notes that can be found on the <a href=\"http://www.freedesktop.org/wiki/Software/Beignet/\">Beignet</a> project page.\r\n<h3>Installing prerequisites</h3>\r\n<pre><code>sudo apt-get install build-essential g++ cmake \r\nsudo apt-get install clang libclang-3.5-dev libclang-dev libclang1\r\nsudo apt-get install ocl-icd-opencl-dev ocl-icd-libopencl1</code></pre>\r\nNote, if you are on a Ubuntu 14.04 system, you should install <code>libclang-3.4-dev</code> instead, then run <code>update-alternatives</code> to point <code>llvm-link</code> and <code>llvm-as</code> to the correct version. The latter can be accomplished using the following commands:\r\n<pre><code>sudo update-alternatives --install /usr/bin/llvm-link llvm-link /usr/bin/llvm-link-3.4 34\r\nsudo update-alternatives --install /usr/bin/llvm-as llvm-as /usr/bin/llvm-as-3.4 34  \r\n</code></pre>\r\nIf you want to use the standard OpenCL ICD loader, you will also need to install these packages:\r\n<pre><code>sudo apt-get install opencl-headers ocl-icd-dev ocl-icd-libopencl1    \r\n</code></pre>\r\nI would also recomment you install the <code>clinfo</code> program so that you can verify that your installation is successful:\r\n<pre><code>sudo apt-get install clinfo    \r\n</code></pre>\r\n<h3>Check out and compile Beignet</h3>\r\n<pre><code>git clone git://anongit.freedesktop.org/beignet\r\ncd beignet\r\ngit checkout Release_v1.0.0\r\nmkdir build\r\ncd build\r\ncmake ..   \r\n</code></pre>\r\nDuring the CMake stage, ensure that the OCL ICD header file is installed, otherwise the library will not create an installable client driver. If everything went fine, go ahead and compile the source using\r\n<pre><code>make    \r\n</code></pre>\r\n(Note, you can do make -jN with N &gt; 1 to do a parallel build.)\r\nNext we verify that Beignet is functioning correctly on your hardware by running unit tests. These can be found in the <code>utest</code> folder. The unit tests require some enviornmental variables be set prior to invocation:\r\n<pre><code>cd utests\r\ncat setenv.sh\r\n[copy all of the export commands, run them in your shell]\r\n./utest_run   \r\n</code></pre>\r\nIf a significant fraction of the unit tests fail and you have a 3.15 or 3.16 kernel, you need to disable register whitelisting using a command similar to the following:\r\n<pre><code>sudo su\r\necho 0 &gt; /sys/module/i915/parameters/enable_cmd_parser\r\nexit    \r\n</code></pre>\r\nand try re-running the tests. Please note that this change is not permanent and you will need to re-run it if you reboot your system. Alternatively, you could add this command to a startup script. The Beignet release notes mention there is a kernel patch to fix this issue which you could backport if you so desired.\r\n\r\nIf most of the tests pass, but those that involve local memory (~20-30 of the tests) fail, you will need to apply the <a href=\"#kernel-patch\">kernel patch</a> listed below.\r\n\r\nIf all was well, install Beignet to your system:\r\n<pre><code>sudo make install   \r\n</code></pre>\r\nYou can see a list of installed software in the <code>install_manifest.txt</code> file in the build directory.\r\n<h3>Verify Beignet is installed</h3>\r\nIn a terminal run the <code>clinfo</code> program. You should see something like this:\r\n<pre><code>$ clinfo\r\n...      \r\nPlatform Name:              Intel Gen OCL Driver\r\nNumber of devices:          1\r\nDevice Type:                CL_DEVICE_TYPE_GPU\r\n...\r\nName:                       Intel(R) HD Graphics Haswell GT2 Desktop\r\nVendor:                     Intel\r\nDevice OpenCL C version:    OpenCL C 1.2 beignet 0.9.1\r\nDriver version:             0.9.1\r\nProfile:                    FULL_PROFILE\r\nVersion:                    OpenCL 1.2 beignet 0.9.1\r\nExtensions:                 cl_khr_global_int32_base_atomics \r\n                            cl_khr_global_int32_extended_atomics \r\n                            cl_khr_local_int32_base_atomics \r\n                            cl_khr_local_int32_extended_atomics \r\n                            cl_khr_byte_addressable_store cl_khr_icd   \r\n</code></pre>\r\nTake note that the Intel OpenCL driver is loaded for a GPU device using <code>beignet</code>. This indicates the Installable Client Driver (ICD) is correctly installed. Also note the extensions listed.\r\n<h3>Applying the kernel patch to enable OpenCL shared local memory.</h3>\r\nIf you are using Beignet on a 4th generation Intel processor, you will need to apply a kernel patch to enable shared/local memory. This is a fairly lengthy process that will require at least 70 GB of hard disk space and perhaps an hour of compilation time if the build is executed in parallel.\r\n\r\nIn the next few paragraphs I\'ll walk you through how you can apply the kernel patch. I have based my instructions on the <a href=\"https://help.ubuntu.com/community/Kernel/Compile\">kernel compilation instructions for Ubuntu</a>. Instructions for other variants of Linux will be significantly different.\r\n\r\nInstall prerequisites:\r\n<pre><code>sudo apt-get build-dep linux-image-`uname -r`    \r\n</code></pre>\r\nMake a working directory for the kernel somewhere and download the source\r\n<pre><code>mkdir kernel\r\ncd kernel\r\napt-get source linux-image-`uname -r`    \r\n</code></pre>\r\nNext we see if we can automatically apply the patch. First download the patch:\r\n<pre><code>wget https://01.org/sites/default/files/disable-batchbuffer-security.patch    \r\n</code></pre>\r\nNow <code>cd</code> into the kernel directory:\r\n<pre><code>cd linux-3.16.0    \r\n</code></pre>\r\nCheck some details about the patch\r\n<pre><code>git apply --stat ../disable-batchbuffer-security.patch    \r\n</code></pre>\r\nTry automatically applying the patch:\r\n<pre><code>git apply --check ../disable-batchbuffer-security.patch    \r\n</code></pre>\r\nIf it automatically applies with no errors, just apply it:\r\n<pre><code>git apply ../disable-batchbuffer-security.patch    \r\n</code></pre>\r\nIf it did not work (as was the case on my system), the change is fairly simple. Open the <code>drivers/gpu/drm/i915/i915_gem_execbuffer.c</code> file in an editor:\r\n<pre><code>gedit drivers/gpu/drm/i915/i915_gem_execbuffer.c   \r\n</code></pre>\r\nIn the <code>i915_gem_do_execbuffer</code> function, find the following code:\r\n<pre><code>flags = 0;\r\nif (args-&gt;flags &amp; I915_EXEC_SECURE) {\r\n    if (!file-&gt;is_master || !capable(CAP_SYS_ADMIN))\r\n        return -EPERM;    \r\n</code></pre>\r\nAnd add the line <code>flags |= I915_DISPATCH_SECURE;</code> as follows:\r\n<pre><code>flags = 0;\r\nflags |= I915_DISPATCH_SECURE;\r\nif (args-&gt;flags &amp; I915_EXEC_SECURE) {\r\n    if (!file-&gt;is_master || !capable(CAP_SYS_ADMIN))\r\n        return -EPERM;  \r\n</code></pre>\r\nThis was inserted on line 998 for me. Save the file. Now we need to compile and install the modified kernel.\r\n\r\nNow we build the new kernel. Run the following commands from within the kernel source directory:\r\n<pre><code>fakeroot debian/rules clean\r\nDEB_BUILD_OPTIONS=parallel=8 fakeroot debian/rules binary-headers binary-generic    \r\n</code></pre>\r\nThis will build some Debian packages and place them in the directory <em>above</em> the kernel source root.\r\n\r\nAfter the kernel has compiled, install it:\r\n<pre><code>cd ../ (or go back into the kernel directory)\r\nsudo dpkg -i linux-headers-3.16.0-29-generic_3.16.0-29.54_amd64.deb \r\nsudo dpkg -i linux-image-3.16.0-29-generic_3.16.0-29.54_amd64.deb    \r\n</code></pre>\r\n(you might have to change the numeric kernel version to match what you compiled) Now add the kernel to the boot options:\r\n<pre><code>sudo update-grub\r\nsudo reboot    \r\n</code></pre>\r\nNow go back and re-run the Beignet unit test framework from above. With any luck everything will work fine.','OpenCL on Intel HD / Iris graphics on Linux','','inherit','closed','closed','','7739-revision-v1','','','2015-05-01 16:43:01','2015-05-01 16:43:01','',7739,'http://sandbox.arrayfire.com/7739-revision-v1/',0,'revision','',0),(8184,7,'2015-05-01 20:14:16','2015-05-01 20:14:16','[content_band inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"40px\" padding_bottom=\"40px\"][column type=\"two-fifths\"]\r\n\r\n[custom_headline type=\"left\" level=\"h3\"]If you want faster code, you\'ve come to the right place.[/custom_headline][gap size=\"15%\"][button  type=\"flat\" shape=\"rounded\" href=\"http://sandbox.arrayfire.com/download\" size=\"x-large\" block=\"true\"]Download ArrayFire[/button]\r\n\r\n[gap size=\"10%\"]\r\n\r\n[button  type=\"flat\" block=\"true\" shape=\"rounded\" href=\"http://sandbox.arrayfire.com/consulting/\" size=\"x-large\" ]Schedule a consultation[/button]\r\n\r\n[/column][column type=\"three-fifths\" last=\"true\"][gap size=\"7%\"]\r\n<div id=\"wistia_rj2bar3xxp\" class=\"wistia_embed\" style=\"width: 640px; height: 388px;\"></div>\r\n<script src=\"//fast.wistia.com/assets/external/E-v1.js\" charset=\"ISO-8859-1\"></script><script>// <![CDATA[\r\nwistiaEmbed = Wistia.embed(\"rj2bar3xxp\");\r\n// ]]></script>\r\n[/column]\r\n<div id=\"arrayfire\"></div>\r\n[/content_band]\r\n\r\n[content_band bg_color=\"#f2f2f2\" inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"40px\" padding_bottom=\"40px\"]\r\n\r\n[column type=\"one-third\" ][custom_headline type=\"left\" level=\"h3\" class=\"center-text\"][image src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/car-e1412967813807.png\" class=\"mbn\"] Faster Code[/custom_headline][line style=\"border-top: solid #999999;\"]ArrayFire is a blazing fast software library for GPU computing. Its easy-to-use API and array-based function set make GPU programming simple. A few lines of code in ArrayFire can replace dozens of lines of raw GPU code, saving you valuable time and lowering development costs.[/column]\r\n\r\n[column type=\"one-third\" ][custom_headline type=\"left\" level=\"h3\" class=\"center-text\"][image src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/09/mini-motorcycle-01-e1412969290876.png\" class=\"mbn\"] Hardware Neutral[/custom_headline][line style=\"border-top: solid #999999;\"]ArrayFire supports both CUDA-capable NVIDIA GPUs and most OpenCL devices, including AMD GPUs/APUs and Intel Xeon Phi co-processors. It also supports mobile OpenCL devices from ARM, Qualcomm, and others. We want your code to run as fast as possible, regardless of the hardware.[/column]\r\n\r\n[column type=\"one-third\" last=\"true\" ][custom_headline type=\"left\" level=\"h3\" class=\"center-text\"][image src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/09/mini-plane-01-e1412969527633.png\" class=\"mbn\"] Open Source[/custom_headline][line style=\"border-top: solid #999999;\"]ArrayFire is open source—it\'s all there and it\'s all free. Be sure to check out all of the ArrayFire functions (and a lot more!) in our excellent <a href=\"http://www.sandbox.arrayfire.com/docs/index.htm\">documentation</a>. And don\'t forget to visit our <a href=\"http://sandbox.arrayfire.com/forums/\">forums</a> to connect with the ArrayFire community and pick up acceleration tips and innovative best practices.[/column]\r\n<p style=\"text-align: center;\">[column type=\"one-third\" class=\"center-text\"][button  type=\"flat\" shape=\"rounded\" size=\"regular\" href=\"http://www.sandbox.arrayfire.com/docs/examples.htm\"]See some examples[/button][/column]</p>\r\n<p style=\"text-align: center;\">[column type=\"one-third\" class=\"center-text\"][button type=\"flat\" shape=\"rounded\" size=\"regular\" href=\"http://www.sandbox.arrayfire.com/download\"]Download ArrayFire[/button][/column]</p>\r\n<p style=\"text-align: center;\">[column type=\"one-third\" class=\"center-text\" last=\"true\"][button type=\"flat\" shape=\"rounded\" size=\"regular\" href=\"http://www.sandbox.arrayfire.com/docs/index.htm\"]View the documentation[/button][/column][gap size=\"3%\"][/content_band]</p>\r\n\r\n<div>\r\n\r\n[content_band inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"40px\" padding_bottom=\"40px\"][gap size=5%]\r\n\r\n&nbsp;\r\n<h3 style=\"text-align: center;\">Join the ArrayFire community</h3>\r\n&nbsp;\r\n<p style=\"text-align: center;\">[button  type=\"flat\" shape=\"rounded\" href=\"http://sandbox.arrayfire.com/download\" size=\"normal\" ]                    Get started                    [/button]</p>\r\n[/content_band]\r\n\r\n</div>','Home','','inherit','open','closed','','245-revision-v1','','','2015-05-01 20:14:16','2015-05-01 20:14:16','',245,'http://sandbox.arrayfire.com/245-revision-v1/',0,'revision','',0),(8185,7,'2015-05-01 20:14:49','2015-05-01 20:14:49','[content_band inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"40px\" padding_bottom=\"40px\"][column type=\"two-fifths\"]\r\n\r\n[custom_headline type=\"left\" level=\"h3\"]If you want faster code, you\'ve come to the right place.[/custom_headline][gap size=\"15%\"][button  type=\"flat\" shape=\"rounded\" href=\"http://sandbox.arrayfire.com/download\" size=\"x-large\" block=\"true\"]Download ArrayFire[/button]\r\n\r\n[gap size=\"10%\"]\r\n\r\n[button  type=\"flat\" block=\"true\" shape=\"rounded\" href=\"http://sandbox.arrayfire.com/consulting/\" size=\"x-large\" ]Schedule a consultation[/button]\r\n\r\n[/column][column type=\"three-fifths\" last=\"true\"][gap size=\"7%\"]\r\n<div id=\"wistia_rj2bar3xxp\" class=\"wistia_embed\" style=\"width: 640px; height: 388px;\"></div>\r\n<script src=\"//fast.wistia.com/assets/external/E-v1.js\" charset=\"ISO-8859-1\"></script><script>// <![CDATA[\r\nwistiaEmbed = Wistia.embed(\"rj2bar3xxp\");\r\n// ]]></script>\r\n[/column]\r\n<div id=\"arrayfire\"></div>\r\n[/content_band]\r\n\r\n[content_band bg_color=\"#f2f2f2\" inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"40px\" padding_bottom=\"40px\"]\r\n\r\n[column type=\"one-third\" ][custom_headline type=\"left\" level=\"h3\" class=\"center-text\"][image src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/car-e1412967813807.png\" class=\"mbn\"] Faster Code[/custom_headline][line style=\"border-top: solid #999999;\"]ArrayFire is a blazing fast software library for GPU computing. Its easy-to-use API and array-based function set make GPU programming simple. A few lines of code in ArrayFire can replace dozens of lines of raw GPU code, saving you valuable time and lowering development costs.[/column]\r\n\r\n[column type=\"one-third\" ][custom_headline type=\"left\" level=\"h3\" class=\"center-text\"][image src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/09/mini-motorcycle-01-e1412969290876.png\" class=\"mbn\"] Hardware Neutral[/custom_headline][line style=\"border-top: solid #999999;\"]ArrayFire supports both CUDA-capable NVIDIA GPUs and most OpenCL devices, including AMD GPUs/APUs and Intel Xeon Phi co-processors. It also supports mobile OpenCL devices from ARM, Qualcomm, and others. We want your code to run as fast as possible, regardless of the hardware.[/column]\r\n\r\n[column type=\"one-third\" last=\"true\" ][custom_headline type=\"left\" level=\"h3\" class=\"center-text\"][image src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/09/mini-plane-01-e1412969527633.png\" class=\"mbn\"] Open Source[/custom_headline][line style=\"border-top: solid #999999;\"]ArrayFire is open source—it\'s all there and it\'s all free. Be sure to check out all of the ArrayFire functions (and a lot more!) in our excellent <a href=\"http://www.sandbox.arrayfire.com/docs/index.htm\">documentation</a>. And don\'t forget to visit our <a href=\"http://sandbox.arrayfire.com/forums/\">forums</a> to connect with the ArrayFire community and pick up acceleration tips and innovative best practices.[/column]\r\n<p style=\"text-align: center;\">[column type=\"one-third\" class=\"center-text\"][button  type=\"flat\" shape=\"rounded\" size=\"regular\" href=\"http://www.sandbox.arrayfire.com/docs/examples.htm\"]See some examples[/button][/column]</p>\r\n<p style=\"text-align: center;\">[column type=\"one-third\" class=\"center-text\"][button type=\"flat\" shape=\"rounded\" size=\"regular\" href=\"http://www.sandbox.arrayfire.com/download\"]Download ArrayFire[/button][/column]</p>\r\n<p style=\"text-align: center;\">[column type=\"one-third\" class=\"center-text\" last=\"true\"][button type=\"flat\" shape=\"rounded\" size=\"regular\" href=\"http://www.sandbox.arrayfire.com/docs/index.htm\"]View the documentation[/button][/column][gap size=\"3%\"][/content_band]</p>\r\n\r\n<div>\r\n\r\n[content_band inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"40px\" padding_bottom=\"40px\"][gap size=5%]\r\n<h3 style=\"text-align: center;\">Join the ArrayFire community</h3>\r\n&nbsp;\r\n<p style=\"text-align: center;\">[button  type=\"flat\" shape=\"rounded\" href=\"http://sandbox.arrayfire.com/download\" size=\"normal\" ]                    Get started                    [/button]</p>\r\n[/content_band]\r\n\r\n</div>','Home','','inherit','open','closed','','245-revision-v1','','','2015-05-01 20:14:49','2015-05-01 20:14:49','',245,'http://sandbox.arrayfire.com/245-revision-v1/',0,'revision','',0),(8186,7,'2015-05-01 20:40:42','2015-05-01 20:40:42','[content_band inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"10px\" padding_bottom=\"40px\"][column type=\"one-half\"][custom_headline type=\"left\" level=\"h2\"]Login[/custom_headline]\r\n\r\n[theme-my-login][/column]\r\n\r\n[column type=\"one-half\" last=\"true\"][gap size=\"10%\"]\r\n<h4>Please log in to access the ArrayFire download page. If you haven\'t already done so, register first.</h4>\r\n[/column]\r\n\r\n[/content_band]','Log In','','inherit','open','closed','','5235-revision-v1','','','2015-05-01 20:40:42','2015-05-01 20:40:42','',5235,'http://sandbox.arrayfire.com/5235-revision-v1/',0,'revision','',0),(8187,7,'2015-05-01 20:47:25','2015-05-01 20:47:25','[content_band inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"10px\" padding_bottom=\"40px\"][column type=\"one-third\"][custom_headline type=\"left\" level=\"h2\"]Login[/custom_headline]\r\n\r\n[theme-my-login][/column]\r\n\r\n[column type=\"two-thirds\" last=\"true\"][gap size=\"10%\"]\r\n<h4>Get access to the ArrayFire download page by logging into your ArrayFire account. It\'s that easy.</h4>\r\n[/column]\r\n\r\n[/content_band]','Log In','','inherit','open','closed','','5235-revision-v1','','','2015-05-01 20:47:25','2015-05-01 20:47:25','',5235,'http://sandbox.arrayfire.com/5235-revision-v1/',0,'revision','',0),(8188,7,'2015-05-01 21:21:18','2015-05-01 21:21:18','[content_band inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"10px\" padding_bottom=\"40px\"]\r\n[custom_headline type=\"left\" level=\"h2\"]\r\nArrayFire Installers\r\n[/custom_headline]\r\n[custom_headline type=\"left\" level=\"h5\"]\r\nEach download contains both CUDA and OpenCL files.\r\n[/custom_headline]\r\n[gap size=\"6%\"]\r\n\r\n[column type=\"one-fourth\"][button  block=\"true\" class=\"center-text\" type=\"flat\" shape=\"rounded\" href=\"http://go.sandbox.arrayfire.com/l/37882/2015-03-19/lvvyk\" size=\"regular\" ]Windows, v3.0beta (64-bit)[/button][/column] [column type=\"one-fourth\"][button block=\"true\" type=\"flat\"  shape=\"rounded\" href=\"http://go.sandbox.arrayfire.com/l/37882/2015-03-19/lw515\" size=\"regular\" ]Linux, v3.0beta (64-bit)[/button][/column][column type=\"one-fourth\"][button  block=\"true\" type=\"flat\"  shape=\"rounded\" href=\"http://go.sandbox.arrayfire.com/l/37882/2015-03-19/ltx4p\" size=\"regular\" ]Mac OSX, v3.0beta (64-bit)[/button][/column] [column type=\"one-fourth\" last=\"true\"][button block=\"true\"  type=\"flat\"  shape=\"rounded\" href=\"http://go.sandbox.arrayfire.com/l/37882/2015-03-19/lw51f\" size=\"regular\" ]Tegra K1 v3.0beta (32-bit)[/button][/column][gap size=\"9%\"]\r\n\r\nCheck out our GitHub repository to <a href=\"https://github.com/arrayfire/arrayfire\">build from the source</a>.\r\n\r\nLooking for an older installer? <a href=\"http://sandbox.arrayfire.com/installer_archive\">Try here</a>.[/content_band]\r\n<p style=\"text-align: left;\">[content_band inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"10px\" padding_bottom=\"40px\" bg_color=\"#f1f1f1\"][column type=\"one-half\"][gap size=\"8%\"]<img class=\"aligncenter wp-image-5156\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/02/mobile_Exported1-e1395437261846.png\" alt=\"mobile_Exported\" width=\"233\" height=\"311\" />[/column][column type=\"one-half\" last=\"true\"]\r\n[custom_headline type=\"left\" level=\"h2\"]\r\nGreat. What now?\r\n[/custom_headline]</p>\r\n<p style=\"text-align: left;\">[gap size=\"5%\"]</p>\r\n<p style=\"text-align: left;\">Welcome to ArrayFire! You\'ve got an awesome library there—learn more about its features and functions on <a href=\"http://www.sandbox.arrayfire.com/docs/index.htm\">our documentation</a>.</p>\r\n<p style=\"text-align: left;\">In addition to our <a href=\"https://groups.google.com/forum/#!forum/arrayfire-users\">ArrayFire user group</a> and <a href=\"http://sandbox.arrayfire.com/blog/\">our blog</a>, we offer a plethora of <a href=\"http://sandbox.arrayfire.com/support/\">support options</a> to fit your needs.</p>\r\n<p style=\"text-align: left;\">Got a job that needs closer attention? Hire us! Our engineers are acceleration wizards. Check out our <a href=\"http://sandbox.arrayfire.com/consulting/\">consulting offerings</a>, or set up a free <a href=\"http://meetme.so/arrayfire\">technical consultation</a> with us today![/column]</p>\r\n<p style=\"text-align: left;\">[/content_band]</p>\r\n<p style=\"text-align: center;\"></p>','Download','','inherit','open','closed','','5931-revision-v1','','','2015-05-01 21:21:18','2015-05-01 21:21:18','',5931,'http://sandbox.arrayfire.com/5931-revision-v1/',0,'revision','',0),(8189,7,'2015-05-01 21:26:34','2015-05-01 21:26:34','','Download','','publish','open','closed','','download','','','2015-05-01 21:26:34','2015-05-01 21:26:34','',0,'http://sandbox.arrayfire.com/?p=8189',12,'nav_menu_item','',0),(8190,7,'2015-05-01 21:39:28','2015-05-01 21:39:28',' ','','','publish','open','closed','','8190','','','2018-08-22 21:35:30','2018-08-23 01:35:30','',0,'http://sandbox.arrayfire.com/?p=8190',6,'nav_menu_item','',0),(8191,7,'2015-05-01 21:39:28','2015-05-01 21:39:28',' ','','','publish','open','closed','','8191','','','2018-08-22 21:35:30','2018-08-23 01:35:30','',0,'http://sandbox.arrayfire.com/?p=8191',7,'nav_menu_item','',0),(8192,7,'2015-05-01 21:39:28','2015-05-01 21:39:28',' ','','','publish','open','closed','','8192','','','2018-08-22 21:35:30','2018-08-23 01:35:30','',0,'http://sandbox.arrayfire.com/?p=8192',11,'nav_menu_item','',0),(8193,7,'2015-05-01 21:39:28','2015-05-01 21:39:28','','Software','','publish','open','closed','','8193','','','2018-08-22 21:35:30','2018-08-23 01:35:30','',0,'http://sandbox.arrayfire.com/?p=8193',1,'nav_menu_item','',0),(8194,7,'2015-05-01 21:39:28','2015-05-01 21:39:28',' ','','','publish','open','closed','','8194','','','2018-08-22 21:35:30','2018-08-23 01:35:30','',0,'http://sandbox.arrayfire.com/?p=8194',10,'nav_menu_item','',0),(8196,7,'2015-05-01 21:39:28','2015-05-01 21:39:28','','Download','','publish','open','closed','','download-2','','','2018-08-22 21:35:30','2018-08-23 01:35:30','',0,'http://sandbox.arrayfire.com/?p=8196',3,'nav_menu_item','',0),(8197,7,'2015-05-01 21:39:28','2015-05-01 21:39:28','','Blog','','publish','open','closed','','blog-2','','','2018-08-22 21:35:30','2018-08-23 01:35:30','',0,'http://sandbox.arrayfire.com/?p=8197',14,'nav_menu_item','',0),(8199,7,'2015-05-01 21:39:28','2015-05-01 21:39:28','','Documentation','','publish','open','closed','','documentation-4','','','2018-08-22 21:35:30','2018-08-23 01:35:30','',0,'http://sandbox.arrayfire.com/?p=8199',4,'nav_menu_item','',0),(8200,7,'2015-05-01 21:39:28','2015-05-01 21:39:28','','User Group','','publish','open','closed','','user-group','','','2018-08-22 21:35:30','2018-08-23 01:35:30','',0,'http://sandbox.arrayfire.com/?p=8200',5,'nav_menu_item','',0),(8201,18528,'2015-05-04 18:00:32','2015-05-04 18:00:32','Introduction\r\n\r\nWith Intel CPUs making up nearly <a href=\"https://www.cpubenchmark.net/market_share.html\">80% of the CPU market</a> and <a href=\"http://jonpeddie.com/press-releases/details/gpu-market-upintel-and-nvidia-graphics-winners-in-q4-amd-down/\">66% of computers using integrated graphics</a> one can easily argue that integrated graphics devices represent one of the greatest markets for GPU-accelerated computing. Here at ArrayFire, we have long recognized the potential of these devices and offer built-in support for Intel CPUs, GPUs, and AMD APUs in the OpenCL backend of our <a href=\"http://www.arrayfire.com\">ArrayFire</a> GPU computing library. Yet one common theme for debate in the office has been how the hardware performs on different operating systems with different drivers across hardware revisions.\r\n\r\nTo answer these questions (and, perhaps, to win an office bet) I decided to write a series of blog posts about Intel\'s GPU OpenCL performance.\r\n\r\n<span style=\"line-height: 1.5;\">#</span>\r\n\r\nThis weekend we decided to\r\n\r\nthe high level of cache makes them interesting devices to program\r\n\r\nTo compare the performance we stepped back to one of our favorite problems: calculation\r\nof Pi by a Monte Carlo process.\r\n\r\n1. Single core CPU implementation\r\n2. A naive port of the CPU code into an OpenCL kernel, sum the results on the CPU\r\n3. Reduce the workload of the CPU by partially summing the results on the GPU\r\n4. Improve performance by using coalesced memory loads\r\n\r\nObjective:\r\nCompare the performance of OpenCL on Intel CPUs and Intel GPUs using both the\r\nstock (Intel-provided) drivers (on Windows) and the open-source project, Beignet\r\n\r\nMethod:\r\n* Use a classic benchmark: compute the value of Pi via. Monte Carlo methods\r\n* Using the current git master version of Beignet (commit acfc2a2799b9cb4153b7581f66a78b046fbb97ec)\r\n\r\nHardware:\r\n* ASUS N56V laptop\r\n* i7-3610QM CPU\r\n* HD Graphics 4000 GT2 GPU (16 EUs, 128 threads)\r\n\r\nOperating systems:\r\n* Ubuntu 14.10 with Beignet Release_v1.0.2\r\n\r\nResults:\r\n* Beignet is slightly slower on a i7-3610QM processor than Intel CPU\r\n* Beginet is 16-21x faster than a single-core CPU implementation for this problem\r\nspeedbird: Ubuntu Linux 14.10, Beignet, i7-3610QM, Intel(R) HD Graphics IvyBridge M GT2 (HD Graphics 4000)','Intel OpenCL performance: Windows vs. Linux','','inherit','open','closed','','8124-revision-v1','','','2015-05-04 18:00:32','2015-05-04 18:00:32','',8124,'http://sandbox.arrayfire.com/8124-revision-v1/',0,'revision','',0),(8202,18528,'2015-05-04 18:33:00','2015-05-04 18:33:00','<h2>Introduction</h2>\r\nWith Intel CPUs making up nearly <a href=\"https://www.cpubenchmark.net/market_share.html\">80% of the CPU market</a> and <a href=\"http://jonpeddie.com/press-releases/details/gpu-market-upintel-and-nvidia-graphics-winners-in-q4-amd-down/\">66% of computers using integrated graphics</a> one can easily argue that integrated graphics devices represent one of the greatest markets for GPU-accelerated computing. Here at ArrayFire, we have long recognized the potential of these devices and offer built-in support for Intel CPUs, GPUs, and AMD APUs in the OpenCL backend of our <a href=\"http://www.arrayfire.com\">ArrayFire</a> GPU computing library. Yet one common theme for debate in the office has been how the hardware performs on different operating systems with different drivers across hardware revisions.\r\n\r\nTo answer these questions (and, perhaps, to win some intra-office geek cred) I decided to write a series of blog posts about Intel\'s GPU OpenCL performance. In this first installment I will compare the performance of OpenCL on Intel GPUs on Linux (via. the Beigenet driver) and Windows (via. Intel\'s driver).\r\n<h2>The problem: Monte Carlo Pi estimation</h2>\r\nTo evaluate the performance of Intel\'s hardware I took a textbook problem of computing Pi by Monte Carlo methods and converted it to the GPU, and then applied the typical optimizations that one would do for GPU programming (more on these in a moment).\r\n<ol>\r\n	<li>Generate a series of random (x,y) pairs from within the <a href=\"http://en.wikipedia.org/wiki/Unit_square\">unit square</a></li>\r\n	<li>Determine which of these samples reside within the <a href=\"http://en.wikipedia.org/wiki/Unit_circle\">unit circle</a></li>\r\n	<li>Compute the ratio of the samples that reside within the square to those which reside within the circle and then multiply by four (to account for this being only one quadrant of a circle).</li>\r\n</ol>\r\nThere is a great visualization of this process and a demonstration of how the <a href=\"http://commons.wikimedia.org/wiki/File:Pi_30K.gif\">number of samples impacts the Pi estimate on wikipedia</a>.\r\n\r\nIf you were to implement this in C/C++, your code might look like this:\r\n<pre class=\"lang:default decode:true\" title=\"Sample CPU code for Monte Carlo Pi estimation\">...\r\n\r\nint count = 0;\r\nfloat x, y;\r\nvector&lt;float&gt; randomNums(2*samples);\r\n\r\n// init random numbers within the unit square.\r\n// Pack as (x,y) pairs\r\nfor(int i = 0; i &lt; 2*samples; i++)	{\r\n	randomNums[i] = float(rand()) / RAND_MAX;\r\n}\r\n\r\n// count how many samples reside in the circle\r\nfor(int i = 0; i &lt; samples; i++)\r\n{\r\n	x = randomNums[2*i];\r\n	y = randomNums[2*i + 1];\r\n\r\n	if(x*x + y*y &lt; 1.0)\r\n		count++;\r\n}\r\n\r\n// calculate the estimate and print the result\r\nfloat pi_estimate = 4 * float(count) / samples;\r\n\r\n...</pre>\r\n<h2>Benchmark methods</h2>\r\n&nbsp;\r\n\r\nWe implemented four different versions of the Pi problem with small changes in the implementation which test various aspects of the hardware and software. These five implementations are:\r\n<ol>\r\n	<li>Single core CPU - A direct implementation of the code listing above</li>\r\n	<li>A naive port of the CPU code to the GPU with no optimizations. Region testing is performed on the GPU and the  result is summed on the CPU</li>\r\n	<li>An effort to reduce the workload of the CPU by partially summing the region testing results on the GPU</li>\r\n	<li>A classic GPU optimization using coalesced memory load/stores</li>\r\n	<li>And a final integrated-device specific optimization that uses <a href=\"http://sandbox.arrayfire.com/zero-copy-on-integrated-gpus/\">zero-copy memory buffers</a></li>\r\n</ol>\r\nFor these tests we used a few-year old ASUS N56V laptop we had in the office which features an Intel i7-3610QM CPU with a HD Graphics 4000 GT2 GPU. This particular GPU has 16 execution units which can host up to 128 concurrent threads. We installed Window 7 (Intel OpenCL driver 10.18.10.3958) and Ubuntu 14.10 (Beignet 1.1, git acfc2a2).\r\n<h2>Results</h2>\r\n&nbsp;\r\n<h2>Next steps</h2>\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\nResults:\r\n* Beignet is slightly slower on a i7-3610QM processor than Intel CPU\r\n* Beginet is 16-21x faster than a single-core CPU implementation for this problem\r\nspeedbird: Ubuntu Linux 14.10, Beignet, i7-3610QM, Intel(R) HD Graphics IvyBridge M GT2 (HD Graphics 4000)','Intel OpenCL performance: Windows vs. Linux','','inherit','open','closed','','8124-revision-v1','','','2015-05-04 18:33:00','2015-05-04 18:33:00','',8124,'http://sandbox.arrayfire.com/8124-revision-v1/',0,'revision','',0),(8204,18528,'2015-05-04 19:35:07','2015-05-04 19:35:07','<h2>Introduction</h2>\r\nWith Intel CPUs making up nearly <a href=\"https://www.cpubenchmark.net/market_share.html\">80% of the CPU market</a> and <a href=\"http://jonpeddie.com/press-releases/details/gpu-market-upintel-and-nvidia-graphics-winners-in-q4-amd-down/\">66% of computers using integrated graphics</a> one can easily argue that integrated graphics devices represent one of the greatest markets for GPU-accelerated computing. Here at ArrayFire, we have long recognized the potential of these devices and offer built-in support for Intel CPUs, GPUs, and AMD APUs in the OpenCL backend of our <a href=\"http://www.arrayfire.com\">ArrayFire</a> GPU computing library. Yet one common theme for debate in the office has been how the hardware performs on different operating systems with different drivers across hardware revisions.\r\n\r\nTo answer these questions (and, perhaps, to win some intra-office geek cred) I decided to write a series of blog posts about Intel\'s GPU OpenCL performance. In this first installment I will compare the performance of OpenCL on Intel GPUs on Linux (via. the Beigenet driver) and Windows (via. Intel\'s driver).\r\n<h2>The problem: Monte Carlo Pi estimation</h2>\r\nTo evaluate the performance of Intel\'s hardware I took a textbook problem of computing Pi by Monte Carlo methods and converted it to the GPU, and then applied the typical optimizations that one would do for GPU programming (more on these in a moment).\r\n<ol>\r\n	<li>Generate a series of random (x,y) pairs from within the <a href=\"http://en.wikipedia.org/wiki/Unit_square\">unit square</a></li>\r\n	<li>Determine which of these samples reside within the <a href=\"http://en.wikipedia.org/wiki/Unit_circle\">unit circle</a></li>\r\n	<li>Compute the ratio of the samples that reside within the square to those which reside within the circle and then multiply by four (to account for this being only one quadrant of a circle).</li>\r\n</ol>\r\nThere is a great visualization of this process and a demonstration of how the <a href=\"http://commons.wikimedia.org/wiki/File:Pi_30K.gif\">number of samples impacts the Pi estimate on wikipedia</a>.\r\n\r\nIf you were to implement this in C/C++, your code might look like this:\r\n<pre class=\"lang:default decode:true\" title=\"Sample CPU code for Monte Carlo Pi estimation\">...\r\n\r\nint count = 0;\r\nfloat x, y;\r\nvector&lt;float&gt; randomNums(2*samples);\r\n\r\n// init random numbers within the unit square.\r\n// Pack as (x,y) pairs\r\nfor(int i = 0; i &lt; 2*samples; i++)	{\r\n	randomNums[i] = float(rand()) / RAND_MAX;\r\n}\r\n\r\n// count how many samples reside in the circle\r\nfor(int i = 0; i &lt; samples; i++)\r\n{\r\n	x = randomNums[2*i];\r\n	y = randomNums[2*i + 1];\r\n\r\n	if(x*x + y*y &lt; 1.0)\r\n		count++;\r\n}\r\n\r\n// calculate the estimate and print the result\r\nfloat pi_estimate = 4 * float(count) / samples;\r\n\r\n...</pre>\r\n<h2>Benchmark methods</h2>\r\nWe implemented four different versions of the Pi problem with small changes in the implementation which test various aspects of the hardware and software. These five implementations are:\r\n<ol>\r\n	<li>Single core CPU - A direct implementation of the code listing above</li>\r\n	<li>A naive port of the CPU code to the GPU with no optimizations. Region testing is performed on the GPU and the  result is summed on the CPU</li>\r\n	<li>An effort to reduce the workload of the CPU by partially summing the region testing results on the GPU</li>\r\n	<li>A classic GPU optimization using coalesced memory load/stores</li>\r\n	<li>And a final integrated-device specific optimization that uses <a href=\"http://sandbox.arrayfire.com/zero-copy-on-integrated-gpus/\">zero-copy memory buffers</a></li>\r\n</ol>\r\nFor these tests we used a few-year old ASUS N56V laptop we had in the office which features an Intel i7-3610QM CPU with a HD Graphics 4000 GT2 GPU. This particular GPU has 16 execution units which can host up to 128 concurrent threads. We installed Window 7 (Intel OpenCL driver 10.18.10.3958) and Ubuntu 14.10 (Beignet 1.1, git acfc2a2). In future blog posts we will cover 4th and 5th generation hardware (including Iris pro).\r\n<h2>Results</h2>\r\n<iframe width=\"600\" height=\"371\" seamless=\"\" frameborder=\"0\" scrolling=\"no\" src=\"https://docs.google.com/spreadsheets/d/1vMeMPs4d78wsbURINCKmAFDFBwIFzpAl438Q-geoeNs/pubchart?oid=2103791532&amp;format=interactive\"></iframe>\r\n\r\nasdf\r\n<h2>Next steps</h2>\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\nResults:\r\n* Beignet is slightly slower on a i7-3610QM processor than Intel CPU\r\n* Beginet is 16-21x faster than a single-core CPU implementation for this problem\r\nspeedbird: Ubuntu Linux 14.10, Beignet, i7-3610QM, Intel(R) HD Graphics IvyBridge M GT2 (HD Graphics 4000)','Intel GPU OpenCL performance: Windows vs. Linux','','inherit','open','closed','','8124-revision-v1','','','2015-05-04 19:35:07','2015-05-04 19:35:07','',8124,'http://sandbox.arrayfire.com/8124-revision-v1/',0,'revision','',0),(8205,7,'2015-05-04 19:36:18','2015-05-04 19:36:18','[content_band inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"10px\" padding_bottom=\"40px\"][column type=\"one-half\"][custom_headline type=\"left\" level=\"h2\"]Call the ArrayFire team[/custom_headline]\r\n\r\nHire us to accelerate your code, train your pros, or even write new code for your organization!\r\n\r\nWe’ve already helped thousands of organizations speed up their code. We’ve accelerated algorithms,  sped up data sets, and solved challenging problems of all types in the past, and we’re confident that we can accelerate your code, too.\r\n\r\nStart by setting up a free consultation to discuss your project with an ArrayFire expert today!\r\n\r\n[gap size=\"5%\"][button  type=\"flat\" shape=\"rounded\" href=\"http://meetme.so/arrayfire\" size=\"normal\" ]Schedule a consultation[/button][/column][column type=\"one-half\" last=\"true\" class=\"center-text\"][gap size=\"15%\"]<img class=\"aligncenter wp-image-462\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/Bat-signal.png\" alt=\"Bat signal\" width=\"700\" height=\"437\" />[/column][gap size=\"2%\"][/content_band][content_band bg_image=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/11/Epipheo-background1.png\" parallax=\"true\" inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"40px\" padding_bottom=\"40px\"][gap size=\"2%\"]\r\n<p style=\"text-align: left;\">[column type=\"one-third\" ][promo image=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/10/lincoln-logo-promo-01.png\" alt=\"Lincoln Financial Group\"]Lincoln Financial Group ported their CPU code (C/C++) to CUDA. Before porting to CUDA, they required 10-12 hours to run the entire code. After porting to CUDA, they were able to do the same work in about 30 minutes.</p>\r\n<p style=\"text-align: center;\">[button type=\"flat\" shape=\"rounded\" href=\"http://sandbox.arrayfire.com/case-study-lincoln-financial-group/\" size=\"regular\" ]Read the case study[/button][/promo][/column]</p>\r\n<p style=\"text-align: left;\">[column type=\"one-third\"][promo image=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/10/glasses-logo-promo-01.png\" alt=\"Glasses.com\"]The Glasses.com app relies on computer vision to recognize the features of a user’s face. The application then generates an accurate, high-fidelity, three-dimensional model of that face, and virtually places selected frames on the image.</p>\r\n<p style=\"text-align: center;\">[button type=\"flat\" shape=\"rounded\" href=\"http://sandbox.arrayfire.com/case-study-glasses-com-app-with-3dfit-technology/\" size=\"regular\" ]Read the case study[/button][/promo][/column]</p>\r\n<p style=\"text-align: left;\">[column type=\"one-third\" last=\"true\"][promo image=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/10/reveal-logo-promo-01.png\" alt=\"Reveal Imaging\"]Reveal Imaging, an SAIC company, uses ArrayFire in developing threat-detection products for transportation systems—such as cargo and baggage screening in airports—and in securing facilities and public events.</p>\r\n<p style=\"text-align: center;\">[button type=\"flat\" shape=\"rounded\" href=\"http://sandbox.arrayfire.com/case-study-reveal-imaging/\" size=\"regular\" ]Read the case study[/button][/promo][/column]</p>\r\n\r\n<div id=\"starter\"></div>\r\n[/content_band]\r\n\r\n[content_band bg_color=\"#f2f2f2\" inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"10px\" padding_bottom=\"40px\"]\r\n\r\n[column type=\"one-half\"] [custom_headline type=\"left\" level=\"h2\"]Starter Package ($799) [/custom_headline] Hire us for a single day. We\'ll match you with one engineer dedicated for a full day, supported by senior and test engineers throughout the day. Here\'s how it works:\r\n\r\n[icon_list] [icon_list_item type=\"angle-double-right\"]We conduct an initial phone call.[/icon_list_item] [icon_list_item type=\"angle-double-right\"]You send us your code or algorithm. [/icon_list_item] [icon_list_item type=\"angle-double-right\"]We analyze your code for potential GPU benefit.[/icon_list_item][icon_list_item type=\"angle-double-right\"]We accelerate as much of your code as is possible within the one-day effort, applying our extensive GPU software libraries.[/icon_list_item][icon_list_item type=\"angle-double-right\"]We produce a final report for you, along with your optimized code.[/icon_list_item] [/icon_list] The final report outlines the best approach to follow for full GPU-acceleration of your code.\r\n\r\n[button type=\"flat\"  shape=\"rounded\" size=\"regular\" href=\"http://sandbox.arrayfire.com/product-category/starter-package/\" title=\"Starter Package\"]Get the Starter Package[/button]\r\n\r\n&nbsp;\r\n\r\n[/column][column type=\"one-half\" last=\"true\" ][gap size=\"15%\"]<img class=\"aligncenter wp-image-4962\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/02/Benchmark-guy-torso-opposite.png\" alt=\"Benchmark guy, torso opposite\" width=\"450\" height=\"397\" />[/column]\r\n<div></div>\r\n[/content_band]\r\n\r\n[content_band inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"10px\" padding_bottom=\"40px\" ]\r\n\r\n[column type=\"one-half\"]\r\n\r\n&nbsp;\r\n\r\n[gap size=\"12%\"]\r\n\r\n<img class=\"aligncenter size-large wp-image-5100\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/Triumvirate_Exported-1024x599.png\" alt=\"Triumvirate_Exported\" width=\"742\" height=\"434\" />[/column]\r\n\r\n[column type=\"one-half\"  last=\"true\" ]\r\n\r\n[custom_headline type=\"left\" level=\"h2\" ]Custom coding[/custom_headline]\r\n\r\nYour hardware can do anything, given the right code. Getting that code right can be tricky when your team is swamped in work or when you\'re new to parallel programming. Bring us in—our team is capable of writing custom code that\'s as unique as your work and tailored to your task. Here\'s what we bring to the table:\r\n\r\n[icon_list] [icon_list_item type=\"angle-double-right\"]Excellence in GPU code[/icon_list_item] [icon_list_item type=\"angle-double-right\"]Well-written, efficient C, C++, Fortran, Java, or .NET [/icon_list_item] [icon_list_item type=\"angle-double-right\"]Application porting and integration[/icon_list_item][icon_list_item type=\"angle-double-right\"]Tuning software to peak hardware performance[/icon_list_item][icon_list_item type=\"angle-double-right\"]Scalability of algorithms to handle enterprise-level programs[/icon_list_item] [/icon_list][button  type=\"flat\" shape=\"rounded\" href=\"http://meetme.so/arrayfire\" size=\"regular\" ]Schedule a consultation[/button][/column] [/content_band]','Consulting','','inherit','open','closed','','6634-revision-v1','','','2015-05-04 19:36:18','2015-05-04 19:36:18','',6634,'http://sandbox.arrayfire.com/6634-revision-v1/',0,'revision','',0),(8206,7,'2015-05-04 19:36:52','2015-05-04 19:36:52','<div>\r\n\r\n[content_band inner_container=\"true\" no_margin=\"true\" border=\"top\" padding_top=\"40px\" padding_bottom=\"40px\"]\r\n[column type=\"one-half\"][custom_headline type=\"left\" level=\"h3\"  ]Mobile GPU Computing[/custom_headline]\r\n\r\nMobile GPUs offer accelerated performance. If you would like to use ArrayFire in a mobile application or if you would like to hire our mobile acceleration services, email us at <a href=\"mailto:sales@arrayfire.com\" target=\"_blank\">sales@arrayfire.com</a> and include a description of your application.\r\n\r\nOur clients have achieved between 5X to 30X speed boosts for convolutions and other compute functions on mobile devices. It enables:[icon_list][icon_list_item type=\"angle-double-right\"]Real-time video processing[/icon_list_item][icon_list_item type=\"angle-double-right\"]Better augmented reality [/icon_list_item][icon_list_item type=\"angle-double-right\"]Better computational photograph[/icon_list_item][icon_list_item type=\"angle-double-right\"]Faster data processing[/icon_list_item][/icon_list]\r\n\r\nAll mobile devices have a GPU which can deliver greater compute throughput than the CPU. Why not use the GPU to make your app faster?[/column][column type=\"one-half\" fade=\"true\" last=\"true\" fade_animation=\"in-from-right\" class=\"center-text\"][gap size=\"10%\"][image src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/02/mobile_Exported1-e1395437261846.png\"][/column]\r\n<div></div>\r\n[/content_band]\r\n\r\n</div>','Mobile','','inherit','open','closed','','6631-revision-v1','','','2015-05-04 19:36:52','2015-05-04 19:36:52','',6631,'http://sandbox.arrayfire.com/6631-revision-v1/',0,'revision','',0),(8207,7,'2015-05-04 19:37:09','2015-05-04 19:37:09','[content_band inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"10px\" padding_bottom=\"40px\"]\r\n\r\n[column type=\"one-half\"][custom_headline type=\"left\" level=\"h2\" ]Choose your own support[/custom_headline]\r\n\r\nEveryone could use a hand now and then. Choose from among three ArrayFire support packages, or simply go hour-by-hour. Whatever your level of need, the ArrayFire team is here for you.\r\n\r\nOur ArrayFire developers are the best in the business. With a support package, you can tap into their extensive knowledge base directly—no more waiting for forums, and no sketchy responses from Joe Schmo. Don\'t lose precious time and money fumbling for answers. Get some support.\r\n\r\nSupport issues generally include installation, compilation, builds for unique systems, debugging, ArrayFire feature development, and profiling. Custom code development would be better serviced via our <a href=\"http://sandbox.arrayfire.com/?page_id=6634\">consulting services</a>.\r\n\r\n[button type=\"flat\" shape=\"rounded\" size=\"regular\" href=\"http://meetme.so/arrayfire\"]Schedule a support consultation[/button][/column][column type=\"one-half\" last=\"true\"][gap size=\"10%\"]\r\n\r\n<img class=\"aligncenter wp-image-4822\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/dj-Flame-1024x769.png\" alt=\"dj Flame\" width=\"506\" height=\"380\" />[/column][/content_band]\r\n\r\n[content_band bg_color=\"#F2f2f2\" inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"10px\" padding_bottom=\"40px\"][gap size=\"4%\"]\r\n\r\n[column type=\"three-fourths\"][pricing_table columns=\"3\"] [pricing_table_column title=\"Smolder\" currency=\"$\" price=\"500/mo.\" interval=\"$4,800 Annual Prepay (20% discount)\" ][icon_list][icon_list_item type=\"star\"]2 hours of support[/icon_list_item][icon_list_item type=\"star\"]48-hour response time[/icon_list_item][icon_list_item type=\"times-circle\" ]Phone support[/icon_list_item][icon_list_item type=\"times-circle\" ]Dedicated engineer[/icon_list_item][/icon_list][button shape=\"rounded\" href=\"http://sandbox.arrayfire.com/product/smolder-support-package-monthly/\"  title=\"Example\"]Go Smolder[/button] [/pricing_table_column] [pricing_table_column  featured=\"true\" featured_sub=\"Most Popular\" title=\"Flame\" currency=\"$\" price=\"750/mo.\" interval=\"$7,200 Annual Prepay (20% discount)\" ][icon_list][icon_list_item type=\"star\"]5 hours of support[/icon_list_item][icon_list_item type=\"star\"]24-hour response time[/icon_list_item][icon_list_item type=\"star\"]Phone support[/icon_list_item][icon_list_item type=\"star\" ]Dedicated engineer[/icon_list_item][/icon_list][button shape=\"rounded\"  size=\"x-large\" href=\"http://sandbox.arrayfire.com/product/blaze-support-package-monthly/\" title=\"Example\"]Go Flame[/button][/pricing_table_column] [pricing_table_column title=\"Inferno\" currency=\"$\" price=\"999/mo.\" interval=\"$9,590 Annual Prepay (20% discount)\"][icon_list][icon_list_item type=\"star\"]10 hours of support[/icon_list_item][icon_list_item type=\"star\"]2-hour response time[/icon_list_item][icon_list_item type=\"star\" ]Phone support[/icon_list_item][icon_list_item type=\"star\"]Dedicated engineer[/icon_list_item][/icon_list][button shape=\"rounded\" href=\"http://sandbox.arrayfire.com/product/inferno-support-package-monthly/\" title=\"Example\"]Go Inferno[/button][/pricing_table_column][/pricing_table][/column][column type=\"one-fourth\" last=\"true\"][pricing_table columns=\"1\"][pricing_table_column  title=\"Hourly\" currency=\"$\" price=\"200/hr.\" interval=\".\"][icon_list][icon_list_item]As needed[/icon_list_item][icon_list_item]As available[/icon_list_item][icon_list_item type=\"star\"]Phone support[/icon_list_item][icon_list_item type=\"star\"]Dedicated engineer[/icon_list_item][/icon_list][button shape=\"rounded\" href=\"http://sandbox.arrayfire.com/product/custom-application-consulting-hourly-rate/\" title=\"Example\"]Go Hourly[/button][/pricing_table_column] [/pricing_table][/column]\r\n\r\n[column type=\"one-half\"][custom_headline type=\"left\" level=\"h2\" ]FAQs[/custom_headline]\r\n\r\n<strong>What\'s the advantage to having a support package rather than the hourly support?</strong>\r\n\r\nHour-to-hour, most of our support packages are more economical. Additionally, all support packages have priority status over hourly support. Issues submitted by those having support packages will be placed at the top of the support queue. We will respond to hourly purchases as our engineers become available.\r\n\r\n<strong>What do you mean by \"dedicated engineer\"?</strong>\r\n\r\nBy \"dedicated engineer\" we  mean that you will be matched with a specific engineer when you sign up. That engineer will be your point-man for the length of your purchase period. No carousel of strangers, unfamiliar with your work—just answers from your trusty ArrayFire engineer.\r\n\r\n<strong>If I don\'t use my monthly allotment of support, will the unused hours rollover?</strong>\r\n\r\nNo, there\'s no hoarding of hours here. We like to make sure our engineers are available to all who need assistance.\r\n\r\n[/column]\r\n\r\n[column type=\"one-half\" last=\"true\"][gap size=\"20%\"]\r\n\r\n<strong>I\'m new to GPU computing, and I\'m not sure what I need. What do you suggest?</strong>\r\n\r\nAwesome. Welcome to the world of parallel processing! We recommend that you look into our <a href=\"http://sandbox.arrayfire.com/?page_id=6634/#starter\">Starter Package</a>. This is a great option for first-timers as well as pros looking for a general assessment of their code.\r\n\r\n<strong>If I buy a support package, am I limited to those hours?</strong>\r\n\r\nNo. The indicated hours of support are included in your support package, but should you require more, you may purchase additional support at our hourly rate.\r\n\r\n<strong>So you guys are accessible all day and all night, weekends included?</strong>\r\n\r\nNegative. These response times are limited to standard operating hours, Monday through Friday, 8:00 am-5:00 pm EST. [/column]\r\n<p class=\"x-code\">[/content_band]</p>','Support','','inherit','open','closed','','6648-revision-v1','','','2015-05-04 19:37:09','2015-05-04 19:37:09','',6648,'http://sandbox.arrayfire.com/6648-revision-v1/',0,'revision','',0),(8208,7,'2015-05-04 19:37:19','2015-05-04 19:37:19','[content_band inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"10px\" padding_bottom=\"40px\" ]\r\n\r\n[column type=\"one-half\"][custom_headline type=\"left\" level=\"h2\" ]Train your team[/custom_headline] Attendees will receive the latest industry knowledge and techniques for GPU computing in CUDA and OpenCL.\r\n\r\nArrayFire offers up to four days of specialized GPU training in CUDA and OpenCL programming. We provide customized on-site training courses for customers that have 3 or more attendees from their organization. We can travel to your location and provide a CUDA or OpenCL training course tailored to meet your application-specific needs. We also offer individual trainings at our Atlanta office.\r\n\r\nWe recommend that attendees have a working knowledge of C/C++ in order to gain the most from the training courses.\r\n\r\n[button type=\"flat\" shape=\"rounded\"  size=\"regular\" href=\"mailto:sales@arrayfire.com?Subject=Training%20Inquiry\"]Contact us about a training[/button]\r\n\r\n[/column]\r\n\r\n[column type=\"one-half\" last=\"true\" fade=\"true\" fade_animation=\"in-from-right\" class=\"center-text\"][gap size=\"15%\"][image src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/02/Professor-AF_Exported-e1395436350363.png\" ][/column]\r\n\r\n[/content_band][content_band bg_color=\"#F2f2f2\" inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"10px\" padding_bottom=\"40px\" ]\r\n\r\n[column type=\"one-half\"][gap size=\"10%\"]<img class=\"aligncenter wp-image-4806\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/gears1-e1395437543311.png\" alt=\"gears\" width=\"427\" height=\"400\" />\r\n\r\n[/column][column type=\"one-half\" last=\"true\"]\r\n\r\n[custom_headline type=\"left\" level=\"h2\"]Included in the course[/custom_headline]\r\n\r\nYou provide the minds, and we\'ll take care of the rest. Each training comes with the following:\r\n\r\n[icon_list] [icon_list_item type=\"angle-double-right\"]Instruction by an excellent and interesting expert[/icon_list_item] [icon_list_item type=\"angle-double-right\"]Hands-on exercises[/icon_list_item][icon_list_item type=\"angle-double-right\"]Use of a laptop with CUDA and OpenCL capable GPUs and CPUs [/icon_list_item] [icon_list_item type=\"angle-double-right\"]Choice of Linux or Windows operating system[/icon_list_item][icon_list_item type=\"angle-double-right\"]Printed manual of lecture material[/icon_list_item][icon_list_item type=\"angle-double-right\"]Electronic copy of programming exercises[/icon_list_item][/icon_list]\r\n\r\n[button type=\"flat\" shape=\"rounded\"  size=\"regular\" href=\"mailto:sales@arrayfire.com?Subject=Training%20Inquiry\"]Go ahead, contact us about a training[/button]\r\n\r\n[/column][/content_band]\r\n\r\n[content_band bg_image=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/11/Epipheo-background1.png\" parallax=\"true\" inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"10px\" padding_bottom=\"40px\" ]\r\n\r\n[blockquote cite=\"<span style=\"color: #ffffff;\">Brian Rapp</span>\" type=\"center\"]<span style=\"color: #ffffff;\">One can\'t ask for better individualized instruction than the environment I was fortunate enough to encounter.</span> <span style=\"color: #ffffff;\">The instructor was able to completely focus on my particular needs and concerns.</span>\r\n\r\n<span style=\"color: #ffffff;\">—Brian Rapp,  U.S. Army Research Lab</span>[/blockquote]\r\n\r\n[/content_band]\r\n\r\n[content_band inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"10px\" padding_bottom=\"40px\" ]\r\n\r\n[custom_headline type=\"left\" level=\"h2\"]Training Syllabus[/custom_headline] [column type=\"one-half\"] [custom_headline type=\"left\" level=\"h5\"  accent=\"false\"]Day 1, Introduction[/custom_headline] Lectures:\r\nGPU Computing Overview\r\nThe Programming Model\r\nBasic Dataset Mapping Techniques\r\nLibraries, ArrayFire\r\nProfiling Tools\r\n\r\nPractice:\r\nA Simple Kernel\r\nEquivalent ArrayFire Example\r\nUsing Libraries\r\nMonte Carlo Pi Estimation\r\nTiming and ArrayFire\r\nDebugging Code\r\n\r\n[custom_headline type=\"left\" level=\"h5\" accent=\"false\"]Day 3, Multi-GPU[/custom_headline] Lectures (customizable):\r\nMulti-GPU Use Cases\r\nMulti-GPUs: Contexts\r\nExisting Libraries\r\nScaling Across Multiple GPUs\r\n\r\nPractice:\r\nOut of Core Problems: Matrix Multiply\r\nTask Level Parallelism: Optimization\r\nArrayFire Multi-GPU[/column]\r\n\r\n[column type=\"one-half\" last=\"true\"] [custom_headline type=\"left\" level=\"h5\" accent=\"false\"]Day 2, Optimization[/custom_headline] Lectures:\r\nArchitecture: Grids, Blocks, and Threads\r\nMemory Model: Global, Shared, and Constant Memory\r\nAdvanced Mapping Techniques\r\nStreams: Asynchronos Launches and Concurrent Execution\r\nArrayFire: Lazy Evaluation and Code Vectorization\r\n\r\nPractice:\r\nMatrix Transpose\r\nOptimization Using Shared Memory\r\nMedian Filter\r\nOptimization Using Constant Memory\r\nStream Example\r\nArrayFire Example: Nearest Neighbor Algorithm\r\n\r\n[custom_headline type=\"left\" level=\"h5\" accent=\"false\"]Day 4, Algorithm Problems[/custom_headline]\r\n\r\nLectures and Practice (customizable):\r\nReductions\r\nScan Algorithms\r\nSort\r\nConvolution\r\nCustomer-Specific Problem\r\n\r\n[button type=\"flat\" shape=\"rounded\"  size=\"regular\" href=\"mailto:sales@arrayfire.com?Subject=Training%20Inquiry\"]Okay, <em>now </em>contact us about a training[/button][/column][/content_band]','Training','','inherit','open','closed','','6640-revision-v1','','','2015-05-04 19:37:19','2015-05-04 19:37:19','',6640,'http://sandbox.arrayfire.com/6640-revision-v1/',0,'revision','',0),(8209,18528,'2015-05-04 19:39:10','2015-05-04 19:39:10','<h2>Introduction</h2>\r\nWith Intel CPUs making up nearly <a href=\"https://www.cpubenchmark.net/market_share.html\">80% of the CPU market</a> and <a href=\"http://jonpeddie.com/press-releases/details/gpu-market-upintel-and-nvidia-graphics-winners-in-q4-amd-down/\">66% of computers using integrated graphics</a> one can easily argue that integrated graphics devices represent one of the greatest markets for GPU-accelerated computing. Here at ArrayFire, we have long recognized the potential of these devices and offer built-in support for Intel CPUs, GPUs, and AMD APUs in the OpenCL backend of our <a href=\"http://www.arrayfire.com\">ArrayFire</a> GPU computing library. Yet one common theme for debate in the office has been how the hardware performs on different operating systems with different drivers across hardware revisions.\r\n\r\nTo answer these questions (and, perhaps, to win some intra-office geek cred) I decided to write a series of blog posts about Intel\'s GPU OpenCL performance. In this first installment I will compare the performance of OpenCL on Intel GPUs on Linux (via. the Beigenet driver) and Windows (via. Intel\'s driver).\r\n<h2>The problem: Monte Carlo Pi estimation</h2>\r\nTo evaluate the performance of Intel\'s hardware I took a textbook problem of computing Pi by Monte Carlo methods and converted it to the GPU, and then applied the typical optimizations that one would do for GPU programming (more on these in a moment).\r\n<ol>\r\n	<li>Generate a series of random (x,y) pairs from within the <a href=\"http://en.wikipedia.org/wiki/Unit_square\">unit square</a></li>\r\n	<li>Determine which of these samples reside within the <a href=\"http://en.wikipedia.org/wiki/Unit_circle\">unit circle</a></li>\r\n	<li>Compute the ratio of the samples that reside within the square to those which reside within the circle and then multiply by four (to account for this being only one quadrant of a circle).</li>\r\n</ol>\r\nThere is a great visualization of this process and a demonstration of how the <a href=\"http://commons.wikimedia.org/wiki/File:Pi_30K.gif\">number of samples impacts the Pi estimate on wikipedia</a>.\r\n\r\nIf you were to implement this in C/C++, your code might look like this:\r\n<pre class=\"lang:default decode:true\" title=\"Sample CPU code for Monte Carlo Pi estimation\">...\r\n\r\nint count = 0;\r\nfloat x, y;\r\nvector&lt;float&gt; randomNums(2*samples);\r\n\r\n// init random numbers within the unit square.\r\n// Pack as (x,y) pairs\r\nfor(int i = 0; i &lt; 2*samples; i++)	{\r\n	randomNums[i] = float(rand()) / RAND_MAX;\r\n}\r\n\r\n// count how many samples reside in the circle\r\nfor(int i = 0; i &lt; samples; i++)\r\n{\r\n	x = randomNums[2*i];\r\n	y = randomNums[2*i + 1];\r\n\r\n	if(x*x + y*y &lt; 1.0)\r\n		count++;\r\n}\r\n\r\n// calculate the estimate and print the result\r\nfloat pi_estimate = 4 * float(count) / samples;\r\n\r\n...</pre>\r\n<h2>Benchmark methods</h2>\r\nWe implemented four different versions of the Pi problem with small changes in the implementation which test various aspects of the hardware and software. These five implementations are:\r\n<ol>\r\n	<li>Single core CPU - A direct implementation of the code listing above</li>\r\n	<li>A naive port of the CPU code to the GPU with no optimizations. Region testing is performed on the GPU and the  result is summed on the CPU</li>\r\n	<li>An effort to reduce the workload of the CPU by partially summing the region testing results on the GPU</li>\r\n	<li>A classic GPU optimization using coalesced memory load/stores</li>\r\n	<li>And a final integrated-device specific optimization that uses <a href=\"http://sandbox.arrayfire.com/zero-copy-on-integrated-gpus/\">zero-copy memory buffers</a></li>\r\n</ol>\r\nFor these tests we used a few-year old ASUS N56V laptop we had in the office which features an Intel i7-3610QM CPU with a HD Graphics 4000 GT2 GPU. This particular GPU has 16 execution units which can host up to 128 concurrent threads. We installed Window 7 (Intel OpenCL driver 10.18.10.3958) and Ubuntu 14.10 (Beignet 1.1, git acfc2a2). In future blog posts we will cover 4th and 5th generation hardware (including Iris pro).\r\n<h2>Results</h2>\r\n<iframe width=\"694\" height=\"371\" seamless frameborder=\"0\" scrolling=\"no\" src=\"https://docs.google.com/spreadsheets/d/1vMeMPs4d78wsbURINCKmAFDFBwIFzpAl438Q-geoeNs/pubchart?oid=2103791532&amp;format=interactive\"></iframe>\r\n\r\nasdf\r\n<h2>Next steps</h2>\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\nResults:\r\n* Beignet is slightly slower on a i7-3610QM processor than Intel CPU\r\n* Beginet is 16-21x faster than a single-core CPU implementation for this problem\r\nspeedbird: Ubuntu Linux 14.10, Beignet, i7-3610QM, Intel(R) HD Graphics IvyBridge M GT2 (HD Graphics 4000)','Intel GPU OpenCL performance: Windows vs. Linux','','inherit','open','closed','','8124-revision-v1','','','2015-05-04 19:39:10','2015-05-04 19:39:10','',8124,'http://sandbox.arrayfire.com/8124-revision-v1/',0,'revision','',0),(8212,18528,'2015-05-04 19:47:10','2015-05-04 19:47:10','<h2>Introduction</h2>\r\nWith Intel CPUs making up nearly <a href=\"https://www.cpubenchmark.net/market_share.html\">80% of the CPU market</a> and <a href=\"http://jonpeddie.com/press-releases/details/gpu-market-upintel-and-nvidia-graphics-winners-in-q4-amd-down/\">66% of computers using integrated graphics</a> one can easily argue that integrated graphics devices represent one of the greatest markets for GPU-accelerated computing. Here at ArrayFire, we have long recognized the potential of these devices and offer built-in support for Intel CPUs, GPUs, and AMD APUs in the OpenCL backend of our <a href=\"http://www.arrayfire.com\">ArrayFire</a> GPU computing library. Yet one common theme for debate in the office has been how the hardware performs on different operating systems with different drivers across hardware revisions.\r\n\r\nTo answer these questions (and, perhaps, to win some intra-office geek cred) I decided to write a series of blog posts about Intel\'s GPU OpenCL performance. In this first installment I will compare the performance of OpenCL on a 3rd generation Intel processor on Linux and Windows.\r\n<h2>Monte Carlo Pi estimation</h2>\r\nTo evaluate the performance of Intel\'s hardware I took a textbook problem of computing Pi by Monte Carlo methods and converted it to the GPU, and then applied the typical optimizations that one would do for GPU programming (more on these in a moment).\r\n<ol>\r\n	<li>Generate a series of random (x,y) pairs from within the <a href=\"http://en.wikipedia.org/wiki/Unit_square\">unit square</a></li>\r\n	<li>Determine which of these samples reside within the <a href=\"http://en.wikipedia.org/wiki/Unit_circle\">unit circle</a></li>\r\n	<li>Compute the ratio of the samples that reside within the square to those which reside within the circle and then multiply by four (to account for this being only one quadrant of a circle).</li>\r\n</ol>\r\nThere is a great visualization of this process and a demonstration of how the <a href=\"http://commons.wikimedia.org/wiki/File:Pi_30K.gif\">number of samples impacts the Pi estimate on wikipedia</a>.\r\n\r\nIf you were to implement this in C/C++, your code might look like this:\r\n<pre class=\"lang:default decode:true\" title=\"Sample CPU code for Monte Carlo Pi estimation\">...\r\n\r\nint count = 0;\r\nfloat x, y;\r\nvector&lt;float&gt; randomNums(2*samples);\r\n\r\n// init random numbers within the unit square.\r\n// Pack as (x,y) pairs\r\nfor(int i = 0; i &lt; 2*samples; i++)	{\r\n	randomNums[i] = float(rand()) / RAND_MAX;\r\n}\r\n\r\n// count how many samples reside in the circle\r\nfor(int i = 0; i &lt; samples; i++)\r\n{\r\n	x = randomNums[2*i];\r\n	y = randomNums[2*i + 1];\r\n\r\n	if(x*x + y*y &lt; 1.0)\r\n		count++;\r\n}\r\n\r\n// calculate the estimate and print the result\r\nfloat pi_estimate = 4 * float(count) / samples;\r\n\r\n...</pre>\r\n<h2>Benchmark methods</h2>\r\nWe implemented four different versions of the Pi problem with small changes in the implementation which test various aspects of the hardware and software. These five implementations are:\r\n<ol>\r\n	<li>Single core CPU - A direct implementation of the code listing above</li>\r\n	<li>A naive port of the CPU code to the GPU with no optimizations. Region testing is performed on the GPU and the  result is summed on the CPU</li>\r\n	<li>An effort to reduce the workload of the CPU by partially summing the region testing results on the GPU</li>\r\n	<li>A classic GPU optimization using coalesced memory load/stores</li>\r\n	<li>And a final integrated-device specific optimization that uses <a href=\"http://sandbox.arrayfire.com/zero-copy-on-integrated-gpus/\">zero-copy memory buffers</a></li>\r\n</ol>\r\nFor these tests we used a few-year old ASUS N56V laptop we had in the office which features an Intel i7-3610QM CPU with a HD Graphics 4000 GT2 GPU. This particular GPU has 16 execution units which can host up to 128 concurrent threads. We installed Window 7 (Intel OpenCL driver 10.18.10.3958) and Ubuntu 14.10 (Beignet 1.1, git acfc2a2). In future blog posts we will cover 4th and 5th generation hardware (including Iris pro).\r\n<h2>Results</h2>\r\n&nbsp;\r\n\r\n<iframe width=\"694\" height=\"371\" seamless=\"\" frameborder=\"0\" scrolling=\"no\" src=\"https://docs.google.com/spreadsheets/d/1vMeMPs4d78wsbURINCKmAFDFBwIFzpAl438Q-geoeNs/pubchart?oid=2103791532&amp;format=interactive\"></iframe>\r\n\r\n&nbsp;\r\n<h2>Next steps</h2>\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\nResults:\r\n* Beignet is slightly slower on a i7-3610QM processor than Intel CPU\r\n* Beginet is 16-21x faster than a single-core CPU implementation for this problem\r\nspeedbird: Ubuntu Linux 14.10, Beignet, i7-3610QM, Intel(R) HD Graphics IvyBridge M GT2 (HD Graphics 4000)','Intel OpenCL performance: 3rd generation hardware','','inherit','open','closed','','8124-revision-v1','','','2015-05-04 19:47:10','2015-05-04 19:47:10','',8124,'http://sandbox.arrayfire.com/8124-revision-v1/',0,'revision','',0),(8214,18528,'2015-05-04 19:47:40','2015-05-04 19:47:40','<h3>Introduction</h3>\r\nWith Intel CPUs making up nearly <a href=\"https://www.cpubenchmark.net/market_share.html\">80% of the CPU market</a> and <a href=\"http://jonpeddie.com/press-releases/details/gpu-market-upintel-and-nvidia-graphics-winners-in-q4-amd-down/\">66% of computers using integrated graphics</a> one can easily argue that integrated graphics devices represent one of the greatest markets for GPU-accelerated computing. Here at ArrayFire, we have long recognized the potential of these devices and offer built-in support for Intel CPUs, GPUs, and AMD APUs in the OpenCL backend of our <a href=\"http://www.arrayfire.com\">ArrayFire</a> GPU computing library. Yet one common theme for debate in the office has been how the hardware performs on different operating systems with different drivers across hardware revisions.\r\n\r\nTo answer these questions (and, perhaps, to win some intra-office geek cred) I decided to write a series of blog posts about Intel\'s GPU OpenCL performance. In this first installment I will compare the performance of OpenCL on a 3rd generation Intel processor on Linux and Windows.\r\n<h3>Monte Carlo Pi estimation</h3>\r\nTo evaluate the performance of Intel\'s hardware I took a textbook problem of computing Pi by Monte Carlo methods and converted it to the GPU, and then applied the typical optimizations that one would do for GPU programming (more on these in a moment).\r\n<ol>\r\n	<li>Generate a series of random (x,y) pairs from within the <a href=\"http://en.wikipedia.org/wiki/Unit_square\">unit square</a></li>\r\n	<li>Determine which of these samples reside within the <a href=\"http://en.wikipedia.org/wiki/Unit_circle\">unit circle</a></li>\r\n	<li>Compute the ratio of the samples that reside within the square to those which reside within the circle and then multiply by four (to account for this being only one quadrant of a circle).</li>\r\n</ol>\r\nThere is a great visualization of this process and a demonstration of how the <a href=\"http://commons.wikimedia.org/wiki/File:Pi_30K.gif\">number of samples impacts the Pi estimate on wikipedia</a>.\r\n\r\nIf you were to implement this in C/C++, your code might look like this:\r\n<pre class=\"lang:default decode:true\" title=\"Sample CPU code for Monte Carlo Pi estimation\">...\r\n\r\nint count = 0;\r\nfloat x, y;\r\nvector&lt;float&gt; randomNums(2*samples);\r\n\r\n// init random numbers within the unit square.\r\n// Pack as (x,y) pairs\r\nfor(int i = 0; i &lt; 2*samples; i++)	{\r\n	randomNums[i] = float(rand()) / RAND_MAX;\r\n}\r\n\r\n// count how many samples reside in the circle\r\nfor(int i = 0; i &lt; samples; i++)\r\n{\r\n	x = randomNums[2*i];\r\n	y = randomNums[2*i + 1];\r\n\r\n	if(x*x + y*y &lt; 1.0)\r\n		count++;\r\n}\r\n\r\n// calculate the estimate and print the result\r\nfloat pi_estimate = 4 * float(count) / samples;\r\n\r\n...</pre>\r\n<h3>Benchmark methods</h3>\r\nWe implemented four different versions of the Pi problem with small changes in the implementation which test various aspects of the hardware and software. These five implementations are:\r\n<ol>\r\n	<li>Single core CPU - A direct implementation of the code listing above</li>\r\n	<li>A naive port of the CPU code to the GPU with no optimizations. Region testing is performed on the GPU and the  result is summed on the CPU</li>\r\n	<li>An effort to reduce the workload of the CPU by partially summing the region testing results on the GPU</li>\r\n	<li>A classic GPU optimization using coalesced memory load/stores</li>\r\n	<li>And a final integrated-device specific optimization that uses <a href=\"http://sandbox.arrayfire.com/zero-copy-on-integrated-gpus/\">zero-copy memory buffers</a></li>\r\n</ol>\r\nFor these tests we used a few-year old ASUS N56V laptop we had in the office which features an Intel i7-3610QM CPU with a HD Graphics 4000 GT2 GPU. This particular GPU has 16 execution units which can host up to 128 concurrent threads. We installed Window 7 (Intel OpenCL driver 10.18.10.3958) and Ubuntu 14.10 (Beignet 1.1, git acfc2a2). In future blog posts we will cover 4th and 5th generation hardware (including Iris pro).\r\n<h3>Results</h3>\r\n&nbsp;\r\n\r\n<iframe width=\"694\" height=\"371\" seamless=\"\" frameborder=\"0\" scrolling=\"no\" src=\"https://docs.google.com/spreadsheets/d/1vMeMPs4d78wsbURINCKmAFDFBwIFzpAl438Q-geoeNs/pubchart?oid=2103791532&amp;format=interactive\"></iframe>\r\n\r\n&nbsp;\r\n<h3>Next steps</h3>\r\n&nbsp;\r\n\r\n&nbsp;','Intel OpenCL performance: 3rd generation hardware','','inherit','open','closed','','8124-revision-v1','','','2015-05-04 19:47:40','2015-05-04 19:47:40','',8124,'http://sandbox.arrayfire.com/8124-revision-v1/',0,'revision','',0),(8215,18528,'2015-05-04 20:21:16','2015-05-04 20:21:16','<h3>Introduction</h3>\r\nWith Intel CPUs making up nearly <a href=\"https://www.cpubenchmark.net/market_share.html\">80% of the CPU market</a> and <a href=\"http://jonpeddie.com/press-releases/details/gpu-market-upintel-and-nvidia-graphics-winners-in-q4-amd-down/\">66% of computers using integrated graphics</a> one can easily argue that integrated graphics devices represent one of the greatest markets for GPU-accelerated computing. Here at ArrayFire, we have long recognized the potential of these devices and offer built-in support for Intel CPUs, GPUs, and AMD APUs in the OpenCL backend of our <a href=\"http://www.arrayfire.com\">ArrayFire</a> GPU computing library. Yet one common theme for debate in the office has been how the hardware performs on different operating systems with different drivers across hardware revisions.\r\n\r\nTo answer these questions (and, perhaps, to win some intra-office geek cred) I decided to write a series of blog posts about Intel\'s GPU OpenCL performance. In this first installment I will compare the performance of OpenCL on a 3rd generation Intel processor on Linux and Windows.\r\n<h3>Monte Carlo Pi estimation</h3>\r\nTo evaluate the performance of Intel\'s hardware I took a textbook problem of computing Pi by Monte Carlo methods and converted it to the GPU, and then applied the typical optimizations that one would do for GPU programming (more on these in a moment).\r\n<ol>\r\n	<li>Generate a series of random (x,y) pairs from within the <a href=\"http://en.wikipedia.org/wiki/Unit_square\">unit square</a></li>\r\n	<li>Determine which of these samples reside within the <a href=\"http://en.wikipedia.org/wiki/Unit_circle\">unit circle</a></li>\r\n	<li>Compute the ratio of the samples that reside within the square to those which reside within the circle and then multiply by four (to account for this being only one quadrant of a circle).</li>\r\n</ol>\r\nThere is a great visualization of this process and a demonstration of how the <a href=\"http://commons.wikimedia.org/wiki/File:Pi_30K.gif\">number of samples impacts the Pi estimate on wikipedia</a>.\r\n\r\nIf you were to implement this in C/C++, your code might look like this:\r\n<pre class=\"lang:default decode:true\" title=\"Sample CPU code for Monte Carlo Pi estimation\">...\r\n\r\nint count = 0;\r\nfloat x, y;\r\nvector&lt;float&gt; randomNums(2*samples);\r\n\r\n// init random numbers within the unit square.\r\n// Pack as (x,y) pairs\r\nfor(int i = 0; i &lt; 2*samples; i++)	{\r\n	randomNums[i] = float(rand()) / RAND_MAX;\r\n}\r\n\r\n// count how many samples reside in the circle\r\nfor(int i = 0; i &lt; samples; i++)\r\n{\r\n	x = randomNums[2*i];\r\n	y = randomNums[2*i + 1];\r\n\r\n	if(x*x + y*y &lt; 1.0)\r\n		count++;\r\n}\r\n\r\n// calculate the estimate and print the result\r\nfloat pi_estimate = 4 * float(count) / samples;\r\n\r\n...</pre>\r\n<h3>Benchmark methods</h3>\r\nWe implemented four different versions of the Pi problem with small changes in the implementation which test various aspects of the hardware and software. These five implementations are:\r\n<ol>\r\n	<li>Single core CPU - A direct implementation of the code listing above</li>\r\n	<li>A naive port of the CPU code to the GPU with no optimizations. Region testing is performed on the GPU and the  result is summed on the CPU</li>\r\n	<li>An effort to reduce the workload of the CPU by partially summing the region testing results on the GPU</li>\r\n	<li>A classic GPU optimization using coalesced memory load/stores</li>\r\n	<li>And a final integrated-device specific optimization that uses <a href=\"http://sandbox.arrayfire.com/zero-copy-on-integrated-gpus/\">zero-copy memory buffers</a></li>\r\n</ol>\r\nFor these tests we used a few-year old ASUS N56V laptop we had in the office which features an Intel i7-3610QM CPU with a HD Graphics 4000 GT2 GPU. This particular GPU has 16 execution units which can host up to 128 concurrent threads. We installed Window 7 (Intel OpenCL GPU driver 10.18.10.395; Intel OpenCL CPU drivers 3.0.1.10878 and 5.1.0.25) and Ubuntu 14.10 (GPU driver Beignet 1.1 from git acfc2a2 and CPU driver \"Build 92\"). In future blog posts we will cover 4th and 5th generation hardware (including Iris pro).\r\n<h3>Results and discussion</h3>\r\nOn Linux a single core CPU took <span data-sheets-value=\"[null,3,null,31583]\" data-sheets-userformat=\"[null,null,513,[null,0],null,null,null,null,null,null,null,null,0]\">31.583 ms to execute on a sample size of 20 million sample points. Interestingly, the same code on Windows too over 66 ms to execute on the same sample size (in release mode, with /02 and high power settings selected). This curious result isn\'t particularly important as the OpenCL performance on the CPU does not appear to be degraded between operating systems.</span>\r\n\r\nBelow we plot the speed up of our OpenCL kernels relative to the performance of the Linux single core CPU result above for both the i7-3610QM CPU and HD Graphics 4000 GPU.\r\n\r\n<iframe width=\"694\" height=\"371\" seamless=\"\" frameborder=\"0\" scrolling=\"no\" src=\"https://docs.google.com/spreadsheets/d/1vMeMPs4d78wsbURINCKmAFDFBwIFzpAl438Q-geoeNs/pubchart?oid=2103791532&amp;format=interactive\"></iframe>\r\n\r\nWe see that the naive port of the CPU code directly to OpenCL is <strong>slower</strong> than the pure CPU implementation by a factor of four. This result is not terribly surprising once you consider the poorly conceived implementation encounters a full O(N) cost for data transfer and summing region test result for the 20 million sample points.\r\n<h3>Next steps</h3>\r\n&nbsp;\r\n\r\n&nbsp;','Intel OpenCL performance: 3rd generation hardware','','inherit','open','closed','','8124-revision-v1','','','2015-05-04 20:21:16','2015-05-04 20:21:16','',8124,'http://sandbox.arrayfire.com/8124-revision-v1/',0,'revision','',0),(8216,18528,'2015-05-04 20:47:02','2015-05-04 20:47:02','<h3>Introduction</h3>\r\nWith Intel CPUs making up nearly <a href=\"https://www.cpubenchmark.net/market_share.html\">80% of the CPU market</a> and <a href=\"http://jonpeddie.com/press-releases/details/gpu-market-upintel-and-nvidia-graphics-winners-in-q4-amd-down/\">66% of computers using integrated graphics</a> one can easily argue that integrated graphics devices represent one of the greatest markets for GPU-accelerated computing. Here at ArrayFire, we have long recognized the potential of these devices and offer built-in support for Intel CPUs, GPUs, and AMD APUs in the OpenCL backend of our <a href=\"http://www.arrayfire.com\">ArrayFire</a> GPU computing library. Yet one common theme for debate in the office has been how the hardware performs on different operating systems with different drivers across hardware revisions.\r\n\r\nTo answer these questions (and, perhaps, to win some intra-office geek cred) I decided to write a series of blog posts about Intel\'s GPU OpenCL performance. In this first installment I will compare the performance of OpenCL on a 3rd generation Intel processor on Linux and Windows.\r\n<h3>Monte Carlo Pi estimation</h3>\r\nTo evaluate the performance of Intel\'s hardware I took a textbook problem of computing Pi by Monte Carlo methods and converted it to the GPU, and then applied the typical optimizations that one would do for GPU programming (more on these in a moment).\r\n<ol>\r\n	<li>Generate a series of random (x,y) pairs from within the <a href=\"http://en.wikipedia.org/wiki/Unit_square\">unit square</a></li>\r\n	<li>Determine which of these samples reside within the <a href=\"http://en.wikipedia.org/wiki/Unit_circle\">unit circle</a></li>\r\n	<li>Compute the ratio of the samples that reside within the square to those which reside within the circle and then multiply by four (to account for this being only one quadrant of a circle).</li>\r\n</ol>\r\nThere is a great visualization of this process and a demonstration of how the <a href=\"http://commons.wikimedia.org/wiki/File:Pi_30K.gif\">number of samples impacts the Pi estimate on wikipedia</a>.\r\n\r\nIf you were to implement this in C/C++, your code might look like this:\r\n<pre class=\"lang:default decode:true\" title=\"Sample CPU code for Monte Carlo Pi estimation\">...\r\n\r\nint count = 0;\r\nfloat x, y;\r\nvector&lt;float&gt; randomNums(2*samples);\r\n\r\n// init random numbers within the unit square.\r\n// Pack as (x,y) pairs\r\nfor(int i = 0; i &lt; 2*samples; i++)	{\r\n	randomNums[i] = float(rand()) / RAND_MAX;\r\n}\r\n\r\n// count how many samples reside in the circle\r\nfor(int i = 0; i &lt; samples; i++)\r\n{\r\n	x = randomNums[2*i];\r\n	y = randomNums[2*i + 1];\r\n\r\n	if(x*x + y*y &lt; 1.0)\r\n		count++;\r\n}\r\n\r\n// calculate the estimate and print the result\r\nfloat pi_estimate = 4 * float(count) / samples;\r\n\r\n...</pre>\r\n<h3>Benchmark methods</h3>\r\nWe implemented four different versions of the Pi problem with small changes in the implementation which test various aspects of the hardware and software. These five implementations are:\r\n<ol>\r\n	<li>Single core CPU - A direct implementation of the code listing above</li>\r\n	<li>A naive port of the CPU code to the GPU with no optimizations. Region testing is performed on the GPU and the result is summed on the CPU</li>\r\n	<li>An effort to reduce the workload of the CPU by partially summing the region testing results on the GPU</li>\r\n	<li>A classic GPU optimization using coalesced memory load/stores</li>\r\n	<li>And a final integrated-device specific optimization that uses <a href=\"http://sandbox.arrayfire.com/zero-copy-on-integrated-gpus/\">zero-copy memory buffers</a></li>\r\n</ol>\r\nFor these tests we used a few-year old ASUS N56V laptop we had in the office which features an Intel i7-3610QM CPU with a HD Graphics 4000 GT2 GPU. This particular GPU has 16 execution units which can host up to 128 concurrent threads. We installed Window 7 (Intel OpenCL GPU driver 10.18.10.395; Intel OpenCL CPU drivers 3.0.1.10878 and 5.1.0.25) and Ubuntu 14.10 (GPU driver Beignet 1.1 from git acfc2a2 and CPU driver \"Build 92\"). In future blog posts we will cover 4th and 5th generation hardware (including Iris pro).\r\n<h3>Results and discussion</h3>\r\nOn Linux a single core CPU took <span data-sheets-value=\"[null,3,null,31583]\" data-sheets-userformat=\"[null,null,513,[null,0],null,null,null,null,null,null,null,null,0]\">31.583 ms to execute on a sample size of 20 million sample points. Interestingly, the same code on Windows too over 66 ms to execute on the same sample size (in release mode, with /02 and high power settings selected). This curious result isn\'t particularly important as the OpenCL performance on the CPU does not appear to be degraded between operating systems.</span>\r\n\r\nBelow we plot the speed up of our OpenCL kernels relative to the performance of the Linux single core CPU result above for both the i7-3610QM CPU and HD Graphics 4000 GPU. The Windows CPU variants (a) and (b) are for the 3.0.1.10878 and 5.1.0.25 CPU drivers respectively.\r\n\r\n<iframe width=\"694\" height=\"371\" seamless=\"\" frameborder=\"0\" scrolling=\"no\" src=\"https://docs.google.com/spreadsheets/d/1vMeMPs4d78wsbURINCKmAFDFBwIFzpAl438Q-geoeNs/pubchart?oid=2103791532&amp;format=interactive\"></iframe>\r\n\r\nWe see that the naive port of the CPU code directly to OpenCL is slower than the pure CPU implementation by a factor of four. This result is not terribly surprising once you consider the poorly conceived implementation encounters a full O(N) cost for data transfer and summing region test result for the 20 million sample points.\r\n\r\nThe OCL reduction kernel offloads some of the CPU\'s work by partially summing the region detection results on the GPU. This tweak increased the performance of the kernel between 4x (for the OpenCL on the GPU) to 10x (for OpenCL on the CPU). Curiously, the CPU kernels on Ubuntu and Windows perform very well, achieving speed-ups of about 3x the CPU. This is still below the theoretical 4x speed improvement one would expect on this quad-core CPU namely due to thread management and poor memory access patterns.\r\n\r\nLastly we will discuss the coalesced memory and zero copy kernels. The optimization here involves changing the memory access pattern from using strieded memory access:\r\n<pre class=\"lang:default decode:true\" title=\"Sample CPU code for Monte Carlo Pi estimation\">x = randomNums[2*i];\r\ny = randomNums[2*i + 1];</pre>\r\nto using OpenCL\'s float2 data type to access sequential elements, thus improving utilization of the memory bus. This technique improved throughput by 2.2x on Ubuntu and 3.25x on Windows. This makes the GPU about twice as fast as our initial CPU implementation.\r\n<h3>Conclusion and next steps</h3>\r\nFor the Monte Carlo Pi problem, it appears Ubuntu and Beignet achieve slightly better performance than the current Windows Intel HD Graphics OpenCL drivers; however, given the limited number of trials I performed (and lack of statistical error bars) I would say both implementations achieve similar performance on the same hardware.\r\n\r\n&nbsp;','Intel OpenCL performance: 3rd generation hardware','','inherit','open','closed','','8124-revision-v1','','','2015-05-04 20:47:02','2015-05-04 20:47:02','',8124,'http://sandbox.arrayfire.com/8124-revision-v1/',0,'revision','',0),(8217,18528,'2015-05-04 21:35:05','2015-05-04 21:35:05','<h3>Introduction</h3>\r\nWith Intel CPUs making up nearly <a href=\"https://www.cpubenchmark.net/market_share.html\">80% of the CPU market</a> and <a href=\"http://jonpeddie.com/press-releases/details/gpu-market-upintel-and-nvidia-graphics-winners-in-q4-amd-down/\">66% of computers using integrated graphics</a> one can easily argue that integrated graphics devices represent one of the greatest markets for GPU-accelerated computing. Here at ArrayFire, we have long recognized the potential of these devices and offer built-in support for Intel CPUs, GPUs, and AMD APUs in the OpenCL backend of our <a href=\"http://www.arrayfire.com\">ArrayFire</a> GPU computing library. Yet one common theme for debate in the office has been how the hardware performs on different operating systems with different drivers across hardware revisions.\r\n\r\nTo answer these questions (and, perhaps, to win some intra-office geek cred) I decided to write a series of blog posts about Intel\'s GPU OpenCL performance. In this first installment I will compare the performance of OpenCL on a 3rd generation Intel processor on Linux and Windows.\r\n<h3>Monte Carlo Pi estimation</h3>\r\nTo evaluate the performance of Intel\'s hardware I took a textbook problem of computing Pi using a Monte Carlo method. This is a classic example of a memory bound application where the time to read/write data from/to memory dominates most of the computation time. Thus, throwing N-more compute cores at the problem may not always achieve a linear acceleration unless careful attention to memory access patterns and cache usage is performed.\r\n\r\nThe Monte Carlo process for computing pi is fairly simple, consisting of three primary steps:\r\n<ol>\r\n	<li>Generate a series of random (x,y) pairs from within the <a href=\"http://en.wikipedia.org/wiki/Unit_square\">unit square</a></li>\r\n	<li>Determine which of these samples reside within the <a href=\"http://en.wikipedia.org/wiki/Unit_circle\">unit circle</a></li>\r\n	<li>Compute the ratio of the samples that reside within the square to those which reside within the circle and then multiply by four (to account for this being only one quadrant of a circle).</li>\r\n</ol>\r\nThere is a great visualization of this process and a demonstration of how the <a href=\"http://commons.wikimedia.org/wiki/File:Pi_30K.gif\">number of samples impacts the Pi estimate on wikipedia</a>.\r\n\r\nIf you were to implement this in C/C++, your code might look like this:\r\n<pre class=\"lang:default decode:true\" title=\"Sample CPU code for Monte Carlo Pi estimation\">...\r\n\r\nint count = 0;\r\nfloat x, y;\r\nvector&lt;float&gt; randomNums(2*samples);\r\n\r\n// init random numbers within the unit square.\r\n// Pack as (x,y) pairs\r\nfor(int i = 0; i &lt; 2*samples; i++)	{\r\n	randomNums[i] = float(rand()) / RAND_MAX;\r\n}\r\n\r\n// count how many samples reside in the circle\r\nfor(int i = 0; i &lt; samples; i++)\r\n{\r\n	x = randomNums[2*i];\r\n	y = randomNums[2*i + 1];\r\n\r\n	if(x*x + y*y &lt; 1.0)\r\n		count++;\r\n}\r\n\r\n// calculate the estimate and print the result\r\nfloat pi_estimate = 4 * float(count) / samples;\r\n\r\n...</pre>\r\n<h3>Benchmark methods</h3>\r\nWe implemented four different versions of the Pi problem with small changes in the implementation which test various aspects of the hardware and software. These five implementations are:\r\n<ol>\r\n	<li>Single core CPU - A direct implementation of the code listing above</li>\r\n	<li>A naive port of the CPU code to the GPU with no optimizations. Region testing is performed on the GPU and the result is summed on the CPU</li>\r\n	<li>An effort to reduce the workload of the CPU by partially summing the region testing results on the GPU</li>\r\n	<li>A classic GPU optimization using coalesced memory load/stores</li>\r\n	<li>And a final integrated-device specific optimization that uses <a href=\"http://sandbox.arrayfire.com/zero-copy-on-integrated-gpus/\">zero-copy memory buffers</a></li>\r\n</ol>\r\nFor these tests we used a few-year old ASUS N56V laptop we had in the office which features an Intel i7-3610QM CPU with a HD Graphics 4000 GT2 GPU. This particular GPU has 16 execution units which can host up to 128 concurrent threads. We installed Window 7 (Intel OpenCL GPU driver 10.18.10.395; Intel OpenCL CPU drivers 3.0.1.10878 and 5.1.0.25) and Ubuntu 14.10 (GPU driver Beignet 1.1 from git acfc2a2 and CPU driver \"Build 92\"). In future blog posts we will cover 4th and 5th generation hardware (including Iris pro).\r\n<h3>Results and discussion</h3>\r\nOn Linux a single core CPU took <span data-sheets-value=\"[null,3,null,31583]\" data-sheets-userformat=\"[null,null,513,[null,0],null,null,null,null,null,null,null,null,0]\">31.583 ms to execute on a sample size of 20 million sample points. Interestingly, the same code on Windows too over 66 ms to execute on the same sample size (in release mode, with /02 and high power settings selected). This curious result isn\'t particularly important as the OpenCL performance on the CPU does not appear to be degraded between operating systems.</span>\r\n\r\nBelow we plot the speed up of our OpenCL kernels relative to the performance of the Linux single core CPU result above for both the i7-3610QM CPU and HD Graphics 4000 GPU. The Windows CPU variants (a) and (b) are for the 3.0.1.10878 and 5.1.0.25 CPU drivers respectively.\r\n\r\n<iframe width=\"694\" height=\"371\" seamless=\"\" frameborder=\"0\" scrolling=\"no\" src=\"https://docs.google.com/spreadsheets/d/1vMeMPs4d78wsbURINCKmAFDFBwIFzpAl438Q-geoeNs/pubchart?oid=2103791532&amp;format=interactive\"></iframe>\r\n\r\nWe see that the naive port of the CPU code directly to OpenCL is slower than the pure CPU implementation by a factor of four. This result is not terribly surprising once you consider the poorly conceived implementation encounters a full O(N) cost for data transfer and summing region test result for the 20 million sample points.\r\n\r\nThe OCL reduction kernel offloads some of the CPU\'s work by partially summing the region detection results on the GPU. This tweak increased the performance of the kernel between 4x (for the OpenCL on the GPU) to 10x (for OpenCL on the CPU). Curiously, the CPU kernels on Ubuntu and Windows perform very well, achieving speed-ups of about 3x the CPU. This is still below the theoretical 4x speed improvement one would expect on this quad-core CPU namely due to thread management and poor memory access patterns.\r\n\r\nLastly we will discuss the coalesced memory and zero copy kernels. The optimization here involves changing the memory access pattern from using strieded memory access:\r\n<pre class=\"lang:default decode:true\" title=\"Sample CPU code for Monte Carlo Pi estimation\">x = randomNums[2*i];\r\ny = randomNums[2*i + 1];</pre>\r\nto using OpenCL\'s float2 data type to access sequential elements, thus improving utilization of the memory bus. This technique improved throughput by 2.2x on Ubuntu and 3.25x on Windows. This makes the GPU about twice as fast as our initial CPU implementation. We see little to no acceleration in using zero copy buffers for this problem because the problem size for the final CPU sum is quite small (on the order of 1000 elements).\r\n<h3>Conclusion, next steps, and an aside</h3>\r\nFor the Monte Carlo Pi problem, it appears Ubuntu and Beignet achieve slightly better performance than the current Windows Intel HD Graphics OpenCL drivers; however, given the limited number of trials performed (and lack of statistical error bars) we may conservatively state that the two OpenCL implementations perform similarly on the same hardware.\r\n\r\nWe found that using OpenCL on the GPU achieves better acceleration than OpenCL on the CPU in general. In one of our kernels, OpenCL on the i7-3610QM CPU was slightly faster than on the GPU, but this is probably due to automatic vectorization in the CPU OpenCL backend for this particular kernel.\r\n\r\n&nbsp;\r\n\r\n&nbsp;','Intel OpenCL performance: 3rd generation hardware','','inherit','open','closed','','8124-revision-v1','','','2015-05-04 21:35:05','2015-05-04 21:35:05','',8124,'http://sandbox.arrayfire.com/8124-revision-v1/',0,'revision','',0),(8218,18528,'2015-05-04 21:41:26','2015-05-04 21:41:26','<h3>Introduction</h3>\r\nWith Intel CPUs making up nearly <a href=\"https://www.cpubenchmark.net/market_share.html\">80% of the CPU market</a> and <a href=\"http://jonpeddie.com/press-releases/details/gpu-market-upintel-and-nvidia-graphics-winners-in-q4-amd-down/\">66% of computers using integrated graphics</a> one can easily argue that integrated graphics devices represent one of the greatest markets for GPU-accelerated computing. Here at ArrayFire, we have long recognized the potential of these devices and offer built-in support for Intel CPUs, GPUs, and AMD APUs in the OpenCL backend of our <a href=\"http://www.arrayfire.com\">ArrayFire</a> GPU computing library. Yet one common theme for debate in the office has been how the hardware performs on different operating systems with different drivers across hardware revisions.\r\n\r\nTo answer these questions (and, perhaps, to win some intra-office geek cred) I decided to write a series of blog posts about Intel\'s GPU OpenCL performance. In this first installment I will compare the performance of OpenCL on a 3rd generation Intel processor on Linux and Windows.\r\n<h3>Monte Carlo Pi estimation</h3>\r\nTo evaluate the performance of Intel\'s hardware I took a textbook problem of computing Pi using a Monte Carlo method. This is a classic example of a memory bound application where the time to read/write data from/to memory dominates most of the computation time. Thus, throwing N-more compute cores at the problem may not always achieve a linear acceleration unless careful attention to memory access patterns and cache usage is performed.\r\n\r\nThe Monte Carlo process for computing pi is fairly simple, consisting of three primary steps:\r\n<ol>\r\n	<li>Generate a series of random (x,y) pairs from within the <a href=\"http://en.wikipedia.org/wiki/Unit_square\">unit square</a></li>\r\n	<li>Determine which of these samples reside within the <a href=\"http://en.wikipedia.org/wiki/Unit_circle\">unit circle</a></li>\r\n	<li>Compute the ratio of the samples that reside within the square to those which reside within the circle and then multiply by four (to account for this being only one quadrant of a circle).</li>\r\n</ol>\r\nThere is a great visualization of this process and a demonstration of how the <a href=\"http://commons.wikimedia.org/wiki/File:Pi_30K.gif\">number of samples impacts the Pi estimate on wikipedia</a>.\r\n\r\nIf you were to implement this in C/C++, your code might look like this:\r\n<pre class=\"lang:default decode:true\" title=\"Sample CPU code for Monte Carlo Pi estimation\">...\r\n\r\nint count = 0;\r\nfloat x, y;\r\nvector&lt;float&gt; randomNums(2*samples);\r\n\r\n// init random numbers within the unit square.\r\n// Pack as (x,y) pairs\r\nfor(int i = 0; i &lt; 2*samples; i++)	{\r\n	randomNums[i] = float(rand()) / RAND_MAX;\r\n}\r\n\r\n// count how many samples reside in the circle\r\nfor(int i = 0; i &lt; samples; i++)\r\n{\r\n	x = randomNums[2*i];\r\n	y = randomNums[2*i + 1];\r\n\r\n	if(x*x + y*y &lt; 1.0)\r\n		count++;\r\n}\r\n\r\n// calculate the estimate and print the result\r\nfloat pi_estimate = 4 * float(count) / samples;\r\n\r\n...</pre>\r\n<h3>Benchmark methods</h3>\r\nWe implemented four different versions of the Pi problem with small changes in the implementation which test various aspects of the hardware and software. These five implementations are:\r\n<ol>\r\n	<li>Single core CPU - A direct implementation of the code listing above</li>\r\n	<li>A naive port of the CPU code to the GPU with no optimizations. Region testing is performed on the GPU and the result is summed on the CPU</li>\r\n	<li>An effort to reduce the workload of the CPU by partially summing the region testing results on the GPU</li>\r\n	<li>A classic GPU optimization using coalesced memory load/stores</li>\r\n	<li>And a final integrated-device specific optimization that uses <a href=\"http://sandbox.arrayfire.com/zero-copy-on-integrated-gpus/\">zero-copy memory buffers</a></li>\r\n</ol>\r\nFor these tests we used a few-year old ASUS N56V laptop we had in the office which features an Intel i7-3610QM CPU with a HD Graphics 4000 GT2 GPU. This particular GPU has 16 execution units which can host up to 128 concurrent threads. We installed Window 7 (Intel OpenCL GPU driver 10.18.10.395; Intel OpenCL CPU drivers 3.0.1.10878 and 5.1.0.25) and Ubuntu 14.10 (GPU driver Beignet 1.1 from git acfc2a2 and CPU driver \"Build 92\"). In future blog posts we will cover 4th and 5th generation hardware (including Iris pro).\r\n<h3>Results and discussion</h3>\r\nOn Linux a single core CPU took <span data-sheets-value=\"[null,3,null,31583]\" data-sheets-userformat=\"[null,null,513,[null,0],null,null,null,null,null,null,null,null,0]\">31.583 ms to execute on a sample size of 20 million sample points. Interestingly, the same code on Windows too over 66 ms to execute on the same sample size (in release mode, with /02 and high power settings selected). This curious result isn\'t particularly important as the OpenCL performance on the CPU does not appear to be degraded between operating systems.</span>\r\n\r\nBelow we plot the speed up of our OpenCL kernels relative to the performance of the Linux single core CPU result above for both the i7-3610QM CPU and HD Graphics 4000 GPU. The Windows CPU variants (a) and (b) are for the 3.0.1.10878 and 5.1.0.25 CPU drivers respectively.\r\n\r\n<iframe width=\"694\" height=\"371\" seamless=\"\" frameborder=\"0\" scrolling=\"no\" src=\"https://docs.google.com/spreadsheets/d/1vMeMPs4d78wsbURINCKmAFDFBwIFzpAl438Q-geoeNs/pubchart?oid=2103791532&amp;format=interactive\"></iframe>\r\n\r\nWe see that the naive port of the CPU code directly to OpenCL is slower than the pure CPU implementation by a factor of four. This result is not terribly surprising once you consider the poorly conceived implementation encounters a full O(N) cost for data transfer and summing region test result for the 20 million sample points.\r\n\r\nThe OCL reduction kernel offloads some of the CPU\'s work by partially summing the region detection results on the GPU. This tweak increased the performance of the kernel between 4x (for the OpenCL on the GPU) to 10x (for OpenCL on the CPU). Curiously, the CPU kernels on Ubuntu and Windows perform very well, achieving speed-ups of about 3x the CPU. This is still below the theoretical 4x speed improvement one would expect on this quad-core CPU namely due to thread management and poor memory access patterns.\r\n\r\nLastly we will discuss the coalesced memory and zero copy kernels. The optimization here involves changing the memory access pattern from using strieded memory access:\r\n<pre class=\"lang:default decode:true\" title=\"Sample CPU code for Monte Carlo Pi estimation\">x = randomNums[2*i];\r\ny = randomNums[2*i + 1];</pre>\r\nto using OpenCL\'s float2 data type to access sequential elements, thus improving utilization of the memory bus. This technique improved throughput by 2.2x on Ubuntu and 3.25x on Windows. This makes the GPU about twice as fast as our initial CPU implementation. We see little to no acceleration in using zero copy buffers for this problem because the problem size for the final CPU sum is quite small (on the order of 1000 elements).\r\n<h3>Conclusion and a preview of the next post</h3>\r\nFor the Monte Carlo Pi problem, it appears Ubuntu and Beignet achieve slightly better performance than the current Windows Intel HD Graphics OpenCL drivers; however, given the limited number of trials performed (and lack of statistical error bars) we may conservatively state that the two OpenCL implementations perform similarly on the same hardware.\r\n\r\nWe found that using OpenCL on the GPU achieves better acceleration than OpenCL on the CPU in general. In one of our kernels, OpenCL on the i7-3610QM CPU was slightly faster than on the GPU, but this is probably due to automatic vectorization in the CPU OpenCL backend for this particular kernel.\r\n\r\nIn our next post we will compare the performance of OpenCL on 3rd, 4th, and 5th generation Intel processors using both memory and compute-bound kernels.','Intel OpenCL performance: 3rd generation hardware','','inherit','open','closed','','8124-revision-v1','','','2015-05-04 21:41:26','2015-05-04 21:41:26','',8124,'http://sandbox.arrayfire.com/8124-revision-v1/',0,'revision','',0),(8220,18528,'2015-05-04 21:47:20','2015-05-04 21:47:20','<h3>Introduction</h3>\r\nWith Intel CPUs making up nearly <a href=\"https://www.cpubenchmark.net/market_share.html\">80% of the CPU market</a> and <a href=\"http://jonpeddie.com/press-releases/details/gpu-market-upintel-and-nvidia-graphics-winners-in-q4-amd-down/\">66% of computers using integrated graphics</a> one can easily argue that integrated graphics devices represent one of the greatest markets for GPU-accelerated computing. Here at ArrayFire, we have long recognized the potential of these devices and offer built-in support for Intel CPUs, GPUs, and AMD APUs in the OpenCL backend of our <a href=\"http://www.arrayfire.com\">ArrayFire</a> GPU computing library. Yet one common theme for debate in the office has been how the hardware performs on different operating systems with different drivers across hardware revisions.\r\n\r\nTo answer these questions (and, perhaps, to win some intra-office geek cred) I decided to write a series of blog posts about Intel\'s GPU OpenCL performance. In this first installment I will compare the performance of OpenCL on a 3rd generation Intel processor on Linux and Windows.\r\n<h3>Monte Carlo Pi estimation</h3>\r\nTo evaluate the performance of Intel\'s hardware I took a textbook problem of computing Pi using a Monte Carlo method. This is a classic example of a memory bound application where the time to read/write data from/to memory dominates most of the computation time. Thus, throwing N-more compute cores at the problem may not always achieve a linear acceleration unless careful attention to memory access patterns and cache usage is performed.\r\n\r\nThe Monte Carlo process for computing pi is fairly simple, consisting of three primary steps:\r\n<ol>\r\n	<li>Generate a series of random (x,y) pairs from within the <a href=\"http://en.wikipedia.org/wiki/Unit_square\">unit square</a></li>\r\n	<li>Determine which of these samples reside within the <a href=\"http://en.wikipedia.org/wiki/Unit_circle\">unit circle</a></li>\r\n	<li>Compute the ratio of the samples that reside within the square to those which reside within the circle and then multiply by four (to account for this being only one quadrant of a circle).</li>\r\n</ol>\r\nThere is a great visualization of this process and a demonstration of how the <a href=\"http://commons.wikimedia.org/wiki/File:Pi_30K.gif\">number of samples impacts the Pi estimate on wikipedia</a>.\r\n\r\nIf you were to implement this in C/C++, your code might look like this:\r\n<pre class=\"lang:default decode:true\" title=\"Sample CPU code for Monte Carlo Pi estimation\">...\r\n\r\nint count = 0;\r\nfloat x, y;\r\nvector&lt;float&gt; randomNums(2*samples);\r\n\r\n// init random numbers within the unit square.\r\n// Pack as (x,y) pairs\r\nfor(int i = 0; i &lt; 2*samples; i++)	{\r\n	randomNums[i] = float(rand()) / RAND_MAX;\r\n}\r\n\r\n// count how many samples reside in the circle\r\nfor(int i = 0; i &lt; samples; i++)\r\n{\r\n	x = randomNums[2*i];\r\n	y = randomNums[2*i + 1];\r\n\r\n	if(x*x + y*y &lt; 1.0)\r\n		count++;\r\n}\r\n\r\n// calculate the estimate and print the result\r\nfloat pi_estimate = 4 * float(count) / samples;\r\n\r\n...</pre>\r\n<h3>Benchmark methods</h3>\r\nWe implemented four different versions of the Pi problem with small changes in the implementation which test various aspects of the hardware and software. These five implementations are:\r\n<ol>\r\n	<li>Single core CPU - A direct implementation of the code listing above</li>\r\n	<li>A naive port of the CPU code to the GPU with no optimizations. Region testing is performed on the GPU and the result is summed on the CPU</li>\r\n	<li>An effort to reduce the workload of the CPU by partially summing the region testing results on the GPU</li>\r\n	<li>A classic GPU optimization using coalesced memory load/stores</li>\r\n	<li>And a final integrated-device specific optimization that uses <a href=\"http://sandbox.arrayfire.com/zero-copy-on-integrated-gpus/\">zero-copy memory buffers</a></li>\r\n</ol>\r\nFor these tests we used a few-year old ASUS N56V laptop we had in the office which features an Intel i7-3610QM CPU with a HD Graphics 4000 GT2 GPU. This particular GPU has 16 execution units which can host up to 128 concurrent threads. We installed Window 7 (Intel OpenCL GPU driver 10.18.10.395; Intel OpenCL CPU drivers 3.0.1.10878 and 5.1.0.25) and Ubuntu 14.10 (GPU driver Beignet 1.1 from git acfc2a2 and CPU driver \"Build 92\"). In future blog posts we will cover 4th and 5th generation hardware (including Iris pro).\r\n<h3>Results and discussion</h3>\r\nOn Linux a single core CPU took <span data-sheets-value=\"[null,3,null,31583]\" data-sheets-userformat=\"[null,null,513,[null,0],null,null,null,null,null,null,null,null,0]\">31.583 ms to execute on a sample size of 20 million sample points. Interestingly, the same code on Windows too over 66 ms to execute on the same sample size (in release mode, with /02 and high power settings selected). This curious result isn\'t particularly important as the OpenCL performance on the CPU does not appear to be degraded between operating systems.</span>\r\n\r\nBelow we plot the speed up of our OpenCL kernels relative to the performance of the Linux single core CPU result above for both the i7-3610QM CPU and HD Graphics 4000 GPU. The Windows CPU variants (a) and (b) are for the 3.0.1.10878 and 5.1.0.25 CPU drivers respectively.\r\n\r\n<iframe width=\"694\" height=\"371\" seamless frameborder=\"0\" scrolling=\"no\" src=\"https://docs.google.com/spreadsheets/d/1vMeMPs4d78wsbURINCKmAFDFBwIFzpAl438Q-geoeNs/pubchart?oid=2103791532&amp;format=interactive\"></iframe>\r\n\r\nWe see that the naive port of the CPU code directly to OpenCL is slower than the pure CPU implementation by a factor of four. This result is not terribly surprising once you consider the poorly conceived implementation encounters a full O(N) cost for data transfer and summing region test result for the 20 million sample points.\r\n\r\nThe OCL reduction kernel offloads some of the CPU\'s work by partially summing the region detection results on the GPU. This tweak increased the performance of the kernel between 4x (for the OpenCL on the GPU) to 10x (for OpenCL on the CPU). Curiously, the CPU kernels on Ubuntu and Windows perform very well, achieving speed-ups of about 3x the CPU. This is still below the theoretical 4x speed improvement one would expect on this quad-core CPU namely due to thread management and poor memory access patterns.\r\n\r\nLastly we will discuss the coalesced memory and zero copy kernels. The optimization here involves changing the memory access pattern from using strieded memory access:\r\n<pre class=\"lang:default decode:true\" title=\"Sample CPU code for Monte Carlo Pi estimation\">x = randomNums[2*i];\r\ny = randomNums[2*i + 1];</pre>\r\nto using OpenCL\'s float2 data type to access sequential elements, thus improving utilization of the memory bus. This technique improved throughput by 2.2x on Ubuntu and 3.25x on Windows. This makes the GPU about twice as fast as our initial CPU implementation. We see little to no acceleration in using zero copy buffers for this problem because the problem size for the final CPU sum is quite small (on the order of 1000 elements).\r\n<h3>Conclusion and a preview of the next post</h3>\r\nFor the Monte Carlo Pi problem, it appears Ubuntu and Beignet achieve slightly better performance than the current Windows Intel HD Graphics OpenCL drivers; however, given the limited number of trials performed (and lack of statistical error bars) we may conservatively state that the two OpenCL implementations perform similarly on the same hardware.\r\n\r\nWe found that using OpenCL on the GPU achieves better acceleration than OpenCL on the CPU in general. In one of our kernels, OpenCL on the i7-3610QM CPU was slightly faster than on the GPU, but this is probably due to automatic vectorization in the CPU OpenCL backend for this particular kernel.\r\n\r\nIn our next post we will compare the performance of OpenCL on 3rd, 4th, and 5th generation Intel processors using both memory and compute-bound kernels.','Intel OpenCL performance: 3rd generation hardware','','inherit','open','closed','','8124-revision-v1','','','2015-05-04 21:47:20','2015-05-04 21:47:20','',8124,'http://sandbox.arrayfire.com/8124-revision-v1/',0,'revision','',0),(8221,18528,'2015-05-04 21:54:34','2015-05-04 21:54:34','<h3>Introduction</h3>\r\nWith Intel CPUs making up nearly <a href=\"https://www.cpubenchmark.net/market_share.html\">80% of the CPU market</a> and <a href=\"http://jonpeddie.com/press-releases/details/gpu-market-upintel-and-nvidia-graphics-winners-in-q4-amd-down/\">66% of computers using integrated graphics</a> one can easily argue that integrated graphics devices represent one of the greatest markets for GPU-accelerated computing. Here at ArrayFire, we have long recognized the potential of these devices and offer built-in support for Intel CPUs, GPUs, and AMD APUs in the OpenCL backend of our <a href=\"http://www.arrayfire.com\">ArrayFire</a> GPU computing library. Yet one common theme for debate in the office has been how the hardware performs on different operating systems with different drivers across hardware revisions.\r\n\r\nTo answer these questions (and, perhaps, to win some intra-office geek cred) I decided to write a series of blog posts about Intel\'s GPU OpenCL performance. In this first installment I will compare the performance of OpenCL on a 3rd generation Intel processor on Linux and Windows.\r\n<h3>Monte Carlo Pi estimation</h3>\r\nTo evaluate the performance of Intel\'s hardware I took a textbook problem of computing Pi using a Monte Carlo method. This is a classic example of a memory bound application where the time to read/write data from/to memory dominates most of the computation time. Thus, throwing N-more compute cores at the problem may not always achieve a linear acceleration unless careful attention to memory access patterns and cache usage is performed.\r\n\r\nThe Monte Carlo process for computing pi is fairly simple, consisting of three primary steps:\r\n<ol>\r\n	<li>Generate a series of random (x,y) pairs from within the <a href=\"http://en.wikipedia.org/wiki/Unit_square\">unit square</a></li>\r\n	<li>Determine which of these samples reside within the <a href=\"http://en.wikipedia.org/wiki/Unit_circle\">unit circle</a></li>\r\n	<li>Compute the ratio of the samples that reside within the square to those which reside within the circle and then multiply by four (to account for this being only one quadrant of a circle).</li>\r\n</ol>\r\nThere is a great visualization of this process and a demonstration of how the <a href=\"http://commons.wikimedia.org/wiki/File:Pi_30K.gif\">number of samples impacts the Pi estimate on wikipedia</a>.\r\n\r\nIf you were to implement this in C/C++, your code might look like this:\r\n<pre class=\"lang:default decode:true\" title=\"Sample CPU code for Monte Carlo Pi estimation\">...\r\n\r\nint count = 0;\r\nfloat x, y;\r\nvector&lt;float&gt; randomNums(2*samples);\r\n\r\n// init random numbers within the unit square.\r\n// Pack as (x,y) pairs\r\nfor(int i = 0; i &lt; 2*samples; i++)	{\r\n	randomNums[i] = float(rand()) / RAND_MAX;\r\n}\r\n\r\n// count how many samples reside in the circle\r\nfor(int i = 0; i &lt; samples; i++)\r\n{\r\n	x = randomNums[2*i];\r\n	y = randomNums[2*i + 1];\r\n\r\n	if(x*x + y*y &lt; 1.0)\r\n		count++;\r\n}\r\n\r\n// calculate the estimate and print the result\r\nfloat pi_estimate = 4 * float(count) / samples;\r\n\r\n...</pre>\r\n<h3>Benchmark methods</h3>\r\nWe implemented four different versions of the Pi problem with small changes in the implementation which test various aspects of the hardware and software. These five implementations are:\r\n<ol>\r\n	<li>Single core CPU - A direct implementation of the code listing above</li>\r\n	<li>A naive port of the CPU code to the GPU with no optimizations. Region testing is performed on the GPU and the result is summed on the CPU</li>\r\n	<li>An effort to reduce the workload of the CPU by partially summing the region testing results on the GPU</li>\r\n	<li>A classic GPU optimization using coalesced memory load/stores</li>\r\n	<li>And a final integrated-device specific optimization that uses <a href=\"http://sandbox.arrayfire.com/zero-copy-on-integrated-gpus/\">zero-copy memory buffers</a></li>\r\n</ol>\r\nFor these tests we used a few-year old ASUS N56V laptop we had in the office which features an Intel i7-3610QM CPU with a HD Graphics 4000 GT2 GPU. This particular GPU has 16 execution units which can host up to 128 concurrent threads. We installed Window 7 (Intel OpenCL GPU driver 10.18.10.395; Intel OpenCL CPU drivers 5.1.0.25) and Ubuntu 14.10 (GPU driver Beignet 1.1 from git acfc2a2 and CPU driver \"Build 92\"). In future blog posts we will cover 4th and 5th generation hardware (including Iris pro).\r\n<h3>Results and discussion</h3>\r\nOn Linux a single core CPU took <span data-sheets-value=\"[null,3,null,31583]\" data-sheets-userformat=\"[null,null,513,[null,0],null,null,null,null,null,null,null,null,0]\">31.583 ms to execute on a sample size of 20 million sample points. Interestingly, the same code on Windows too over 66 ms to execute on the same sample size (in release mode, with /02 and high power settings selected). This curious result isn\'t particularly important as the OpenCL performance on the CPU does not appear to be degraded between operating systems.</span>\r\n\r\nBelow we plot the speed up of our OpenCL kernels relative to the performance of the Linux single core CPU result above for both the i7-3610QM CPU and HD Graphics 4000 GPU.\r\n\r\n<iframe width=\"694\" height=\"371\" seamless=\"\" frameborder=\"0\" scrolling=\"no\" src=\"https://docs.google.com/spreadsheets/d/1vMeMPs4d78wsbURINCKmAFDFBwIFzpAl438Q-geoeNs/pubchart?oid=2103791532&amp;format=interactive\"></iframe>\r\n\r\nWe see that the naive port of the CPU code directly to OpenCL is slower than the pure CPU implementation by a factor of four. This result is not terribly surprising once you consider the poorly conceived implementation encounters a full O(N) cost for data transfer and summing region test result for the 20 million sample points.\r\n\r\nThe OCL reduction kernel offloads some of the CPU\'s work by partially summing the region detection results on the GPU. This tweak increased the performance of the kernel between 4x (for the OpenCL on the GPU) to 10x (for OpenCL on the CPU). Curiously, the CPU kernels on Ubuntu and Windows perform very well, achieving speed-ups of about 3x the CPU. This is still below the theoretical 4x speed improvement one would expect on this quad-core CPU namely due to thread management and poor memory access patterns.\r\n\r\nLastly we will discuss the coalesced memory and zero copy kernels. The optimization here involves changing the memory access pattern from using strieded memory access:\r\n<pre class=\"lang:default decode:true\" title=\"Sample CPU code for Monte Carlo Pi estimation\">x = randomNums[2*i];\r\ny = randomNums[2*i + 1];</pre>\r\nto using OpenCL\'s float2 data type to access sequential elements, thus improving utilization of the memory bus. This technique improved throughput by 2.2x on Ubuntu and 3.25x on Windows. This makes the GPU about twice as fast as our initial CPU implementation. We see little to no acceleration in using zero copy buffers for this problem because the problem size for the final CPU sum is quite small (on the order of 1000 elements).\r\n<h3>Conclusion and a preview of the next post</h3>\r\nFor the Monte Carlo Pi problem, it appears Ubuntu and Beignet achieve slightly better performance than the current Windows Intel HD Graphics OpenCL drivers; however, given the limited number of trials performed (and lack of statistical error bars) we may conservatively state that the two OpenCL implementations perform similarly on the same hardware.\r\n\r\nWe found that using OpenCL on the GPU achieves better acceleration than OpenCL on the CPU in general. In one of our kernels, OpenCL on the i7-3610QM CPU was slightly faster than on the GPU, but this is probably due to automatic vectorization in the CPU OpenCL backend for this particular kernel.\r\n\r\nIn our next post we will compare the performance of OpenCL on 3rd, 4th, and 5th generation Intel processors using both memory and compute-bound kernels.','Intel OpenCL performance: 3rd generation hardware','','inherit','open','closed','','8124-revision-v1','','','2015-05-04 21:54:34','2015-05-04 21:54:34','',8124,'http://sandbox.arrayfire.com/8124-revision-v1/',0,'revision','',0),(8224,18528,'2015-05-05 16:44:51','2015-05-05 16:44:51','<h3>Introduction</h3>\r\nWith Intel CPUs making up nearly <a href=\"https://www.cpubenchmark.net/market_share.html\">80% of the CPU market</a> and <a href=\"http://jonpeddie.com/press-releases/details/gpu-market-upintel-and-nvidia-graphics-winners-in-q4-amd-down/\">66% of computers using integrated graphics</a> one can easily argue that integrated graphics devices represent one of the greatest markets for GPU-accelerated computing. Here at ArrayFire, we have long recognized the potential of these devices and offer built-in support for Intel CPUs, GPUs, and AMD APUs in the OpenCL backend of our <a href=\"http://www.arrayfire.com\">ArrayFire</a> GPU computing library. Yet one common theme for debate in the office has been how the hardware performs on different operating systems with different drivers across hardware revisions.\r\n\r\nTo answer these questions (and, perhaps, to win some intra-office geek cred) I decided to write a series of blog posts about Intel\'s GPU OpenCL performance. In this first installment I will compare the performance of OpenCL on a 3rd generation Intel processor on Linux and Windows.\r\n<h3>Monte Carlo Pi estimation</h3>\r\nTo evaluate the performance of Intel\'s hardware I took a textbook problem of computing Pi using a Monte Carlo method. This is a classic example of a memory bound application where the time to read/write data from/to memory dominates most of the computation time. Thus, throwing N-more compute cores at the problem may not always achieve a linear acceleration unless careful attention to memory access patterns and cache usage is performed.\r\n\r\nThe Monte Carlo process for computing pi is fairly simple, consisting of three primary steps:\r\n<ol>\r\n	<li>Generate a series of random (x,y) pairs from within the <a href=\"http://en.wikipedia.org/wiki/Unit_square\">unit square</a></li>\r\n	<li>Determine which of these samples reside within the <a href=\"http://en.wikipedia.org/wiki/Unit_circle\">unit circle</a></li>\r\n	<li>Compute the ratio of the samples that reside within the square to those which reside within the circle and then multiply by four (to account for this being only one quadrant of a circle).</li>\r\n</ol>\r\nThere is a great visualization of this process and a demonstration of how the <a href=\"http://commons.wikimedia.org/wiki/File:Pi_30K.gif\">number of samples impacts the Pi estimate on wikipedia</a>.\r\n\r\nIf you were to implement this in C/C++, your code might look like this:\r\n<pre class=\"lang:default decode:true\" title=\"Sample CPU code for Monte Carlo Pi estimation\">...\r\n\r\nint count = 0;\r\nfloat x, y;\r\nvector&lt;float&gt; randomNums(2*samples);\r\n\r\n// init random numbers within the unit square.\r\n// Pack as (x,y) pairs\r\nfor(int i = 0; i &lt; 2*samples; i++)	{\r\n	randomNums[i] = float(rand()) / RAND_MAX;\r\n}\r\n\r\n// count how many samples reside in the circle\r\nfor(int i = 0; i &lt; samples; i++)\r\n{\r\n	x = randomNums[2*i];\r\n	y = randomNums[2*i + 1];\r\n\r\n	if(x*x + y*y &lt; 1.0)\r\n		count++;\r\n}\r\n\r\n// calculate the estimate and print the result\r\nfloat pi_estimate = 4 * float(count) / samples;\r\n\r\n...</pre>\r\n<h3>Benchmark methods</h3>\r\nWe implemented four different versions of the Pi problem with small changes in the implementation which test various aspects of the hardware and software. These five implementations are:\r\n<ol>\r\n	<li>Single core CPU - A direct implementation of the code listing above</li>\r\n	<li>A naive port of the CPU code to the GPU with no optimizations. Region testing is performed on the GPU and the result is summed on the CPU</li>\r\n	<li>An effort to reduce the workload of the CPU by partially summing the region testing results on the GPU</li>\r\n	<li>A classic GPU optimization using coalesced memory load/stores</li>\r\n	<li>And a final integrated-device specific optimization that uses <a href=\"http://sandbox.arrayfire.com/zero-copy-on-integrated-gpus/\">zero-copy memory buffers</a></li>\r\n</ol>\r\nFor these tests we used a few-year old ASUS N56V laptop we had in the office which features an Intel i7-3610QM CPU with a HD Graphics 4000 GT2 GPU. This particular GPU has 16 execution units which can host up to 128 concurrent threads. From the <a href=\"http://download.intel.com/support/processors/corei7/sb/core_i7-3600_m.pdf\">specification sheet</a>, the CPU maximum performance is 106 GFLOPs whereas the GPU can do slightly better at 140 GFLOPs. We installed Window 7 (Intel OpenCL GPU driver 10.18.10.395; Intel OpenCL CPU drivers 5.1.0.25) and Ubuntu 14.10 (GPU driver Beignet 1.1 from git acfc2a2 and CPU driver \"Build 92\"). In future blog posts we will cover 4th and 5th generation hardware (including Iris pro).\r\n<h3>Results and discussion</h3>\r\nOn Linux a single core CPU took <span data-sheets-value=\"[null,3,null,31583]\" data-sheets-userformat=\"[null,null,513,[null,0],null,null,null,null,null,null,null,null,0]\">31.583 ms to execute on a sample size of 20 million sample points. Interestingly, the same code on Windows too over 66 ms to execute on the same sample size (in release mode, with /02 and high power settings selected). This curious result isn\'t particularly important as the OpenCL performance on the CPU does not appear to be degraded between operating systems.</span>\r\n\r\nBelow we plot the speed up of our OpenCL kernels relative to the performance of the Linux single core CPU result above for both the i7-3610QM CPU and HD Graphics 4000 GPU.\r\n\r\n<iframe width=\"694\" height=\"371\" seamless=\"\" frameborder=\"0\" scrolling=\"no\" src=\"https://docs.google.com/spreadsheets/d/1vMeMPs4d78wsbURINCKmAFDFBwIFzpAl438Q-geoeNs/pubchart?oid=2103791532&amp;format=interactive\"></iframe>\r\n\r\nWe see that the naive port of the CPU code directly to OpenCL is slower than the pure CPU implementation by a factor of four. This result is not terribly surprising once you consider the poorly conceived implementation encounters a full O(N) cost for data transfer and summing region test result for the 20 million sample points.\r\n\r\nThe OCL reduction kernel offloads some of the CPU\'s work by partially summing the region detection results on the GPU. This tweak increased the performance of the kernel between 4x (for the OpenCL on the GPU) to 10x (for OpenCL on the CPU). Curiously, the CPU kernels on Ubuntu and Windows perform very well, achieving speed-ups of about 3x the CPU. This is still below the theoretical 4x speed improvement one would expect on this quad-core CPU namely due to thread management and poor memory access patterns.\r\n\r\nLastly we will discuss the coalesced memory and zero copy kernels. The optimization here involves changing the memory access pattern from using strieded memory access:\r\n<pre class=\"lang:default decode:true\" title=\"Sample CPU code for Monte Carlo Pi estimation\">x = randomNums[2*i];\r\ny = randomNums[2*i + 1];</pre>\r\nto using OpenCL\'s float2 data type to access sequential elements, thus improving utilization of the memory bus. This technique improved throughput by 2.2x on Ubuntu and 3.25x on Windows. This makes the GPU about twice as fast as our initial CPU implementation. We see little to no acceleration in using zero copy buffers for this problem because the problem size for the final CPU sum is quite small (on the order of 1000 elements).\r\n<h3>Conclusion and a preview of the next post</h3>\r\nFor the Monte Carlo Pi problem, it appears Ubuntu and Beignet achieve slightly better performance than the current Windows Intel HD Graphics OpenCL drivers; however, given the limited number of trials performed (and lack of statistical error bars) we may conservatively state that the two OpenCL implementations perform similarly on the same hardware.\r\n\r\nWe found that using OpenCL on the GPU achieves better acceleration than OpenCL on the CPU in general. In one of our kernels, OpenCL on the i7-3610QM CPU was slightly faster than on the GPU, but this is probably due to automatic vectorization in the CPU OpenCL backend for this particular kernel.\r\n\r\nIn our next post we will compare the performance of OpenCL on 3rd, 4th, and 5th generation Intel processors using both memory and compute-bound kernels.','Intel OpenCL performance: 3rd generation hardware','','inherit','open','closed','','8124-revision-v1','','','2015-05-05 16:44:51','2015-05-05 16:44:51','',8124,'http://sandbox.arrayfire.com/8124-revision-v1/',0,'revision','',0),(8225,18528,'2015-05-05 16:49:07','2015-05-05 16:49:07','<h3>Introduction</h3>\r\nWith Intel CPUs making up nearly <a href=\"https://www.cpubenchmark.net/market_share.html\">80% of the CPU market</a> and <a href=\"http://jonpeddie.com/press-releases/details/gpu-market-upintel-and-nvidia-graphics-winners-in-q4-amd-down/\">66% of computers using integrated graphics</a> one can easily argue that integrated graphics devices represent one of the greatest markets for GPU-accelerated computing. Here at ArrayFire, we have long recognized the potential of these devices and offer built-in support for Intel CPUs, GPUs, and AMD APUs in the OpenCL backend of our <a href=\"http://www.arrayfire.com\">ArrayFire</a> GPU computing library. Yet one common theme for debate in the office has been how the hardware performs on different operating systems with different drivers across hardware revisions.\r\n\r\nTo answer these questions (and, perhaps, to win some intra-office geek cred) I decided to write a series of blog posts about Intel\'s GPU OpenCL performance. In this first installment I will compare the performance of OpenCL on a 3rd generation Intel processor on Linux and Windows.\r\n<h3>Monte Carlo Pi estimation</h3>\r\nTo evaluate the performance of Intel\'s hardware I took a textbook problem of computing Pi using a Monte Carlo method. This is a classic example of a memory bound application where the time to read/write data from/to memory dominates most of the computation time. Thus, throwing N-more compute cores at the problem may not always achieve a linear acceleration unless careful attention to memory access patterns and cache usage is performed.\r\n\r\nThe Monte Carlo process for computing pi is fairly simple, consisting of three primary steps:\r\n<ol>\r\n	<li>Generate a series of random (x,y) pairs from within the <a href=\"http://en.wikipedia.org/wiki/Unit_square\">unit square</a></li>\r\n	<li>Determine which of these samples reside within the <a href=\"http://en.wikipedia.org/wiki/Unit_circle\">unit circle</a></li>\r\n	<li>Compute the ratio of the samples that reside within the square to those which reside within the circle and then multiply by four (to account for this being only one quadrant of a circle).</li>\r\n</ol>\r\nThere is a great visualization of this process and a demonstration of how the <a href=\"http://commons.wikimedia.org/wiki/File:Pi_30K.gif\">number of samples impacts the Pi estimate on wikipedia</a>.\r\n\r\nIf you were to implement this in C/C++, your code might look like this:\r\n<pre class=\"lang:default decode:true\" title=\"Sample CPU code for Monte Carlo Pi estimation\">...\r\n\r\nint count = 0;\r\nfloat x, y;\r\nvector&lt;float&gt; randomNums(2*samples);\r\n\r\n// init random numbers within the unit square.\r\n// Pack as (x,y) pairs\r\nfor(int i = 0; i &lt; 2*samples; i++)	{\r\n	randomNums[i] = float(rand()) / RAND_MAX;\r\n}\r\n\r\n// count how many samples reside in the circle\r\nfor(int i = 0; i &lt; samples; i++)\r\n{\r\n	x = randomNums[2*i];\r\n	y = randomNums[2*i + 1];\r\n\r\n	if(x*x + y*y &lt; 1.0)\r\n		count++;\r\n}\r\n\r\n// calculate the estimate and print the result\r\nfloat pi_estimate = 4 * float(count) / samples;\r\n\r\n...</pre>\r\n<h3>Benchmark methods</h3>\r\nWe implemented four different versions of the Pi problem with small changes in the implementation which test various aspects of the hardware and software. These five implementations are:\r\n<ol>\r\n	<li>Single core CPU - A direct implementation of the code listing above</li>\r\n	<li>A naive port of the CPU code to the GPU with no optimizations. Region testing is performed on the GPU and the result is summed on the CPU</li>\r\n	<li>An effort to reduce the workload of the CPU by partially summing the region testing results on the GPU</li>\r\n	<li>A classic GPU optimization using coalesced memory load/stores</li>\r\n	<li>And a final integrated-device specific optimization that uses <a href=\"http://sandbox.arrayfire.com/zero-copy-on-integrated-gpus/\">zero-copy memory buffers</a></li>\r\n</ol>\r\nThe source code for these tests are published in my \"<a href=\"https://github.com/bkloppenborg/blogcode\">blog code</a>\" GitHub repository.\r\n\r\nFor these tests we used a few-year old ASUS N56V laptop we had in the office which features an Intel i7-3610QM CPU with a HD Graphics 4000 GT2 GPU. This particular GPU has 16 execution units which can host up to 128 concurrent threads. From the <a href=\"http://download.intel.com/support/processors/corei7/sb/core_i7-3600_m.pdf\">specification sheet</a>, the CPU maximum performance is 106 GFLOPs whereas the GPU can do slightly better at 140 GFLOPs. We installed Window 7 (Intel OpenCL GPU driver 10.18.10.395; Intel OpenCL CPU drivers 5.1.0.25) and Ubuntu 14.10 (GPU driver Beignet 1.1 from git acfc2a2 and CPU driver \"Build 92\"). In future blog posts we will cover 4th and 5th generation hardware (including Iris pro).\r\n<h3>Results and discussion</h3>\r\nOn Linux a single core CPU took <span data-sheets-value=\"[null,3,null,31583]\" data-sheets-userformat=\"[null,null,513,[null,0],null,null,null,null,null,null,null,null,0]\">31.583 ms to execute on a sample size of 20 million sample points. Interestingly, the same code on Windows too over 66 ms to execute on the same sample size (in release mode, with /02 and high power settings selected). This curious result isn\'t particularly important as the OpenCL performance on the CPU does not appear to be degraded between operating systems.</span>\r\n\r\nBelow we plot the speed up of our OpenCL kernels relative to the performance of the Linux single core CPU result above for both the i7-3610QM CPU and HD Graphics 4000 GPU.\r\n\r\n<iframe width=\"694\" height=\"371\" seamless=\"\" frameborder=\"0\" scrolling=\"no\" src=\"https://docs.google.com/spreadsheets/d/1vMeMPs4d78wsbURINCKmAFDFBwIFzpAl438Q-geoeNs/pubchart?oid=2103791532&amp;format=interactive\"></iframe>\r\n\r\nWe see that the naive port of the CPU code directly to OpenCL is slower than the pure CPU implementation by a factor of four. This result is not terribly surprising once you consider the poorly conceived implementation encounters a full O(N) cost for data transfer and summing region test result for the 20 million sample points.\r\n\r\nThe OCL reduction kernel offloads some of the CPU\'s work by partially summing the region detection results on the GPU. This tweak increased the performance of the kernel between 4x (for the OpenCL on the GPU) to 10x (for OpenCL on the CPU). Curiously, the CPU kernels on Ubuntu and Windows perform very well, achieving speed-ups of about 3x the CPU. This is still below the theoretical 4x speed improvement one would expect on this quad-core CPU namely due to thread management and poor memory access patterns.\r\n\r\nLastly we will discuss the coalesced memory and zero copy kernels. The optimization here involves changing the memory access pattern from using strieded memory access:\r\n<pre class=\"lang:default decode:true\" title=\"Sample CPU code for Monte Carlo Pi estimation\">x = randomNums[2*i];\r\ny = randomNums[2*i + 1];</pre>\r\nto using OpenCL\'s float2 data type to access sequential elements, thus improving utilization of the memory bus. This technique improved throughput by 2.2x on Ubuntu and 3.25x on Windows. This makes the GPU about twice as fast as our initial CPU implementation. We see little to no acceleration in using zero copy buffers for this problem because the problem size for the final CPU sum is quite small (on the order of 1000 elements).\r\n<h3>Conclusion and a preview of the next post</h3>\r\nFor the Monte Carlo Pi problem, it appears Ubuntu and Beignet achieve slightly better performance than the current Windows Intel HD Graphics OpenCL drivers; however, given the limited number of trials performed (and lack of statistical error bars) we may conservatively state that the two OpenCL implementations perform similarly on the same hardware.\r\n\r\nWe found that using OpenCL on the GPU achieves better acceleration than OpenCL on the CPU in general. In one of our kernels, OpenCL on the i7-3610QM CPU was slightly faster than on the GPU, but this is probably due to automatic vectorization in the CPU OpenCL backend for this particular kernel.\r\n\r\nIn our next post we will compare the performance of OpenCL on 3rd, 4th, and 5th generation Intel processors using both memory and compute-bound kernels.','Intel OpenCL performance: 3rd generation hardware','','inherit','open','closed','','8124-revision-v1','','','2015-05-05 16:49:07','2015-05-05 16:49:07','',8124,'http://sandbox.arrayfire.com/8124-revision-v1/',0,'revision','',0),(8226,18528,'2015-05-05 16:50:29','2015-05-05 16:50:29','<h3>Introduction</h3>\r\nWith Intel CPUs making up nearly <a href=\"https://www.cpubenchmark.net/market_share.html\">80% of the CPU market</a> and <a href=\"http://jonpeddie.com/press-releases/details/gpu-market-upintel-and-nvidia-graphics-winners-in-q4-amd-down/\">66% of computers using integrated graphics</a> one can easily argue that integrated graphics devices represent one of the greatest markets for GPU-accelerated computing. Here at ArrayFire, we have long recognized the potential of these devices and offer built-in support for Intel CPUs, GPUs, and AMD APUs in the OpenCL backend of our <a href=\"http://www.arrayfire.com\">ArrayFire</a> GPU computing library. Yet one common theme for debate in the office has been how the hardware performs on different operating systems with different drivers across hardware revisions.\r\n\r\nTo answer these questions (and, perhaps, to win some intra-office geek cred) I decided to write a series of blog posts about Intel\'s GPU OpenCL performance. In this first installment I will compare the performance of OpenCL on a 3rd generation Intel processor on Linux and Windows.\r\n<h3>Monte Carlo Pi estimation</h3>\r\nTo evaluate the performance of Intel\'s hardware I took a textbook problem of computing Pi using a Monte Carlo method. This is a classic example of a memory bound application where the time to read/write data from/to memory dominates most of the computation time. Thus, throwing N-more compute cores at the problem may not always achieve a linear acceleration unless careful attention to memory access patterns and cache usage is performed.\r\n\r\nThe Monte Carlo process for computing pi is fairly simple, consisting of three primary steps:\r\n<ol>\r\n	<li>Generate a series of random (x,y) pairs from within the <a href=\"http://en.wikipedia.org/wiki/Unit_square\">unit square</a></li>\r\n	<li>Determine which of these samples reside within the <a href=\"http://en.wikipedia.org/wiki/Unit_circle\">unit circle</a></li>\r\n	<li>Compute the ratio of the samples that reside within the square to those which reside within the circle and then multiply by four (to account for this being only one quadrant of a circle).</li>\r\n</ol>\r\nThere is a great visualization of this process and a demonstration of how the <a href=\"http://commons.wikimedia.org/wiki/File:Pi_30K.gif\">number of samples impacts the Pi estimate on wikipedia</a>.\r\n\r\nIf you were to implement this in C/C++, your code might look like this:\r\n<pre class=\"lang:default decode:true\" title=\"Sample CPU code for Monte Carlo Pi estimation\">...\r\n\r\nint count = 0;\r\nfloat x, y;\r\nvector&lt;float&gt; randomNums(2*samples);\r\n\r\n// init random numbers within the unit square.\r\n// Pack as (x,y) pairs\r\nfor(int i = 0; i &lt; 2*samples; i++)	{\r\n	randomNums[i] = float(rand()) / RAND_MAX;\r\n}\r\n\r\n// count how many samples reside in the circle\r\nfor(int i = 0; i &lt; samples; i++)\r\n{\r\n	x = randomNums[2*i];\r\n	y = randomNums[2*i + 1];\r\n\r\n	if(x*x + y*y &lt; 1.0)\r\n		count++;\r\n}\r\n\r\n// calculate the estimate and print the result\r\nfloat pi_estimate = 4 * float(count) / samples;\r\n\r\n...</pre>\r\n<h3>Benchmark methods</h3>\r\nWe implemented four different versions of the Pi problem with small changes in the implementation which test various aspects of the hardware and software. These five implementations are:\r\n<ol>\r\n	<li>Single core CPU - A direct implementation of the code listing above</li>\r\n	<li>A naive port of the CPU code to the GPU with no optimizations. Region testing is performed on the GPU and the result is summed on the CPU</li>\r\n	<li>An effort to reduce the workload of the CPU by partially summing the region testing results on the GPU</li>\r\n	<li>A classic GPU optimization using coalesced memory load/stores</li>\r\n	<li>And a final integrated-device specific optimization that uses <a href=\"http://sandbox.arrayfire.com/zero-copy-on-integrated-gpus/\">zero-copy memory buffers</a></li>\r\n</ol>\r\nThe source code for these tests are published in my \"<a href=\"https://github.com/bkloppenborg/blogcode\">blog code</a>\" GitHub repository.\r\n\r\nFor these tests we used a few-year old ASUS N56V laptop we had in the office which features an Intel i7-3610QM CPU with a HD Graphics 4000 GT2 GPU. This particular GPU has 16 execution units which can host up to 128 concurrent threads. From the <a href=\"http://download.intel.com/support/processors/corei7/sb/core_i7-3600_m.pdf\">specification sheet</a>, the CPU maximum performance is 106 GFLOPs whereas the GPU can do slightly better at 140 GFLOPs. We installed Window 7 (Intel OpenCL GPU driver 10.18.10.395; Intel OpenCL CPU drivers 5.1.0.25) and Ubuntu 14.10 (GPU driver Beignet 1.1 from git acfc2a2 and CPU driver \"Build 92\"). In future blog posts we will cover 4th and 5th generation hardware (including Iris pro).\r\n<h3>Results and discussion</h3>\r\nOn Linux a single core CPU took <span data-sheets-value=\"[null,3,null,31583]\" data-sheets-userformat=\"[null,null,513,[null,0],null,null,null,null,null,null,null,null,0]\">31.583 ms to execute on a sample size of 20 million sample points. Interestingly, the same code on Windows too over 66 ms to execute on the same sample size (in release mode, with /02 and high power settings selected). This curious result isn\'t particularly important as the OpenCL performance on the CPU does not appear to be degraded between operating systems.</span>\r\n\r\nBelow we plot the speed up of our OpenCL kernels relative to the performance of the Linux single core CPU result above for both the i7-3610QM CPU and HD Graphics 4000 GPU.\r\n\r\n<iframe width=\"694\" height=\"371\" seamless frameborder=\"0\" scrolling=\"no\" src=\"https://docs.google.com/spreadsheets/d/1vMeMPs4d78wsbURINCKmAFDFBwIFzpAl438Q-geoeNs/pubchart?oid=2103791532&amp;format=interactive\"></iframe>\r\n\r\nWe see that the naive port of the CPU code directly to OpenCL is slower than the pure CPU implementation by a factor of four. This result is not terribly surprising once you consider the poorly conceived implementation encounters a full O(N) cost for data transfer and summing region test result for the 20 million sample points.\r\n\r\nThe OCL reduction kernel offloads some of the CPU\'s work by partially summing the region detection results on the GPU. This tweak increased the performance of the kernel between 4x (for the OpenCL on the GPU) to 10x (for OpenCL on the CPU). Curiously, the CPU kernels on Ubuntu and Windows perform very well, achieving speed-ups of about 3x the CPU. This is still below the theoretical 4x speed improvement one would expect on this quad-core CPU namely due to thread management and poor memory access patterns.\r\n\r\nLastly we will discuss the coalesced memory and zero copy kernels. The optimization here involves changing the memory access pattern from using strieded memory access:\r\n<pre class=\"lang:default decode:true\" title=\"Sample CPU code for Monte Carlo Pi estimation\">x = randomNums[2*i];\r\ny = randomNums[2*i + 1];</pre>\r\nto using OpenCL\'s float2 data type to access sequential elements, thus improving utilization of the memory bus. This technique improved throughput by 2.2x on Ubuntu and 3.25x on Windows. This makes the GPU about twice as fast as our initial CPU implementation. We see little to no acceleration in using zero copy buffers for this problem because the problem size for the final CPU sum is quite small (on the order of 1000 elements).\r\n<h3>Conclusion and a preview of the next post</h3>\r\nFor the Monte Carlo Pi problem, it appears Ubuntu and Beignet achieve slightly better performance than the current Windows Intel HD Graphics OpenCL drivers; however, given the limited number of trials performed (and lack of statistical error bars) we may conservatively state that the two OpenCL implementations perform similarly on the same hardware.\r\n\r\nWe found that using OpenCL on the GPU achieves better acceleration than OpenCL on the CPU in general. In one of our kernels, OpenCL on the i7-3610QM CPU was slightly faster than on the GPU, but this is probably due to automatic vectorization in the CPU OpenCL backend for this particular kernel.\r\n\r\nIn our next post we will compare the performance of OpenCL on 3rd, 4th, and 5th generation Intel processors using both memory and compute-bound kernels.','Intel OpenCL performance: 3rd generation hardware','','inherit','open','closed','','8124-revision-v1','','','2015-05-05 16:50:29','2015-05-05 16:50:29','',8124,'http://sandbox.arrayfire.com/8124-revision-v1/',0,'revision','',0),(8227,18528,'2015-05-05 16:57:05','2015-05-05 16:57:05','<h3>Introduction</h3>\r\nWith Intel CPUs making up nearly <a href=\"https://www.cpubenchmark.net/market_share.html\">80% of the CPU market</a> and <a href=\"http://jonpeddie.com/press-releases/details/gpu-market-upintel-and-nvidia-graphics-winners-in-q4-amd-down/\">66% of computers using integrated graphics</a> one can easily argue that integrated graphics devices represent one of the greatest markets for GPU-accelerated computing. Here at ArrayFire, we have long recognized the potential of these devices and offer built-in support for Intel CPUs, GPUs, and AMD APUs in the OpenCL backend of our <a href=\"http://www.arrayfire.com\">ArrayFire</a> GPU computing library. Yet one common theme for debate in the office has been how the hardware performs on different operating systems with different drivers across hardware revisions.\r\n\r\nTo answer these questions (and, perhaps, to win some intra-office geek cred) I decided to write a series of blog posts about Intel\'s GPU OpenCL performance. In this first installment I will compare the performance of OpenCL on a 3rd generation Intel processor on Linux and Windows.\r\n<h3>Monte Carlo Pi estimation</h3>\r\nTo evaluate the performance of Intel\'s hardware I took a textbook problem of computing Pi using a Monte Carlo method. This is a classic example of a memory bound application where the time to read/write data from/to memory dominates most of the computation time. Thus, throwing N-more compute cores at the problem may not always achieve a linear acceleration unless careful attention to memory access patterns and cache usage is performed.\r\n\r\nThe Monte Carlo process for computing pi is fairly simple, consisting of three primary steps:\r\n<ol>\r\n	<li>Generate a series of random (x,y) pairs from within the <a href=\"http://en.wikipedia.org/wiki/Unit_square\">unit square</a></li>\r\n	<li>Determine which of these samples reside within the <a href=\"http://en.wikipedia.org/wiki/Unit_circle\">unit circle</a></li>\r\n	<li>Compute the ratio of the samples that reside within the square to those which reside within the circle and then multiply by four (to account for this being only one quadrant of a circle).</li>\r\n</ol>\r\nThere is a great visualization of this process and a demonstration of how the <a href=\"http://commons.wikimedia.org/wiki/File:Pi_30K.gif\">number of samples impacts the Pi estimate on wikipedia</a>.\r\n\r\nIf you were to implement this in C/C++, your code might look like this:\r\n<pre class=\"lang:default decode:true\" title=\"Sample CPU code for Monte Carlo Pi estimation\">...\r\n\r\nint count = 0;\r\nfloat x, y;\r\nvector&lt;float&gt; randomNums(2*samples);\r\n\r\n// init random numbers within the unit square.\r\n// Pack as (x,y) pairs\r\nfor(int i = 0; i &lt; 2*samples; i++)	{\r\n	randomNums[i] = float(rand()) / RAND_MAX;\r\n}\r\n\r\n// count how many samples reside in the circle\r\nfor(int i = 0; i &lt; samples; i++)\r\n{\r\n	x = randomNums[2*i];\r\n	y = randomNums[2*i + 1];\r\n\r\n	if(x*x + y*y &lt; 1.0)\r\n		count++;\r\n}\r\n\r\n// calculate the estimate and print the result\r\nfloat pi_estimate = 4 * float(count) / samples;\r\n\r\n...</pre>\r\n<h3>Benchmark methods</h3>\r\nWe implemented four different versions of the Pi problem with small changes in the implementation which test various aspects of the hardware and software. These five implementations are:\r\n<ol>\r\n	<li>Single core CPU - A direct implementation of the code listing above</li>\r\n	<li>A naive port of the CPU code to the GPU with no optimizations. Region testing is performed on the GPU and the result is summed on the CPU</li>\r\n	<li>An effort to reduce the workload of the CPU by partially summing the region testing results on the GPU</li>\r\n	<li>A classic GPU optimization using coalesced memory load/stores</li>\r\n	<li>And a final integrated-device specific optimization that uses <a href=\"http://sandbox.arrayfire.com/zero-copy-on-integrated-gpus/\">zero-copy memory buffers</a></li>\r\n</ol>\r\nFor these tests we used a few-year old ASUS N56V laptop we had in the office which features an Intel i7-3610QM CPU with a HD Graphics 4000 GT2 GPU. This particular GPU has 16 execution units which can host up to 128 concurrent threads. We installed Window 7 (Intel OpenCL GPU driver 10.18.10.395; Intel OpenCL CPU drivers 5.1.0.25) and Ubuntu 14.10 (GPU driver Beignet 1.1 from git acfc2a2 and CPU driver \"Build 92\"). In future blog posts we will cover 4th and 5th generation hardware (including Iris pro).\r\n<h3>Results and discussion</h3>\r\nOn Linux a single core CPU took <span data-sheets-value=\"[null,3,null,31583]\" data-sheets-userformat=\"[null,null,513,[null,0],null,null,null,null,null,null,null,null,0]\">31.583 ms to execute on a sample size of 20 million sample points. Interestingly, the same code on Windows too over 66 ms to execute on the same sample size (in release mode, with /02 and high power settings selected). This curious result isn\'t particularly important as the OpenCL performance on the CPU does not appear to be degraded between operating systems.</span>\r\n\r\nBelow we plot the speed up of our OpenCL kernels relative to the performance of the Linux single core CPU result above for both the i7-3610QM CPU and HD Graphics 4000 GPU.\r\n\r\n<iframe width=\"694\" height=\"371\" seamless=\"\" frameborder=\"0\" scrolling=\"no\" src=\"https://docs.google.com/spreadsheets/d/1vMeMPs4d78wsbURINCKmAFDFBwIFzpAl438Q-geoeNs/pubchart?oid=2103791532&amp;format=interactive\"></iframe>\r\n\r\nWe see that the naive port of the CPU code directly to OpenCL is slower than the pure CPU implementation by a factor of four. This result is not terribly surprising once you consider the poorly conceived implementation encounters a full O(N) cost for data transfer and summing region test result for the 20 million sample points.\r\n\r\nThe OCL reduction kernel offloads some of the CPU\'s work by partially summing the region detection results on the GPU. This tweak increased the performance of the kernel between 4x (for the OpenCL on the GPU) to 10x (for OpenCL on the CPU). Curiously, the CPU kernels on Ubuntu and Windows perform very well, achieving speed-ups of about 3x the CPU. This is still below the theoretical 4x speed improvement one would expect on this quad-core CPU namely due to thread management and poor memory access patterns.\r\n\r\nLastly we will discuss the coalesced memory and zero copy kernels. The optimization here involves changing the memory access pattern from using strieded memory access:\r\n<pre class=\"lang:default decode:true\" title=\"Sample CPU code for Monte Carlo Pi estimation\">x = randomNums[2*i];\r\ny = randomNums[2*i + 1];</pre>\r\nto using OpenCL\'s float2 data type to access sequential elements, thus improving utilization of the memory bus. This technique improved throughput by 2.2x on Ubuntu and 3.25x on Windows. This makes the GPU about twice as fast as our initial CPU implementation. We see little to no acceleration in using zero copy buffers for this problem because the problem size for the final CPU sum is quite small (on the order of 1000 elements).\r\n<h3>Conclusion and a preview of the next post</h3>\r\nFor the Monte Carlo Pi problem, it appears Ubuntu and Beignet achieve slightly better performance than the current Windows Intel HD Graphics OpenCL drivers; however, given the limited number of trials performed (and lack of statistical error bars) we may conservatively state that the two OpenCL implementations perform similarly on the same hardware.\r\n\r\nWe found that using OpenCL on the GPU achieves better acceleration than OpenCL on the CPU in general. In one of our kernels, OpenCL on the i7-3610QM CPU was slightly faster than on the GPU, but this is probably due to automatic vectorization in the CPU OpenCL backend for this particular kernel.\r\n\r\nIn our next post we will compare the performance of OpenCL on 3rd, 4th, and 5th generation Intel processors using both memory and compute-bound kernels.','Intel OpenCL performance: 3rd generation hardware','','inherit','open','closed','','8124-revision-v1','','','2015-05-05 16:57:05','2015-05-05 16:57:05','',8124,'http://sandbox.arrayfire.com/8124-revision-v1/',0,'revision','',0),(8229,7,'2015-05-05 20:21:49','2015-05-05 20:21:49','','Button scribbles-01','','inherit','open','closed','','button-scribbles-01','','','2015-05-05 20:21:49','2015-05-05 20:21:49','',0,'http://sandbox.arrayfire.com/wp-content/uploads/2015/05/Button-scribbles-01.png',0,'attachment','image/png',0),(8232,7,'2015-05-05 20:23:55','2015-05-05 20:23:55','','Button scribbles-02-01','','inherit','open','closed','','button-scribbles-02-01','','','2015-05-05 20:23:55','2015-05-05 20:23:55','',0,'http://sandbox.arrayfire.com/wp-content/uploads/2015/05/Button-scribbles-02-01.png',0,'attachment','image/png',0),(8240,7,'2015-05-07 14:50:04','2015-05-07 14:50:04','[content_band inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"40px\" padding_bottom=\"40px\"][column type=\"two-fifths\"]\r\n\r\n[custom_headline type=\"left\" level=\"h3\"]If you want faster code, you\'ve come to the right place.[/custom_headline][gap size=\"3%\"]<img class=\"aligncenter wp-image-8232 size-medium\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/05/Button-scribbles-02-01-300x43.png\" alt=\"Button scribbles-02-01\" width=\"300\" height=\"43\" />[button  type=\"flat\" shape=\"rounded\" href=\"http://sandbox.arrayfire.com/download\" size=\"x-large\" block=\"true\"]Download ArrayFire[/button]\r\n\r\n[gap size=\"5%\"]\r\n\r\n[button  type=\"flat\" block=\"true\" shape=\"rounded\" href=\"http://sandbox.arrayfire.com/consulting/\" size=\"x-large\" ]Schedule a consultation[/button][gap size=\"2%\"]<img class=\"aligncenter size-full wp-image-8229\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/05/Button-scribbles-01.png\" alt=\"Button scribbles-01\" width=\"976\" height=\"117\" />\r\n\r\n[/column][column type=\"three-fifths\" last=\"true\"][gap size=\"7%\"]\r\n<div id=\"wistia_rj2bar3xxp\" class=\"wistia_embed\" style=\"width: 640px; height: 388px;\"></div>\r\n<script src=\"//fast.wistia.com/assets/external/E-v1.js\" charset=\"ISO-8859-1\"></script><script>// <![CDATA[\r\nwistiaEmbed = Wistia.embed(\"rj2bar3xxp\");\r\n// ]]></script>\r\n[/column]\r\n<div id=\"arrayfire\"></div>\r\n[/content_band]\r\n\r\n[content_band bg_color=\"#f2f2f2\" inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"40px\" padding_bottom=\"40px\"]\r\n\r\n[column type=\"one-third\" ][custom_headline type=\"left\" level=\"h3\" class=\"center-text\"][image src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/car-e1412967813807.png\" class=\"mbn\"] Faster Code[/custom_headline][line style=\"border-top: solid #999999;\"]ArrayFire is a blazing fast software library for GPU computing. Its easy-to-use API and array-based function set make GPU programming simple. A few lines of code in ArrayFire can replace dozens of lines of raw GPU code, saving you valuable time and lowering development costs.[/column]\r\n\r\n[column type=\"one-third\" ][custom_headline type=\"left\" level=\"h3\" class=\"center-text\"][image src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/09/mini-motorcycle-01-e1412969290876.png\" class=\"mbn\"] Hardware Neutral[/custom_headline][line style=\"border-top: solid #999999;\"]ArrayFire supports both CUDA-capable NVIDIA GPUs and most OpenCL devices, including AMD GPUs/APUs and Intel Xeon Phi co-processors. It also supports mobile OpenCL devices from ARM, Qualcomm, and others. We want your code to run as fast as possible, regardless of the hardware.[/column]\r\n\r\n[column type=\"one-third\" last=\"true\" ][custom_headline type=\"left\" level=\"h3\" class=\"center-text\"][image src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/09/mini-plane-01-e1412969527633.png\" class=\"mbn\"] Open Source[/custom_headline][line style=\"border-top: solid #999999;\"]ArrayFire is open source—it\'s all there and it\'s all free. Be sure to check out all of the ArrayFire functions (and a lot more!) in our excellent <a href=\"http://www.sandbox.arrayfire.com/docs/index.htm\">documentation</a>. And don\'t forget to visit our <a href=\"http://sandbox.arrayfire.com/forums/\">forums</a> to connect with the ArrayFire community and pick up acceleration tips and innovative best practices.[/column]\r\n<p style=\"text-align: center;\">[column type=\"one-third\" class=\"center-text\"][button  type=\"flat\" shape=\"rounded\" size=\"regular\" href=\"http://www.sandbox.arrayfire.com/docs/examples.htm\"]See some examples[/button][/column]</p>\r\n<p style=\"text-align: center;\">[column type=\"one-third\" class=\"center-text\"][button type=\"flat\" shape=\"rounded\" size=\"regular\" href=\"http://www.sandbox.arrayfire.com/download\"]Download ArrayFire[/button][/column]</p>\r\n<p style=\"text-align: center;\">[column type=\"one-third\" class=\"center-text\" last=\"true\"][button type=\"flat\" shape=\"rounded\" size=\"regular\" href=\"http://www.sandbox.arrayfire.com/docs/index.htm\"]View the documentation[/button][/column][gap size=\"3%\"][/content_band]</p>\r\n\r\n<div>\r\n\r\n[content_band inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"40px\" padding_bottom=\"40px\"][gap size=5%]\r\n<h3 style=\"text-align: center;\">Join the ArrayFire community</h3>\r\n&nbsp;\r\n<p style=\"text-align: center;\">[button  type=\"flat\" shape=\"rounded\" href=\"http://sandbox.arrayfire.com/download\" size=\"normal\" ]                    Get started                    [/button]</p>\r\n[/content_band]\r\n\r\n</div>','Home','','inherit','open','closed','','245-revision-v1','','','2015-05-07 14:50:04','2015-05-07 14:50:04','',245,'http://sandbox.arrayfire.com/245-revision-v1/',0,'revision','',0),(8244,7,'2015-05-15 19:06:27','2015-05-15 19:06:27','','sd_accel','','inherit','open','closed','','sd_accel','','','2015-05-15 19:06:27','2015-05-15 19:06:27','',0,'http://sandbox.arrayfire.com/wp-content/uploads/2015/05/sd_accel.png',0,'attachment','image/png',0),(8245,7,'2015-05-15 19:06:38','2015-05-15 19:06:38','','xilinx_alliance','','inherit','open','closed','','xilinx_alliance','','','2015-05-15 19:06:38','2015-05-15 19:06:38','',0,'http://sandbox.arrayfire.com/wp-content/uploads/2015/05/xilinx_alliance.png',0,'attachment','image/png',0),(8288,7,'2015-05-15 20:04:24','2015-05-15 20:04:24','[content_band inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"40px\" padding_bottom=\"40px\"][column type=\"one-half\"]\r\n\r\n[gap size=\"5%\"][custom_headline type=\"left\" level=\"h2\" class=\"mtn\"]Partner Program[/custom_headline]\r\n\r\nThe Partner Program is designed to promote the development and sale of products and services to maximize the productivity of scientists, analysts, and engineers working on technical computing problems that can leverage GPU technology. As our partner, you benefit from a tight working relationship with ArrayFire staff and our other partners, while your customers benefit from the integration of your products and solutions with ArrayFire.\r\n\r\nThe ArrayFire Partner Program is built upon the belief that the purpose of a viable partnership includes a market opportunity, a joint product or service which matches that opportunity, and a strategy to market, sell, and support the joint offering. Therefore, ArrayFire includes programs and activities centered around technical and go-to-market resources that allow the partnership to work hand in hand to develop the solution and properly communicate the solution value into the market while providing the highest level of customer satisfaction.[/column][column type=\"one-half\" last=\"true\"][gap size=\"5%\"]<img class=\"aligncenter  wp-image-5018\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/hq-vehicles-972x1024.png\" alt=\"hq vehicles\" width=\"450\" height=\"473\" />[/column][/content_band]\r\n\r\n[content_band bg_color=\"#f2f2f2\" inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"40px\" padding_bottom=\"40px\"][column type=\"one-half\"][gap size=\"22%\"]<img class=\"aligncenter size-large wp-image-8245\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/05/xilinx_alliance-1024x332.png\" alt=\"xilinx_alliance\" width=\"742\" height=\"241\" />[/column][column type=\"one-half\" last=\"true\"]\r\n\r\n[custom_headline type=\"left\" level=\"h2\"]Xilinx[/custom_headline]\r\n\r\nThe SDAccel™ Development Environment is a member of the Xilinx SDx™ family that combines the industry’s first architecturally optimizing compiler supporting any combination of OpenCL™, C, and C++ kernels, along with libraries and development boards for the first complete CPU/GPU-like development and run-time experience for FPGAs.\r\n\r\nArrayFire is an SDAccel-certified Xilinx Alliance Member.\r\n\r\nTo access the capabilities of SDAccel contact your local <a href=\"http://www.xilinx.com/about/contact.html\" target=\"_blank\">Xilinx sales representative or Xilinx authorized distributor</a>. To learn more visit <a href=\"http://www.xilinx.com/sdaccel\" target=\"_blank\">www.xilinx.com/sdaccel</a>. [gap size=\"8%\"]\r\n\r\n[/column]\r\n\r\n[/content_band][content_band inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"40px\" padding_bottom=\"40px\"][column type=\"one-half\"]\r\n\r\n[custom_headline type=\"left\" level=\"h2\"]NVIDIA[/custom_headline]\r\n\r\n<span style=\"line-height: 1.5;\"><a href=\"http://www.nvidia.com/object/cuda_home.html\">NVIDIA</a> makes CUDA-capable GPUs. It serves the high performance computing market with its Tesla™ GPUs.[gap size=\"8%\"]</span>\r\n\r\n[/column][column type=\"one-half\" last=\"true\"][gap size=\"10%\"]\r\n\r\n<img class=\"aligncenter wp-image-7071 \" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/11/lbg_nvidia1-1024x193.png\" alt=\"\" width=\"742\" height=\"140\" />[/column]\r\n\r\n[/content_band]\r\n\r\n[content_band bg_color=\"#f2f2f2\" inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"40px\" padding_bottom=\"40px\"][column type=\"one-half\"][gap size=\"10%\"]<img class=\"aligncenter wp-image-4993 \" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/amd_logo_low_res.png\" alt=\"\" width=\"747\" height=\"178\" />[/column][column type=\"one-half\" last=\"true\"]\r\n\r\n[custom_headline type=\"left\" level=\"h2\"]AMD[/custom_headline]\r\n\r\n<span style=\"line-height: 1.5;\"><a href=\"http://developer.amd.com/\">AMD</a> makes OpenCL-capable devices. It serves the high performance computing market with its Opteron™ CPUs &amp; APUs as well as its Radeon™ FirePro™ GPUs.[gap size=\"8%\"]</span>\r\n\r\n[/column]\r\n\r\n[/content_band]\r\n\r\n[content_band inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"40px\" padding_bottom=\"40px\"][column type=\"one-half\"]\r\n\r\n[custom_headline type=\"left\" level=\"h2\"]Intel[/custom_headline]\r\n\r\n<span style=\"line-height: 1.5;\"><a href=\"http://www.intel.com/content/www/us/en/high-performance-computing/high-performance-xeon-phi-coprocessor-brief.html\">Intel</a> makes OpenCL-capable devices. It serves the high performance computing market with its Intel® Xeon™ CPUs (and integrated GPUs) and Intel® Xeon Phi™ coprocessor.[gap size=\"8%\"]</span>\r\n\r\n[/column][column type=\"one-half\" last=\"true\"]\r\n<img class=\"aligncenter wp-image-5003 size-full\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/Intel_Logo_Capture.png\" alt=\"\" width=\"371\" height=\"265\" />[/column][/content_band]','Partner Program','','inherit','open','closed','','187-revision-v1','','','2015-05-15 20:04:24','2015-05-15 20:04:24','',187,'http://sandbox.arrayfire.com/187-revision-v1/',0,'revision','',0),(8290,7,'2015-05-15 20:54:45','2015-05-15 20:54:45','','Partners','','publish','open','closed','','8290','','','2018-08-22 21:35:30','2018-08-23 01:35:30','',0,'http://sandbox.arrayfire.com/?p=8290',9,'nav_menu_item','',0),(8291,7,'2015-06-02 17:41:00','2015-06-02 17:41:00','Today we are pleased to announce the release of <a href=\"http://sandbox.arrayfire.com/\">ArrayFire v3.0</a>. This new version features major changes to ArrayFire’s visualization library, a new CPU backend, and dense linear algebra for OpenCL devices. It also includes improvements across the board for ArrayFire’s OpenCL backend. A complete list ArrayFire v3.0 updates and new features can be found in the product <a href=\"http://sandbox.arrayfire.com/docs/releasenotes.htm\">Release Notes</a>.\r\n\r\nWith over 8 years of continuous development, the open source ArrayFire library is the top CUDA and OpenCL software library. ArrayFire supports CUDA-capable GPUs, OpenCL devices, and other accelerators. With its easy-to-use API, this hardware-neutral software library is designed for maximum speed without the hassle of writing time-consuming CUDA and OpenCL device code. With ArrayFire’s library functions, developers can maximize productivity and performance. Each of ArrayFire’s functions has been hand-tuned by CUDA and OpenCL experts.\r\n\r\n<b>Major updates and new features</b>\r\n<ul>\r\n	<li>Major changes to the visualization library</li>\r\n	<li>Introducing handle based C API</li>\r\n	<li>New backend: CPU fallback available for systems without GPUs</li>\r\n	<li>Dense linear algebra functions available for all backends</li>\r\n	<li>Support for 64 bit integers</li>\r\n</ul>\r\n<b>New functions added in the following categories</b>\r\n<ul>\r\n	<li>Data generation</li>\r\n	<li>Computer Vision</li>\r\n	<li>Image Processing</li>\r\n	<li>Linear Algebra</li>\r\n	<li>Visualization</li>\r\n</ul>\r\n<strong>Benefits of the binary installers​</strong>\r\n\r\nWe\'re now using MKL in our installers to speed up CPU and OpenCL backends. The CUDA backend is compiled to be optimized for each CUDA architecture, making it more portable. By default, building the open source version compiles only for the GPUs present in the system.\r\n\r\n<strong>What people are saying</strong>\r\n\r\nKent Knox, Senior Member of Technical Staff from AMD, says:\r\n<blockquote>Arrayfire is a model example of how open sourcing scientific libraries should work. They have made their own code open to the public for review by the community at large, and they build upon existing open source math libraries to improve their own. With their investment in robust automation, they enhance the correctness and performance of the overall scientific ecosystem.</blockquote>\r\nJason Ramapuram, a machine learning engineer, says:\r\n<blockquote>ArrayFire has provided an elegant and simple solution for deploying GPU based machine learning applications. Being able to implement neural networks and auto encoders without delving into the any CUDA/OpenCL/BLAS details has been immensely helpful for research purposes. All of this is bundled in a brilliant open source package with an amazingly helpful team that is very open to implementing and resolving an issues that arise.</blockquote>\r\n<b>Availability</b>\r\n\r\nVisit ArrayFire’s website to download <a href=\"http://sandbox.arrayfire.com/download/\">ArrayFire v3.0 Installers</a> or GitHub account page to <a href=\"https://github.com/arrayfire/arrayfire\">download</a> and build the source code. The ArrayFire software library operates under the BSD 3-Clause License which enables unencumbered deployment and portability of ArrayFire for all uses, including commercially.\r\n\r\n<b>Dedicated support and coding services</b>\r\n\r\nArrayFire offers dedicated <a href=\"http://sandbox.arrayfire.com/?page_id=6648\">support packages</a> for ArrayFire users.\r\n\r\nArrayFire serves many clients through consulting and <a href=\"http://sandbox.arrayfire.com/consulting/\">coding services</a>, algorithm development, porting code, and training courses for developers.','ArrayFire v3.0 is here!','','publish','open','closed','','arrayfire-v3-0-is-here','','','2015-06-02 17:41:00','2015-06-02 17:41:00','',0,'http://sandbox.arrayfire.com/?p=8291',0,'post','',5),(8292,7,'2015-05-19 13:17:49','2015-05-19 13:17:49','Today we announce the release of <a href=\"http://sandbox.arrayfire.com/\">ArrayFire v3.0</a>. This new version features major changes to ArrayFire’s visualization library, a new CPU backend, and dense linear algebra for OpenCL devices. It also includes improvements across the board for ArrayFire’s OpenCL backend. A complete list ArrayFire v3.0 updates and new features can be found in the product <a href=\"http://sandbox.arrayfire.com/docs/releasenotes.htm\">Release Notes</a>.\r\n\r\nWith over 8 years of continuous development, the open source ArrayFire library is the top CUDA and OpenCL software library. ArrayFire supports CUDA-capable GPUs, OpenCL devices, and other accelerators. With its easy-to-use API, this hardware-neutral software library is designed for maximum speed without the hassle of writing time-consuming CUDA and OpenCL device code. With ArrayFire’s library functions, developers can maximize productivity and performance. Each of ArrayFire’s functions has been hand-tuned by CUDA and OpenCL experts.\r\n\r\n&nbsp;\r\n\r\n<b>Major Updates and New Features</b>\r\n<ul>\r\n	<li>Major changes to the visualization library</li>\r\n	<li>Introducing handle based C API</li>\r\n	<li>New backend: CPU fallback available for systems without GPUs</li>\r\n	<li>Dense linear algebra functions available for all backends</li>\r\n	<li>Support for 64 bit integers</li>\r\n</ul>\r\n&nbsp;\r\n\r\n<b>New functions added in the following categories</b>\r\n<ul>\r\n	<li>Data generation</li>\r\n	<li>Computer Vision</li>\r\n	<li>Image Processing</li>\r\n	<li>Linear Algebra</li>\r\n	<li>Visualization</li>\r\n</ul>\r\n<b>Availability</b>\r\n\r\n&nbsp;\r\n\r\nVisit ArrayFire’s website to download <a href=\"http://sandbox.arrayfire.com/download/\">ArrayFire v3.0 Installers</a> or GitHub account page to <a href=\"https://github.com/arrayfire/arrayfire\">download</a> and build the source code. The ArrayFire software library operates under the BSD 3-Clause License which enables unencumbered deployment and portability of ArrayFire for all uses, including commercially.\r\n\r\n&nbsp;\r\n\r\n<b>Dedicated Support and Coding Services</b>\r\n\r\nArrayFire offers dedicated <a href=\"http://sandbox.arrayfire.com/?page_id=6648\">support packages</a> for ArrayFire users.\r\n\r\nArrayFire serves many clients through consulting and <a href=\"http://sandbox.arrayfire.com/consulting/\">coding services</a>, algorithm development, porting code, and training courses for developers.\r\n\r\n&nbsp;','ArrayFire v3.0 is here!','','inherit','open','closed','','8291-revision-v1','','','2015-05-19 13:17:49','2015-05-19 13:17:49','',8291,'http://sandbox.arrayfire.com/8291-revision-v1/',0,'revision','',0),(8293,7,'2015-05-19 13:18:38','2015-05-19 13:18:38','Today we announce the release of <a href=\"http://sandbox.arrayfire.com/\">ArrayFire v3.0</a>. This new version features major changes to ArrayFire’s visualization library, a new CPU backend, and dense linear algebra for OpenCL devices. It also includes improvements across the board for ArrayFire’s OpenCL backend. A complete list ArrayFire v3.0 updates and new features can be found in the product <a href=\"http://sandbox.arrayfire.com/docs/releasenotes.htm\">Release Notes</a>.\r\n\r\nWith over 8 years of continuous development, the open source ArrayFire library is the top CUDA and OpenCL software library. ArrayFire supports CUDA-capable GPUs, OpenCL devices, and other accelerators. With its easy-to-use API, this hardware-neutral software library is designed for maximum speed without the hassle of writing time-consuming CUDA and OpenCL device code. With ArrayFire’s library functions, developers can maximize productivity and performance. Each of ArrayFire’s functions has been hand-tuned by CUDA and OpenCL experts.\r\n\r\n<b>Major Updates and New Features</b>\r\n<ul>\r\n	<li>Major changes to the visualization library</li>\r\n	<li>Introducing handle based C API</li>\r\n	<li>New backend: CPU fallback available for systems without GPUs</li>\r\n	<li>Dense linear algebra functions available for all backends</li>\r\n	<li>Support for 64 bit integers</li>\r\n</ul>\r\n<b>New functions added in the following categories</b>\r\n<ul>\r\n	<li>Data generation</li>\r\n	<li>Computer Vision</li>\r\n	<li>Image Processing</li>\r\n	<li>Linear Algebra</li>\r\n	<li>Visualization</li>\r\n</ul>\r\n<b>Availability</b>\r\n\r\nVisit ArrayFire’s website to download <a href=\"http://sandbox.arrayfire.com/download/\">ArrayFire v3.0 Installers</a> or GitHub account page to <a href=\"https://github.com/arrayfire/arrayfire\">download</a> and build the source code. The ArrayFire software library operates under the BSD 3-Clause License which enables unencumbered deployment and portability of ArrayFire for all uses, including commercially.\r\n\r\n<b>Dedicated Support and Coding Services</b>\r\n\r\nArrayFire offers dedicated <a href=\"http://sandbox.arrayfire.com/?page_id=6648\">support packages</a> for ArrayFire users.\r\n\r\nArrayFire serves many clients through consulting and <a href=\"http://sandbox.arrayfire.com/consulting/\">coding services</a>, algorithm development, porting code, and training courses for developers.\r\n\r\n&nbsp;','ArrayFire v3.0 is here!','','inherit','open','closed','','8291-revision-v1','','','2015-05-19 13:18:38','2015-05-19 13:18:38','',8291,'http://sandbox.arrayfire.com/8291-revision-v1/',0,'revision','',0),(8296,7,'2015-05-21 14:49:52','2015-05-21 14:49:52','[content_band inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"10px\" padding_bottom=\"40px\"][column type=\"one-half\"][custom_headline type=\"left\" level=\"h2\"]Call the ArrayFire team[/custom_headline]\r\n\r\nHire us to accelerate your code, train your pros, or even write new code for your organization!\r\n\r\nWe’ve already helped thousands of organizations speed up their code. We’ve accelerated algorithms,  sped up data sets, and solved challenging problems of all types in the past, and we’re confident that we can accelerate your code, too.\r\n\r\nStart by setting up a free consultation to discuss your project with an ArrayFire expert today!\r\n\r\n[gap size=\"5%\"][button  type=\"flat\" shape=\"rounded\" href=\"http://meetme.so/arrayfire\" size=\"normal\" ]Schedule a consultation[/button][/column][column type=\"one-half\" last=\"true\" class=\"center-text\"][gap size=\"15%\"]<img class=\"aligncenter wp-image-462\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/Bat-signal.png\" alt=\"Bat signal\" width=\"700\" height=\"437\" />[/column][gap size=\"2%\"][/content_band][content_band bg_image=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/11/Epipheo-background1.png\" parallax=\"true\" inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"40px\" padding_bottom=\"40px\"][gap size=\"2%\"]\r\n<p style=\"text-align: left;\">[column type=\"one-third\" ][/column]</p>\r\n<p style=\"text-align: left;\">[column type=\"one-third\"][promo image=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/10/glasses-logo-promo-01.png\" alt=\"Glasses.com\"]The Glasses.com app relies on computer vision to recognize the features of a user’s face. The application then generates an accurate, high-fidelity, three-dimensional model of that face, and virtually places selected frames on the image.</p>\r\n<p style=\"text-align: center;\">[button type=\"flat\" shape=\"rounded\" href=\"http://sandbox.arrayfire.com/case-study-glasses-com-app-with-3dfit-technology/\" size=\"regular\" ]Read the case study[/button][/promo][/column]</p>\r\n<p style=\"text-align: left;\">[column type=\"one-third\" last=\"true\"][promo image=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/10/reveal-logo-promo-01.png\" alt=\"Reveal Imaging\"]Reveal Imaging, an SAIC company, uses ArrayFire in developing threat-detection products for transportation systems—such as cargo and baggage screening in airports—and in securing facilities and public events.</p>\r\n<p style=\"text-align: center;\">[button type=\"flat\" shape=\"rounded\" href=\"http://sandbox.arrayfire.com/case-study-reveal-imaging/\" size=\"regular\" ]Read the case study[/button][/promo][/column]</p>\r\n\r\n<div id=\"starter\"></div>\r\n[/content_band]\r\n\r\n[content_band bg_color=\"#f2f2f2\" inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"10px\" padding_bottom=\"40px\"]\r\n\r\n[column type=\"one-half\"] [custom_headline type=\"left\" level=\"h2\"]Starter Package ($799) [/custom_headline] Hire us for a single day. We\'ll match you with one engineer dedicated for a full day, supported by senior and test engineers throughout the day. Here\'s how it works:\r\n\r\n[icon_list] [icon_list_item type=\"angle-double-right\"]We conduct an initial phone call.[/icon_list_item] [icon_list_item type=\"angle-double-right\"]You send us your code or algorithm. [/icon_list_item] [icon_list_item type=\"angle-double-right\"]We analyze your code for potential GPU benefit.[/icon_list_item][icon_list_item type=\"angle-double-right\"]We accelerate as much of your code as is possible within the one-day effort, applying our extensive GPU software libraries.[/icon_list_item][icon_list_item type=\"angle-double-right\"]We produce a final report for you, along with your optimized code.[/icon_list_item] [/icon_list] The final report outlines the best approach to follow for full GPU-acceleration of your code.\r\n\r\n[button type=\"flat\"  shape=\"rounded\" size=\"regular\" href=\"http://sandbox.arrayfire.com/product-category/starter-package/\" title=\"Starter Package\"]Get the Starter Package[/button]\r\n\r\n&nbsp;\r\n\r\n[/column][column type=\"one-half\" last=\"true\" ][gap size=\"15%\"]<img class=\"aligncenter wp-image-4962\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/02/Benchmark-guy-torso-opposite.png\" alt=\"Benchmark guy, torso opposite\" width=\"450\" height=\"397\" />[/column]\r\n<div></div>\r\n[/content_band]\r\n\r\n[content_band inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"10px\" padding_bottom=\"40px\" ]\r\n\r\n[column type=\"one-half\"]\r\n\r\n&nbsp;\r\n\r\n[gap size=\"12%\"]\r\n\r\n<img class=\"aligncenter size-large wp-image-5100\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/Triumvirate_Exported-1024x599.png\" alt=\"Triumvirate_Exported\" width=\"742\" height=\"434\" />[/column]\r\n\r\n[column type=\"one-half\"  last=\"true\" ]\r\n\r\n[custom_headline type=\"left\" level=\"h2\" ]Custom coding[/custom_headline]\r\n\r\nYour hardware can do anything, given the right code. Getting that code right can be tricky when your team is swamped in work or when you\'re new to parallel programming. Bring us in—our team is capable of writing custom code that\'s as unique as your work and tailored to your task. Here\'s what we bring to the table:\r\n\r\n[icon_list] [icon_list_item type=\"angle-double-right\"]Excellence in GPU code[/icon_list_item] [icon_list_item type=\"angle-double-right\"]Well-written, efficient C, C++, Fortran, Java, or .NET [/icon_list_item] [icon_list_item type=\"angle-double-right\"]Application porting and integration[/icon_list_item][icon_list_item type=\"angle-double-right\"]Tuning software to peak hardware performance[/icon_list_item][icon_list_item type=\"angle-double-right\"]Scalability of algorithms to handle enterprise-level programs[/icon_list_item] [/icon_list][button  type=\"flat\" shape=\"rounded\" href=\"http://meetme.so/arrayfire\" size=\"regular\" ]Schedule a consultation[/button][/column] [/content_band]','Consulting','','inherit','open','closed','','6634-revision-v1','','','2015-05-21 14:49:52','2015-05-21 14:49:52','',6634,'http://sandbox.arrayfire.com/6634-revision-v1/',0,'revision','',0),(8299,18528,'2015-05-26 19:52:41','2015-05-26 19:52:41','A few weeks ago we added some computer vision functionality to our open source <a href=\"http://sandbox.arrayfire.com/download\">ArrayFire GPU computing</a> library. Specifically, we implemented the <a href=\"http://www.springerlink.com/index/10.1007/11744023\">FAST</a> feature extractor, <a href=\"http://www.springerlink.com/index/10.1007/978-3-642-15561-1\">BRIEF</a> feature point descriptor, <a href=\"http://ieeexplore.ieee.org/lpdocs/epic03/wrapper.htm?arnumber=6126544\">ORB</a> multi-resolution scale invariant feature extractor, and a <a href=\"http://en.wikipedia.org/wiki/Hamming_distance\">Hamming distance</a> function. When combined, these functions enable you to find features in videos (or images) and track them between successive frames.\r\n\r\n<!--more-->\r\n<h4>FAST and ORB in ArrayFire: a demonstration</h4>\r\nHere is a quick video showing these functions executing on a few frames from the <a href=\"http://www.blender.org/\">Blender Foundation</a>\'s <a href=\"http://www.bigbuckbunny.org\">Big Buck Bunny</a> video:\r\n\r\n<iframe width=\"854\" height=\"510\" src=\"https://www.youtube.com/embed/sHHvORwgFQ4\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"></iframe>\r\n<h4>Using FAST and ORB</h4>\r\nNow that you have seen the functionality in action, how do you use these in your code? Assuming that you have a suitable function that can load your video frames in to ArrayFire \"array\" objects, it\'s pretty simple. To use FAST simply call the fast function:\r\n<pre>// Run FAST on a frame and get the features:\r\naf::features fast_features = af::fast(frame, 20, 9, 1, 0.05f);\r\n</pre>\r\nThe `af::features` object is a special structure which contains the `(x,y)` location of the features, their scores, and the number of features. To get access to this information simply use the `getX()`, `getY()`, `getScore()`, and `getNumFeatures()` functions:\r\n<pre>af::array x_pos = fast_features.getX();\r\naf::array y_pos = fast_features.getY();\r\naf::array scores = fast_features.getScore();\r\nint N = fast_features.getNumFeatures();\r\n</pre>\r\nORB has a slightly different syntax:\r\n<pre>// Run ORB on a frame and get the features and descriptors\r\naf::features orb_features;\r\naf::array orb_descriptors;\r\naf::orb(orb_features, orb_descriptors, frame, 20, 1000, 1.2, 1, false);\r\n</pre>\r\nThe features from `ORB` may be accessed in the same fashion as `FAST` described above. The `orb_descriptors` variable is a Nx8 array containing extracted descriptors (read the <a href=\"http://ieeexplore.ieee.org/lpdocs/epic03/wrapper.htm?arnumber=6126544\">ORB paper</a> for further details on this structure).\r\n\r\nThe Hamming matcher I mention in the video is almost ready to be committed to our upstream development branch, so it is also worth mentioning how it can be used. Assuming you have a list of features from two sources called `a_features` and `b_features` respectively, you can compute their Hamming distance using ArrayFire as follows:\r\n<pre>af::array idx;\r\naf::array distances;\r\naf::array a_features;\r\naf::array b_features;\r\naf::hamming_matcher(idx, distances, a_features, b_features, 0, 1);\r\n</pre>\r\nThen you may get the indicies of features whose distance is less than, say 50, using ArrayFire\'s `where` operator. After you have these inidices, you can pick out these near-matching features pretty easily:\r\n<pre class=\"\">// select features with distances less than 50:\r\naf::array near_matches = where(dist &lt; 50);\r\n// and now extract information about those features:\r\narray a_feat_x = a_features.getX()(near_matches)\r\narray a_feat_y = a_features.getY()(near_matches)\r\n...\r\n</pre>\r\nBecause these are ArrayFire array objects, they exist in your GPU\'s (or other accelerator device\'s) memory. To get access to them within your host code, you need to get a copy of the data and place it somewhere in RAM:\r\n<pre class=\"\">float * features_x = a_feat_x.host();\r\nfloat * features_y = a_feat_y.host();\r\n</pre>\r\nFor further information about ArrayFire\'s <a href=\"http://www.sandbox.arrayfire.com/docs/group__cv__func__fast.htm\">FAST</a> and <a href=\"http://www.sandbox.arrayfire.com/docs/group__cv__func__orb.htm\">ORB</a> implementations, please see the ArrayFire\'s <a href=\"http://sandbox.arrayfire.com/docs/group__cv__mat.htm\">computer vision function documentation</a>.\r\n<h4>Performance</h4>\r\nGiven how easy it is to use ArrayFire\'s computer vision code, the next question is \"how well does it perform?\" To answer this question we created a small benchmarking program which ran FAST and ORB on single frames from the Big Buck Bunny video on one of our machines with a NVIDIA K20 GPU using ArrayFire\'s and OpenCV\'s CUDA implementations.. To benchmark the algorithms, we loaded the data into RAM (or to the GPU) prior to executing the core algorithms. The video frames were in 320p, 480p, 1080p, and 4k resolution. The results of our benchmarks are below:\r\n\r\n<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/05/ArrayFire-vs-OpenCV-FAST.png\"><img class=\"aligncenter wp-image-8311 size-full\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/05/ArrayFire-vs-OpenCV-FAST-e1432668237331.png\" alt=\"ArrayFire-vs-OpenCV-FAST\" width=\"400\" height=\"319\" /></a>\r\n\r\nAbove you see the throughput (in images/second) as a function of image height (for 16:9 aspect video frames) for the FAST corner detection algorithm. ArrayFire\'s implementation of FAST is about 10% faster than OpenCV for all but 4k video frames.\r\n\r\n<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/05/ArrayFire-vs-OpenCV-FAST.png\"><img class=\"aligncenter wp-image-8312 size-full\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/05/ArrayFire-vs-OpenCV-ORB-e1432668305827.png\" alt=\"ArrayFire-vs-OpenCV-ORB\" width=\"400\" height=\"324\" /></a>\r\n\r\nSimilarly, ArrayFire\'s implementation of ORB is about 50% faster than OpenCV for all but the 4k video where ArrayFire falls slightly behind. We are presently exploring methods to improve ArrayFire\'s performance on the 4k video.','Feature detection and tracking using ArrayFire','','publish','open','closed','','feature-detection-and-tracking-using-arrayfire','','','2015-05-26 19:52:41','2015-05-26 19:52:41','',0,'http://sandbox.arrayfire.com/?p=8299',0,'post','',0),(8300,18528,'2015-05-26 18:29:53','2015-05-26 18:29:53','A few weeks ago we added some computer vision functionality to our open source <a href=\"http://sandbox.arrayfire.com/download\">ArrayFire GPU computing</a> library. Specifically, we implemented the <a href=\"http://www.springerlink.com/index/10.1007/11744023\">FAST</a> feature extractor, <a href=\"http://www.springerlink.com/index/10.1007/978-3-642-15561-1\">BRIEF</a> feature point descriptor, <a href=\"http://ieeexplore.ieee.org/lpdocs/epic03/wrapper.htm?arnumber=6126544\">ORB</a> multi-resolution scale invariant feature extractor, and a <a href=\"http://en.wikipedia.org/wiki/Hamming_distance\">Hamming distance</a> function. When combined, these functions enable you to find features in videos (or images) and track them between successive frames.\r\n\r\nHere is a quick video showing these functions executing on a few frames from the <a href=\"http://www.blender.org/\">Blender Foundation</a>\'s <a href=\"http://www.bigbuckbunny.org\">Big Buck Bunny</a> video:\r\n\r\n<iframe width=\"854\" height=\"510\" src=\"https://www.youtube.com/embed/sHHvORwgFQ4\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"></iframe>\r\n\r\nNow that you have seen the functionality in action, how do you use these in your code? Assuming that you have a suitable function that can load your video frames in to ArrayFire \"array\" objects, it\'s pretty simple:\r\n\r\n<code>\r\n// Run FAST on a frame and get the features:\r\naf::features fast_features = af::fast(frame, 20, 9, 1, 0.05f);\r\n</code>\r\n\r\nThe `af::features` object is a special structure which contains the `(x,y)` location of the features, their scores, and the number of features. To get access to this information simply use the `getX()`, `getY()`, `getScore()`, and `getNumFeatures()` functions:\r\n\r\n<code>\r\naf::array x_pos = fast_features.getX();\r\naf::array y_pos = fast_features.getY();\r\naf::array scores = fast_features.getScore();\r\nint N = fast_features.getNumFeatures();\r\n</code>\r\n\r\nORB has a slightly different syntax:\r\n\r\n<code>\r\n// Run ORB on a frame and get the features and descriptors\r\naf::features orb_features;\r\naf::array orb_descriptors;\r\naf::orb(orb_features, orb_descriptors, frame, 20, 1000, 1.2, 1, false);\r\n</code>\r\n\r\nThe features from `ORB` may be accessed in the same fashion as `FAST` described above. The `orb_descriptors` variable is a Nx8 array containing extracted descriptors (read the [ORB paper for further details](http://ieeexplore.ieee.org/lpdocs/epic03/wrapper.htm?arnumber=6126544)).\r\n\r\nThe Hamming matcher I mention in the video is almost ready to be committed to our upstream development branch, so it is also worth mentioning how it can be used. Assuming you have a list of features from two sources called `a_features` and `b_features` respectively, you can compute their Hamming distance using ArrayFire as follows:\r\n\r\n<code>\r\naf::array idx;\r\naf::array distances;\r\naf::array a_features;\r\naf::array b_features;\r\naf::hamming_matcher(idx, distances, a_features, b_features, 0, 1);\r\n</code>\r\n\r\nThen you may get the indicies of features whose distance is less than, say 50, using ArrayFire\'s `where` operator. After you have these inidices, you can pick out these near-matching features pretty easily:\r\n\r\n<code>\r\n// select features with distances less than 50:\r\naf::array near_matches = where(dist &lt; 50);\r\n// and now extract information about those features:\r\narray a_feat_x = a_features.getX()(near_matches)\r\narray a_feat_y = a_features.getY()(near_matches)\r\n...\r\n</code>\r\n\r\nBecause these are ArrayFire array objects, they exist in your GPU\'s (or other accelerator device\'s) memory. To get access to them within your host code, you need to get a copy of the data and place it somewhere in RAM:\r\n\r\n<code>\r\nfloat * features_x = a_feat_x.host<float>();\r\nfloat * features_y = a_feat_y.host<float>();\r\n</code>','New computer vision functionality','','inherit','open','closed','','8299-revision-v1','','','2015-05-26 18:29:53','2015-05-26 18:29:53','',8299,'http://sandbox.arrayfire.com/8299-revision-v1/',0,'revision','',0),(8301,18528,'2015-05-26 18:31:07','2015-05-26 18:31:07','A few weeks ago we added some computer vision functionality to our open source <a href=\"http://sandbox.arrayfire.com/download\">ArrayFire GPU computing</a> library. Specifically, we implemented the <a href=\"http://www.springerlink.com/index/10.1007/11744023\">FAST</a> feature extractor, <a href=\"http://www.springerlink.com/index/10.1007/978-3-642-15561-1\">BRIEF</a> feature point descriptor, <a href=\"http://ieeexplore.ieee.org/lpdocs/epic03/wrapper.htm?arnumber=6126544\">ORB</a> multi-resolution scale invariant feature extractor, and a <a href=\"http://en.wikipedia.org/wiki/Hamming_distance\">Hamming distance</a> function. When combined, these functions enable you to find features in videos (or images) and track them between successive frames.\r\n\r\nHere is a quick video showing these functions executing on a few frames from the <a href=\"http://www.blender.org/\">Blender Foundation</a>\'s <a href=\"http://www.bigbuckbunny.org\">Big Buck Bunny</a> video:\r\n\r\n<iframe width=\"854\" height=\"510\" src=\"https://www.youtube.com/embed/sHHvORwgFQ4\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"></iframe>\r\n\r\nNow that you have seen the functionality in action, how do you use these in your code? Assuming that you have a suitable function that can load your video frames in to ArrayFire \"array\" objects, it\'s pretty simple:\r\n\r\n<code>\r\n// Run FAST on a frame and get the features:\r\naf::features fast_features = af::fast(frame, 20, 9, 1, 0.05f);\r\n</code>\r\n\r\nThe `af::features` object is a special structure which contains the `(x,y)` location of the features, their scores, and the number of features. To get access to this information simply use the `getX()`, `getY()`, `getScore()`, and `getNumFeatures()` functions:\r\n\r\n<code>\r\naf::array x_pos = fast_features.getX();\r\naf::array y_pos = fast_features.getY();\r\naf::array scores = fast_features.getScore();\r\nint N = fast_features.getNumFeatures();\r\n</code>\r\n\r\nORB has a slightly different syntax:\r\n\r\n<code>\r\n// Run ORB on a frame and get the features and descriptors\r\naf::features orb_features;\r\naf::array orb_descriptors;\r\naf::orb(orb_features, orb_descriptors, frame, 20, 1000, 1.2, 1, false);\r\n</code>\r\n\r\nThe features from `ORB` may be accessed in the same fashion as `FAST` described above. The `orb_descriptors` variable is a Nx8 array containing extracted descriptors (read the <a href=\"http://ieeexplore.ieee.org/lpdocs/epic03/wrapper.htm?arnumber=6126544\">ORB paper</a> for further details on this structure).\r\n\r\nThe Hamming matcher I mention in the video is almost ready to be committed to our upstream development branch, so it is also worth mentioning how it can be used. Assuming you have a list of features from two sources called `a_features` and `b_features` respectively, you can compute their Hamming distance using ArrayFire as follows:\r\n\r\n<code>\r\naf::array idx;\r\naf::array distances;\r\naf::array a_features;\r\naf::array b_features;\r\naf::hamming_matcher(idx, distances, a_features, b_features, 0, 1);\r\n</code>\r\n\r\nThen you may get the indicies of features whose distance is less than, say 50, using ArrayFire\'s `where` operator. After you have these inidices, you can pick out these near-matching features pretty easily:\r\n\r\n<code>\r\n// select features with distances less than 50:\r\naf::array near_matches = where(dist &lt; 50);\r\n// and now extract information about those features:\r\narray a_feat_x = a_features.getX()(near_matches)\r\narray a_feat_y = a_features.getY()(near_matches)\r\n...\r\n</code>\r\n\r\nBecause these are ArrayFire array objects, they exist in your GPU\'s (or other accelerator device\'s) memory. To get access to them within your host code, you need to get a copy of the data and place it somewhere in RAM:\r\n\r\n<code>\r\nfloat * features_x = a_feat_x.host<float>();\r\nfloat * features_y = a_feat_y.host<float>();\r\n</code>','New computer vision functionality','','inherit','open','closed','','8299-revision-v1','','','2015-05-26 18:31:07','2015-05-26 18:31:07','',8299,'http://sandbox.arrayfire.com/8299-revision-v1/',0,'revision','',0),(8302,18528,'2015-05-26 18:31:31','2015-05-26 18:31:31','A few weeks ago we added some computer vision functionality to our open source <a href=\"http://sandbox.arrayfire.com/download\">ArrayFire GPU computing</a> library. Specifically, we implemented the <a href=\"http://www.springerlink.com/index/10.1007/11744023\">FAST</a> feature extractor, <a href=\"http://www.springerlink.com/index/10.1007/978-3-642-15561-1\">BRIEF</a> feature point descriptor, <a href=\"http://ieeexplore.ieee.org/lpdocs/epic03/wrapper.htm?arnumber=6126544\">ORB</a> multi-resolution scale invariant feature extractor, and a <a href=\"http://en.wikipedia.org/wiki/Hamming_distance\">Hamming distance</a> function. When combined, these functions enable you to find features in videos (or images) and track them between successive frames.\r\n\r\nHere is a quick video showing these functions executing on a few frames from the <a href=\"http://www.blender.org/\">Blender Foundation</a>\'s <a href=\"http://www.bigbuckbunny.org\">Big Buck Bunny</a> video:\r\n\r\n<iframe width=\"854\" height=\"510\" src=\"https://www.youtube.com/embed/sHHvORwgFQ4\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"></iframe>\r\n\r\nNow that you have seen the functionality in action, how do you use these in your code? Assuming that you have a suitable function that can load your video frames in to ArrayFire \"array\" objects, it\'s pretty simple:\r\n\r\n<code>// Run FAST on a frame and get the features:\r\naf::features fast_features = af::fast(frame, 20, 9, 1, 0.05f);\r\n</code>\r\n\r\nThe `af::features` object is a special structure which contains the `(x,y)` location of the features, their scores, and the number of features. To get access to this information simply use the `getX()`, `getY()`, `getScore()`, and `getNumFeatures()` functions:\r\n\r\n<code>af::array x_pos = fast_features.getX();\r\naf::array y_pos = fast_features.getY();\r\naf::array scores = fast_features.getScore();\r\nint N = fast_features.getNumFeatures();\r\n</code>\r\n\r\nORB has a slightly different syntax:\r\n\r\n<code>// Run ORB on a frame and get the features and descriptors\r\naf::features orb_features;\r\naf::array orb_descriptors;\r\naf::orb(orb_features, orb_descriptors, frame, 20, 1000, 1.2, 1, false);\r\n</code>\r\n\r\nThe features from `ORB` may be accessed in the same fashion as `FAST` described above. The `orb_descriptors` variable is a Nx8 array containing extracted descriptors (read the <a href=\"http://ieeexplore.ieee.org/lpdocs/epic03/wrapper.htm?arnumber=6126544\">ORB paper</a> for further details on this structure).\r\n\r\nThe Hamming matcher I mention in the video is almost ready to be committed to our upstream development branch, so it is also worth mentioning how it can be used. Assuming you have a list of features from two sources called `a_features` and `b_features` respectively, you can compute their Hamming distance using ArrayFire as follows:\r\n\r\n<code>af::array idx;\r\naf::array distances;\r\naf::array a_features;\r\naf::array b_features;\r\naf::hamming_matcher(idx, distances, a_features, b_features, 0, 1);\r\n</code>\r\n\r\nThen you may get the indicies of features whose distance is less than, say 50, using ArrayFire\'s `where` operator. After you have these inidices, you can pick out these near-matching features pretty easily:\r\n\r\n<code>// select features with distances less than 50:\r\naf::array near_matches = where(dist &lt; 50);\r\n// and now extract information about those features:\r\narray a_feat_x = a_features.getX()(near_matches)\r\narray a_feat_y = a_features.getY()(near_matches)\r\n...\r\n</code>\r\n\r\nBecause these are ArrayFire array objects, they exist in your GPU\'s (or other accelerator device\'s) memory. To get access to them within your host code, you need to get a copy of the data and place it somewhere in RAM:\r\n\r\n<code>float * features_x = a_feat_x.host<float>();\r\nfloat * features_y = a_feat_y.host<float>();\r\n</code>','New computer vision functionality','','inherit','open','closed','','8299-revision-v1','','','2015-05-26 18:31:31','2015-05-26 18:31:31','',8299,'http://sandbox.arrayfire.com/8299-revision-v1/',0,'revision','',0),(8303,18528,'2015-05-26 18:33:01','2015-05-26 18:33:01','A few weeks ago we added some computer vision functionality to our open source <a href=\"http://sandbox.arrayfire.com/download\">ArrayFire GPU computing</a> library. Specifically, we implemented the <a href=\"http://www.springerlink.com/index/10.1007/11744023\">FAST</a> feature extractor, <a href=\"http://www.springerlink.com/index/10.1007/978-3-642-15561-1\">BRIEF</a> feature point descriptor, <a href=\"http://ieeexplore.ieee.org/lpdocs/epic03/wrapper.htm?arnumber=6126544\">ORB</a> multi-resolution scale invariant feature extractor, and a <a href=\"http://en.wikipedia.org/wiki/Hamming_distance\">Hamming distance</a> function. When combined, these functions enable you to find features in videos (or images) and track them between successive frames.\r\n\r\nHere is a quick video showing these functions executing on a few frames from the <a href=\"http://www.blender.org/\">Blender Foundation</a>\'s <a href=\"http://www.bigbuckbunny.org\">Big Buck Bunny</a> video:\r\n\r\n<iframe width=\"854\" height=\"510\" src=\"https://www.youtube.com/embed/sHHvORwgFQ4\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"></iframe>\r\n\r\nNow that you have seen the functionality in action, how do you use these in your code? Assuming that you have a suitable function that can load your video frames in to ArrayFire \"array\" objects, it\'s pretty simple:\r\n<pre><code><span class=\"hljs-comment\">// Run FAST on a frame and get the features:</span>\r\naf::features fast_features = af::fast(frame, <span class=\"hljs-number\">20</span>, <span class=\"hljs-number\">9</span>, <span class=\"hljs-number\">1</span>, <span class=\"hljs-number\">0.05f</span>);\r\n</code></pre>\r\nThe `af::features` object is a special structure which contains the `(x,y)` location of the features, their scores, and the number of features. To get access to this information simply use the `getX()`, `getY()`, `getScore()`, and `getNumFeatures()` functions:\r\n<pre><code>af::<span class=\"hljs-built_in\">array</span> x_pos = fast_features.getX();\r\naf::<span class=\"hljs-built_in\">array</span> y_pos = fast_features.getY();\r\naf::<span class=\"hljs-built_in\">array</span> scores = fast_features.getScore();\r\n<span class=\"hljs-keyword\">int</span> N = fast_features.getNumFeatures();\r\n</code></pre>\r\nORB has a slightly different syntax:\r\n<pre><code><span class=\"hljs-comment\">// Run ORB on a frame and get the features and descriptors</span>\r\naf::features orb_features;\r\naf::<span class=\"hljs-built_in\">array</span> orb_descriptors;\r\naf::orb(orb_features, orb_descriptors, frame, <span class=\"hljs-number\">20</span>, <span class=\"hljs-number\">1000</span>, <span class=\"hljs-number\">1.2</span>, <span class=\"hljs-number\">1</span>, <span class=\"hljs-keyword\">false</span>);</code></pre>\r\nThe features from `ORB` may be accessed in the same fashion as `FAST` described above. The `orb_descriptors` variable is a Nx8 array containing extracted descriptors (read the <a href=\"http://ieeexplore.ieee.org/lpdocs/epic03/wrapper.htm?arnumber=6126544\">ORB paper</a> for further details on this structure).\r\n\r\nThe Hamming matcher I mention in the video is almost ready to be committed to our upstream development branch, so it is also worth mentioning how it can be used. Assuming you have a list of features from two sources called `a_features` and `b_features` respectively, you can compute their Hamming distance using ArrayFire as follows:\r\n<pre><code>af::<span class=\"hljs-built_in\">array</span> idx;\r\naf::<span class=\"hljs-built_in\">array</span> distances;\r\naf::<span class=\"hljs-built_in\">array</span> a_features;\r\naf::<span class=\"hljs-built_in\">array</span> b_features;\r\naf::hamming_matcher(idx, distances, a_features, b_features, <span class=\"hljs-number\">0</span>, <span class=\"hljs-number\">1</span>);</code></pre>\r\nThen you may get the indicies of features whose distance is less than, say 50, using ArrayFire\'s `where` operator. After you have these inidices, you can pick out these near-matching features pretty easily:\r\n<pre><code>// select features with distances less than <span class=\"hljs-number\">50</span>:\r\naf::array near_matches = where(dist &lt; <span class=\"hljs-number\">50</span>);\r\n// and now extract information about those features:\r\narray a_feat_x = a_features.getX()(near_matches)\r\narray a_feat_y = a_features.getY()(near_matches)\r\n<span class=\"hljs-keyword\">...</span></code></pre>\r\nBecause these are ArrayFire array objects, they exist in your GPU\'s (or other accelerator device\'s) memory. To get access to them within your host code, you need to get a copy of the data and place it somewhere in RAM:\r\n<pre><code><span class=\"hljs-keyword\">float</span> * features_x = a_feat_x.host&lt;<span class=\"hljs-keyword\">float</span>&gt;();\r\n<span class=\"hljs-keyword\">float</span> * features_y = a_feat_y.host&lt;<span class=\"hljs-keyword\">float</span>&gt;();</code></pre>','New computer vision functionality','','inherit','open','closed','','8299-revision-v1','','','2015-05-26 18:33:01','2015-05-26 18:33:01','',8299,'http://sandbox.arrayfire.com/8299-revision-v1/',0,'revision','',0),(8304,18528,'2015-05-26 18:33:53','2015-05-26 18:33:53','A few weeks ago we added some computer vision functionality to our open source <a href=\"http://sandbox.arrayfire.com/download\">ArrayFire GPU computing</a> library. Specifically, we implemented the <a href=\"http://www.springerlink.com/index/10.1007/11744023\">FAST</a> feature extractor, <a href=\"http://www.springerlink.com/index/10.1007/978-3-642-15561-1\">BRIEF</a> feature point descriptor, <a href=\"http://ieeexplore.ieee.org/lpdocs/epic03/wrapper.htm?arnumber=6126544\">ORB</a> multi-resolution scale invariant feature extractor, and a <a href=\"http://en.wikipedia.org/wiki/Hamming_distance\">Hamming distance</a> function. When combined, these functions enable you to find features in videos (or images) and track them between successive frames.\r\n\r\nHere is a quick video showing these functions executing on a few frames from the <a href=\"http://www.blender.org/\">Blender Foundation</a>\'s <a href=\"http://www.bigbuckbunny.org\">Big Buck Bunny</a> video:\r\n\r\n<iframe width=\"854\" height=\"510\" src=\"https://www.youtube.com/embed/sHHvORwgFQ4\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"></iframe>\r\n\r\nNow that you have seen the functionality in action, how do you use these in your code? Assuming that you have a suitable function that can load your video frames in to ArrayFire \"array\" objects, it\'s pretty simple:\r\n\r\n<code>\r\n// Run FAST on a frame and get the features:\r\naf::features fast_features = af::fast(frame, 20, 9, 1, 0.05f);\r\n</code>\r\n\r\nThe `af::features` object is a special structure which contains the `(x,y)` location of the features, their scores, and the number of features. To get access to this information simply use the `getX()`, `getY()`, `getScore()`, and `getNumFeatures()` functions:\r\n\r\n<code>\r\naf::array x_pos = fast_features.getX();\r\naf::array y_pos = fast_features.getY();\r\naf::array scores = fast_features.getScore();\r\nint N = fast_features.getNumFeatures();\r\n</code>\r\n\r\nORB has a slightly different syntax:\r\n\r\n<code>\r\n// Run ORB on a frame and get the features and descriptors\r\naf::features orb_features;\r\naf::array orb_descriptors;\r\naf::orb(orb_features, orb_descriptors, frame, 20, 1000, 1.2, 1, false);\r\n</code>\r\n\r\nThe features from `ORB` may be accessed in the same fashion as `FAST` described above. The `orb_descriptors` variable is a Nx8 array containing extracted descriptors (read the <a href=\"http://ieeexplore.ieee.org/lpdocs/epic03/wrapper.htm?arnumber=6126544\">ORB paper</a> for further details on this structure).\r\n\r\nThe Hamming matcher I mention in the video is almost ready to be committed to our upstream development branch, so it is also worth mentioning how it can be used. Assuming you have a list of features from two sources called `a_features` and `b_features` respectively, you can compute their Hamming distance using ArrayFire as follows:\r\n\r\n<code>\r\naf::array idx;\r\naf::array distances;\r\naf::array a_features;\r\naf::array b_features;\r\naf::hamming_matcher(idx, distances, a_features, b_features, 0, 1);\r\n</code>\r\n\r\nThen you may get the indicies of features whose distance is less than, say 50, using ArrayFire\'s `where` operator. After you have these inidices, you can pick out these near-matching features pretty easily:\r\n\r\n<code>\r\n// select features with distances less than 50:\r\naf::array near_matches = where(dist &lt; 50);\r\n// and now extract information about those features:\r\narray a_feat_x = a_features.getX()(near_matches)\r\narray a_feat_y = a_features.getY()(near_matches)\r\n...\r\n</code>\r\n\r\nBecause these are ArrayFire array objects, they exist in your GPU\'s (or other accelerator device\'s) memory. To get access to them within your host code, you need to get a copy of the data and place it somewhere in RAM:\r\n\r\n<code>\r\nfloat * features_x = a_feat_x.host<float>();\r\nfloat * features_y = a_feat_y.host<float>();\r\n</code>','New computer vision functionality','','inherit','open','closed','','8299-revision-v1','','','2015-05-26 18:33:53','2015-05-26 18:33:53','',8299,'http://sandbox.arrayfire.com/8299-revision-v1/',0,'revision','',0),(8305,18528,'2015-05-26 18:35:27','2015-05-26 18:35:27','<!--more-->\n\n<h3>Introduction</h3>\nWith Intel CPUs making up nearly <a href=\"https://www.cpubenchmark.net/market_share.html\">80% of the CPU market</a> and <a href=\"http://jonpeddie.com/press-releases/details/gpu-market-upintel-and-nvidia-graphics-winners-in-q4-amd-down/\">66% of computers using integrated graphics</a> one can easily argue that integrated graphics devices represent one of the greatest markets for GPU-accelerated computing. Here at ArrayFire, we have long recognized the potential of these devices and offer built-in support for Intel CPUs, GPUs, and AMD APUs in the OpenCL backend of our <a href=\"http://www.arrayfire.com\">ArrayFire</a> GPU computing library. Yet one common theme for debate in the office has been how the hardware performs on different operating systems with different drivers across hardware revisions.\n\nTo answer these questions (and, perhaps, to win some intra-office geek cred) I decided to write a series of blog posts about Intel\'s GPU OpenCL performance. In this first installment I will compare the performance of OpenCL on a 3rd generation Intel processor on Linux and Windows.\n<h3>Monte Carlo Pi estimation</h3>\nTo evaluate the performance of Intel\'s hardware I took a textbook problem of computing Pi using a Monte Carlo method. This is a classic example of a memory bound application where the time to read/write data from/to memory dominates most of the computation time. Thus, throwing N-more compute cores at the problem may not always achieve a linear acceleration unless careful attention to memory access patterns and cache usage is performed.\n\nThe Monte Carlo process for computing pi is fairly simple, consisting of three primary steps:\n<ol>\n	<li>Generate a series of random (x,y) pairs from within the <a href=\"http://en.wikipedia.org/wiki/Unit_square\">unit square</a></li>\n	<li>Determine which of these samples reside within the <a href=\"http://en.wikipedia.org/wiki/Unit_circle\">unit circle</a></li>\n	<li>Compute the ratio of the samples that reside within the square to those which reside within the circle and then multiply by four (to account for this being only one quadrant of a circle).</li>\n</ol>\nThere is a great visualization of this process and a demonstration of how the <a href=\"http://commons.wikimedia.org/wiki/File:Pi_30K.gif\">number of samples impacts the Pi estimate on wikipedia</a>.\n\nIf you were to implement this in C/C++, your code might look like this:\n<pre class=\"lang:default decode:true\" title=\"Sample CPU code for Monte Carlo Pi estimation\">...\n\nint count = 0;\nfloat x, y;\nvector&lt;float&gt; randomNums(2*samples);\n\n// init random numbers within the unit square.\n// Pack as (x,y) pairs\nfor(int i = 0; i &lt; 2*samples; i++)	{\n	randomNums[i] = float(rand()) / RAND_MAX;\n}\n\n// count how many samples reside in the circle\nfor(int i = 0; i &lt; samples; i++)\n{\n	x = randomNums[2*i];\n	y = randomNums[2*i + 1];\n\n	if(x*x + y*y &lt; 1.0)\n		count++;\n}\n\n// calculate the estimate and print the result\nfloat pi_estimate = 4 * float(count) / samples;\n\n...</pre>\n<h3>Benchmark methods</h3>\nWe implemented four different versions of the Pi problem with small changes in the implementation which test various aspects of the hardware and software. These five implementations are:\n<ol>\n	<li>Single core CPU - A direct implementation of the code listing above</li>\n	<li>A naive port of the CPU code to the GPU with no optimizations. Region testing is performed on the GPU and the result is summed on the CPU</li>\n	<li>An effort to reduce the workload of the CPU by partially summing the region testing results on the GPU</li>\n	<li>A classic GPU optimization using coalesced memory load/stores</li>\n	<li>And a final integrated-device specific optimization that uses <a href=\"http://sandbox.arrayfire.com/zero-copy-on-integrated-gpus/\">zero-copy memory buffers</a></li>\n</ol>\nFor these tests we used a few-year old ASUS N56V laptop we had in the office which features an Intel i7-3610QM CPU with a HD Graphics 4000 GT2 GPU. This particular GPU has 16 execution units which can host up to 128 concurrent threads. We installed Window 7 (Intel OpenCL GPU driver 10.18.10.395; Intel OpenCL CPU drivers 5.1.0.25) and Ubuntu 14.10 (GPU driver Beignet 1.1 from git acfc2a2 and CPU driver \"Build 92\"). In future blog posts we will cover 4th and 5th generation hardware (including Iris pro).\n<h3>Results and discussion</h3>\nOn Linux a single core CPU took <span data-sheets-value=\"[null,3,null,31583]\" data-sheets-userformat=\"[null,null,513,[null,0],null,null,null,null,null,null,null,null,0]\">31.583 ms to execute on a sample size of 20 million sample points. Interestingly, the same code on Windows too over 66 ms to execute on the same sample size (in release mode, with /02 and high power settings selected). This curious result isn\'t particularly important as the OpenCL performance on the CPU does not appear to be degraded between operating systems.</span>\n\nBelow we plot the speed up of our OpenCL kernels relative to the performance of the Linux single core CPU result above for both the i7-3610QM CPU and HD Graphics 4000 GPU.\n\n<iframe width=\"694\" height=\"371\" seamless=\"\" frameborder=\"0\" scrolling=\"no\" src=\"https://docs.google.com/spreadsheets/d/1vMeMPs4d78wsbURINCKmAFDFBwIFzpAl438Q-geoeNs/pubchart?oid=2103791532&amp;format=interactive\"></iframe>\n\nWe see that the naive port of the CPU code directly to OpenCL is slower than the pure CPU implementation by a factor of four. This result is not terribly surprising once you consider the poorly conceived implementation encounters a full O(N) cost for data transfer and summing region test result for the 20 million sample points.\n\nThe OCL reduction kernel offloads some of the CPU\'s work by partially summing the region detection results on the GPU. This tweak increased the performance of the kernel between 4x (for the OpenCL on the GPU) to 10x (for OpenCL on the CPU). Curiously, the CPU kernels on Ubuntu and Windows perform very well, achieving speed-ups of about 3x the CPU. This is still below the theoretical 4x speed improvement one would expect on this quad-core CPU namely due to thread management and poor memory access patterns.\n\nLastly we will discuss the coalesced memory and zero copy kernels. The optimization here involves changing the memory access pattern from using strieded memory access:\n<pre class=\"lang:default decode:true\" title=\"Sample CPU code for Monte Carlo Pi estimation\">x = randomNums[2*i];\ny = randomNums[2*i + 1];</pre>\nto using OpenCL\'s float2 data type to access sequential elements, thus improving utilization of the memory bus. This technique improved throughput by 2.2x on Ubuntu and 3.25x on Windows. This makes the GPU about twice as fast as our initial CPU implementation. We see little to no acceleration in using zero copy buffers for this problem because the problem size for the final CPU sum is quite small (on the order of 1000 elements).\n<h3>Conclusion and a preview of the next post</h3>\nFor the Monte Carlo Pi problem, it appears Ubuntu and Beignet achieve slightly better performance than the current Windows Intel HD Graphics OpenCL drivers; however, given the limited number of trials performed (and lack of statistical error bars) we may conservatively state that the two OpenCL implementations perform similarly on the same hardware.\n\nWe found that using OpenCL on the GPU achieves better acceleration than OpenCL on the CPU in general. In one of our kernels, OpenCL on the i7-3610QM CPU was slightly faster than on the GPU, but this is probably due to automatic vectorization in the CPU OpenCL backend for this particular kernel.\n\nIn our next post we will compare the performance of OpenCL on 3rd, 4th, and 5th generation Intel processors using both memory and compute-bound kernels.','Intel OpenCL performance: 3rd generation hardware','','inherit','open','closed','','8124-autosave-v1','','','2015-05-26 18:35:27','2015-05-26 18:35:27','',8124,'http://sandbox.arrayfire.com/8124-autosave-v1/',0,'revision','',0),(8306,18528,'2015-05-26 18:38:44','2015-05-26 18:38:44','A few weeks ago we added some computer vision functionality to our open source <a href=\"http://sandbox.arrayfire.com/download\">ArrayFire GPU computing</a> library. Specifically, we implemented the <a href=\"http://www.springerlink.com/index/10.1007/11744023\">FAST</a> feature extractor, <a href=\"http://www.springerlink.com/index/10.1007/978-3-642-15561-1\">BRIEF</a> feature point descriptor, <a href=\"http://ieeexplore.ieee.org/lpdocs/epic03/wrapper.htm?arnumber=6126544\">ORB</a> multi-resolution scale invariant feature extractor, and a <a href=\"http://en.wikipedia.org/wiki/Hamming_distance\">Hamming distance</a> function. When combined, these functions enable you to find features in videos (or images) and track them between successive frames.\r\n\r\n<!--more-->\r\n\r\nHere is a quick video showing these functions executing on a few frames from the <a href=\"http://www.blender.org/\">Blender Foundation</a>\'s <a href=\"http://www.bigbuckbunny.org\">Big Buck Bunny</a> video:\r\n\r\n<iframe width=\"854\" height=\"510\" src=\"https://www.youtube.com/embed/sHHvORwgFQ4\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"></iframe>\r\n\r\nNow that you have seen the functionality in action, how do you use these in your code? Assuming that you have a suitable function that can load your video frames in to ArrayFire \"array\" objects, it\'s pretty simple:\r\n\r\n<pre>\r\n// Run FAST on a frame and get the features:\r\naf::features fast_features = af::fast(frame, 20, 9, 1, 0.05f);\r\n</pre>\r\n\r\nThe `af::features` object is a special structure which contains the `(x,y)` location of the features, their scores, and the number of features. To get access to this information simply use the `getX()`, `getY()`, `getScore()`, and `getNumFeatures()` functions:\r\n\r\n<pre>\r\naf::array x_pos = fast_features.getX();\r\naf::array y_pos = fast_features.getY();\r\naf::array scores = fast_features.getScore();\r\nint N = fast_features.getNumFeatures();\r\n</pre>\r\n\r\nORB has a slightly different syntax:\r\n\r\n<pre>\r\n// Run ORB on a frame and get the features and descriptors\r\naf::features orb_features;\r\naf::array orb_descriptors;\r\naf::orb(orb_features, orb_descriptors, frame, 20, 1000, 1.2, 1, false);\r\n</pre>\r\n\r\nThe features from `ORB` may be accessed in the same fashion as `FAST` described above. The `orb_descriptors` variable is a Nx8 array containing extracted descriptors (read the <a href=\"http://ieeexplore.ieee.org/lpdocs/epic03/wrapper.htm?arnumber=6126544\">ORB paper</a> for further details on this structure).\r\n\r\nThe Hamming matcher I mention in the video is almost ready to be committed to our upstream development branch, so it is also worth mentioning how it can be used. Assuming you have a list of features from two sources called `a_features` and `b_features` respectively, you can compute their Hamming distance using ArrayFire as follows:\r\n\r\n<pre>\r\naf::array idx;\r\naf::array distances;\r\naf::array a_features;\r\naf::array b_features;\r\naf::hamming_matcher(idx, distances, a_features, b_features, 0, 1);\r\n</pre>\r\n\r\nThen you may get the indicies of features whose distance is less than, say 50, using ArrayFire\'s `where` operator. After you have these inidices, you can pick out these near-matching features pretty easily:\r\n\r\n<pre>\r\n// select features with distances less than 50:\r\naf::array near_matches = where(dist &lt; 50);\r\n// and now extract information about those features:\r\narray a_feat_x = a_features.getX()(near_matches)\r\narray a_feat_y = a_features.getY()(near_matches)\r\n...\r\n</pre>\r\n\r\nBecause these are ArrayFire array objects, they exist in your GPU\'s (or other accelerator device\'s) memory. To get access to them within your host code, you need to get a copy of the data and place it somewhere in RAM:\r\n\r\n<pre>\r\nfloat * features_x = a_feat_x.host();\r\nfloat * features_y = a_feat_y.host();\r\n</pre>','Feature detection and tracking using ArrayFire','','inherit','open','closed','','8299-revision-v1','','','2015-05-26 18:38:44','2015-05-26 18:38:44','',8299,'http://sandbox.arrayfire.com/8299-revision-v1/',0,'revision','',0),(8307,18528,'2015-05-26 18:39:16','2015-05-26 18:39:16','A few weeks ago we added some computer vision functionality to our open source <a href=\"http://sandbox.arrayfire.com/download\">ArrayFire GPU computing</a> library. Specifically, we implemented the <a href=\"http://www.springerlink.com/index/10.1007/11744023\">FAST</a> feature extractor, <a href=\"http://www.springerlink.com/index/10.1007/978-3-642-15561-1\">BRIEF</a> feature point descriptor, <a href=\"http://ieeexplore.ieee.org/lpdocs/epic03/wrapper.htm?arnumber=6126544\">ORB</a> multi-resolution scale invariant feature extractor, and a <a href=\"http://en.wikipedia.org/wiki/Hamming_distance\">Hamming distance</a> function. When combined, these functions enable you to find features in videos (or images) and track them between successive frames.\r\n\r\n<!--more-->\r\n\r\nHere is a quick video showing these functions executing on a few frames from the <a href=\"http://www.blender.org/\">Blender Foundation</a>\'s <a href=\"http://www.bigbuckbunny.org\">Big Buck Bunny</a> video:\r\n\r\n<iframe width=\"854\" height=\"510\" src=\"https://www.youtube.com/embed/sHHvORwgFQ4\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"></iframe>\r\n\r\nNow that you have seen the functionality in action, how do you use these in your code? Assuming that you have a suitable function that can load your video frames in to ArrayFire \"array\" objects, it\'s pretty simple:\r\n\r\n<pre>// Run FAST on a frame and get the features:\r\naf::features fast_features = af::fast(frame, 20, 9, 1, 0.05f);\r\n</pre>\r\n\r\nThe `af::features` object is a special structure which contains the `(x,y)` location of the features, their scores, and the number of features. To get access to this information simply use the `getX()`, `getY()`, `getScore()`, and `getNumFeatures()` functions:\r\n\r\n<pre>af::array x_pos = fast_features.getX();\r\naf::array y_pos = fast_features.getY();\r\naf::array scores = fast_features.getScore();\r\nint N = fast_features.getNumFeatures();\r\n</pre>\r\n\r\nORB has a slightly different syntax:\r\n\r\n<pre>// Run ORB on a frame and get the features and descriptors\r\naf::features orb_features;\r\naf::array orb_descriptors;\r\naf::orb(orb_features, orb_descriptors, frame, 20, 1000, 1.2, 1, false);\r\n</pre>\r\n\r\nThe features from `ORB` may be accessed in the same fashion as `FAST` described above. The `orb_descriptors` variable is a Nx8 array containing extracted descriptors (read the <a href=\"http://ieeexplore.ieee.org/lpdocs/epic03/wrapper.htm?arnumber=6126544\">ORB paper</a> for further details on this structure).\r\n\r\nThe Hamming matcher I mention in the video is almost ready to be committed to our upstream development branch, so it is also worth mentioning how it can be used. Assuming you have a list of features from two sources called `a_features` and `b_features` respectively, you can compute their Hamming distance using ArrayFire as follows:\r\n\r\n<pre>af::array idx;\r\naf::array distances;\r\naf::array a_features;\r\naf::array b_features;\r\naf::hamming_matcher(idx, distances, a_features, b_features, 0, 1);\r\n</pre>\r\n\r\nThen you may get the indicies of features whose distance is less than, say 50, using ArrayFire\'s `where` operator. After you have these inidices, you can pick out these near-matching features pretty easily:\r\n\r\n<pre>// select features with distances less than 50:\r\naf::array near_matches = where(dist &lt; 50);\r\n// and now extract information about those features:\r\narray a_feat_x = a_features.getX()(near_matches)\r\narray a_feat_y = a_features.getY()(near_matches)\r\n...\r\n</pre>\r\n\r\nBecause these are ArrayFire array objects, they exist in your GPU\'s (or other accelerator device\'s) memory. To get access to them within your host code, you need to get a copy of the data and place it somewhere in RAM:\r\n\r\n<pre>float * features_x = a_feat_x.host();\r\nfloat * features_y = a_feat_y.host();\r\n</pre>','Feature detection and tracking using ArrayFire','','inherit','open','closed','','8299-revision-v1','','','2015-05-26 18:39:16','2015-05-26 18:39:16','',8299,'http://sandbox.arrayfire.com/8299-revision-v1/',0,'revision','',0),(8308,18528,'2015-05-26 18:39:35','2015-05-26 18:39:35','A few weeks ago we added some computer vision functionality to our open source <a href=\"http://sandbox.arrayfire.com/download\">ArrayFire GPU computing</a> library. Specifically, we implemented the <a href=\"http://www.springerlink.com/index/10.1007/11744023\">FAST</a> feature extractor, <a href=\"http://www.springerlink.com/index/10.1007/978-3-642-15561-1\">BRIEF</a> feature point descriptor, <a href=\"http://ieeexplore.ieee.org/lpdocs/epic03/wrapper.htm?arnumber=6126544\">ORB</a> multi-resolution scale invariant feature extractor, and a <a href=\"http://en.wikipedia.org/wiki/Hamming_distance\">Hamming distance</a> function. When combined, these functions enable you to find features in videos (or images) and track them between successive frames.\r\n\r\n<!--more-->\r\n\r\nHere is a quick video showing these functions executing on a few frames from the <a href=\"http://www.blender.org/\">Blender Foundation</a>\'s <a href=\"http://www.bigbuckbunny.org\">Big Buck Bunny</a> video:\r\n\r\n<iframe width=\"854\" height=\"510\" src=\"https://www.youtube.com/embed/sHHvORwgFQ4\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"></iframe>\r\n\r\nNow that you have seen the functionality in action, how do you use these in your code? Assuming that you have a suitable function that can load your video frames in to ArrayFire \"array\" objects, it\'s pretty simple:\r\n\r\n<pre>\r\n// Run FAST on a frame and get the features:\r\naf::features fast_features = af::fast(frame, 20, 9, 1, 0.05f);\r\n</pre>\r\n\r\nThe `af::features` object is a special structure which contains the `(x,y)` location of the features, their scores, and the number of features. To get access to this information simply use the `getX()`, `getY()`, `getScore()`, and `getNumFeatures()` functions:\r\n\r\n<pre>\r\naf::array x_pos = fast_features.getX();\r\naf::array y_pos = fast_features.getY();\r\naf::array scores = fast_features.getScore();\r\nint N = fast_features.getNumFeatures();\r\n</pre>\r\n\r\nORB has a slightly different syntax:\r\n\r\n<pre>\r\n// Run ORB on a frame and get the features and descriptors\r\naf::features orb_features;\r\naf::array orb_descriptors;\r\naf::orb(orb_features, orb_descriptors, frame, 20, 1000, 1.2, 1, false);\r\n</pre>\r\n\r\nThe features from `ORB` may be accessed in the same fashion as `FAST` described above. The `orb_descriptors` variable is a Nx8 array containing extracted descriptors (read the <a href=\"http://ieeexplore.ieee.org/lpdocs/epic03/wrapper.htm?arnumber=6126544\">ORB paper</a> for further details on this structure).\r\n\r\nThe Hamming matcher I mention in the video is almost ready to be committed to our upstream development branch, so it is also worth mentioning how it can be used. Assuming you have a list of features from two sources called `a_features` and `b_features` respectively, you can compute their Hamming distance using ArrayFire as follows:\r\n\r\n<pre>\r\naf::array idx;\r\naf::array distances;\r\naf::array a_features;\r\naf::array b_features;\r\naf::hamming_matcher(idx, distances, a_features, b_features, 0, 1);\r\n</pre>\r\n\r\nThen you may get the indicies of features whose distance is less than, say 50, using ArrayFire\'s `where` operator. After you have these inidices, you can pick out these near-matching features pretty easily:\r\n\r\n<pre>\r\n// select features with distances less than 50:\r\naf::array near_matches = where(dist &lt; 50);\r\n// and now extract information about those features:\r\narray a_feat_x = a_features.getX()(near_matches)\r\narray a_feat_y = a_features.getY()(near_matches)\r\n...\r\n</pre>\r\n\r\nBecause these are ArrayFire array objects, they exist in your GPU\'s (or other accelerator device\'s) memory. To get access to them within your host code, you need to get a copy of the data and place it somewhere in RAM:\r\n\r\n<pre>\r\nfloat * features_x = a_feat_x.host();\r\nfloat * features_y = a_feat_y.host();\r\n</pre>','Feature detection and tracking using ArrayFire','','inherit','open','closed','','8299-revision-v1','','','2015-05-26 18:39:35','2015-05-26 18:39:35','',8299,'http://sandbox.arrayfire.com/8299-revision-v1/',0,'revision','',0),(8310,18528,'2015-05-26 18:52:31','2015-05-26 18:52:31','A few weeks ago we added some computer vision functionality to our open source <a href=\"http://sandbox.arrayfire.com/download\">ArrayFire GPU computing</a> library. Specifically, we implemented the <a href=\"http://www.springerlink.com/index/10.1007/11744023\">FAST</a> feature extractor, <a href=\"http://www.springerlink.com/index/10.1007/978-3-642-15561-1\">BRIEF</a> feature point descriptor, <a href=\"http://ieeexplore.ieee.org/lpdocs/epic03/wrapper.htm?arnumber=6126544\">ORB</a> multi-resolution scale invariant feature extractor, and a <a href=\"http://en.wikipedia.org/wiki/Hamming_distance\">Hamming distance</a> function. When combined, these functions enable you to find features in videos (or images) and track them between successive frames.\r\n\r\n<!--more-->\r\n\r\nHere is a quick video showing these functions executing on a few frames from the <a href=\"http://www.blender.org/\">Blender Foundation</a>\'s <a href=\"http://www.bigbuckbunny.org\">Big Buck Bunny</a> video:\r\n\r\n<iframe width=\"854\" height=\"510\" src=\"https://www.youtube.com/embed/sHHvORwgFQ4\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"></iframe>\r\n<h2>Using FAST and ORB</h2>\r\nNow that you have seen the functionality in action, how do you use these in your code? Assuming that you have a suitable function that can load your video frames in to ArrayFire \"array\" objects, it\'s pretty simple:\r\n<pre>// Run FAST on a frame and get the features:\r\naf::features fast_features = af::fast(frame, 20, 9, 1, 0.05f);\r\n</pre>\r\nThe `af::features` object is a special structure which contains the `(x,y)` location of the features, their scores, and the number of features. To get access to this information simply use the `getX()`, `getY()`, `getScore()`, and `getNumFeatures()` functions:\r\n<pre>af::array x_pos = fast_features.getX();\r\naf::array y_pos = fast_features.getY();\r\naf::array scores = fast_features.getScore();\r\nint N = fast_features.getNumFeatures();\r\n</pre>\r\nORB has a slightly different syntax:\r\n<pre>// Run ORB on a frame and get the features and descriptors\r\naf::features orb_features;\r\naf::array orb_descriptors;\r\naf::orb(orb_features, orb_descriptors, frame, 20, 1000, 1.2, 1, false);\r\n</pre>\r\nThe features from `ORB` may be accessed in the same fashion as `FAST` described above. The `orb_descriptors` variable is a Nx8 array containing extracted descriptors (read the <a href=\"http://ieeexplore.ieee.org/lpdocs/epic03/wrapper.htm?arnumber=6126544\">ORB paper</a> for further details on this structure).\r\n\r\nThe Hamming matcher I mention in the video is almost ready to be committed to our upstream development branch, so it is also worth mentioning how it can be used. Assuming you have a list of features from two sources called `a_features` and `b_features` respectively, you can compute their Hamming distance using ArrayFire as follows:\r\n<pre>af::array idx;\r\naf::array distances;\r\naf::array a_features;\r\naf::array b_features;\r\naf::hamming_matcher(idx, distances, a_features, b_features, 0, 1);\r\n</pre>\r\nThen you may get the indicies of features whose distance is less than, say 50, using ArrayFire\'s `where` operator. After you have these inidices, you can pick out these near-matching features pretty easily:\r\n<pre class=\"\">// select features with distances less than 50:\r\naf::array near_matches = where(dist &lt; 50);\r\n// and now extract information about those features:\r\narray a_feat_x = a_features.getX()(near_matches)\r\narray a_feat_y = a_features.getY()(near_matches)\r\n...\r\n</pre>\r\nBecause these are ArrayFire array objects, they exist in your GPU\'s (or other accelerator device\'s) memory. To get access to them within your host code, you need to get a copy of the data and place it somewhere in RAM:\r\n<pre class=\"\">float * features_x = a_feat_x.host();\r\nfloat * features_y = a_feat_y.host();\r\n</pre>\r\n<h2>Performance</h2>\r\nLastly, how does ArrayFire\'s implementations of FAST and ORB compare with OpenCV? In general, ArrayFire is faster:\r\n\r\n&nbsp;','Feature detection and tracking using ArrayFire','','inherit','open','closed','','8299-revision-v1','','','2015-05-26 18:52:31','2015-05-26 18:52:31','',8299,'http://sandbox.arrayfire.com/8299-revision-v1/',0,'revision','',0),(8311,18528,'2015-05-26 19:02:19','2015-05-26 19:02:19','','ArrayFire-vs-OpenCV-FAST','','inherit','open','closed','','arrayfire-vs-opencv-fast','','','2015-05-26 19:02:19','2015-05-26 19:02:19','',8299,'http://sandbox.arrayfire.com/wp-content/uploads/2015/05/ArrayFire-vs-OpenCV-FAST.png',0,'attachment','image/png',0),(8312,18528,'2015-05-26 19:02:20','2015-05-26 19:02:20','','ArrayFire-vs-OpenCV-ORB','','inherit','open','closed','','arrayfire-vs-opencv-orb','','','2015-05-26 19:02:20','2015-05-26 19:02:20','',8299,'http://sandbox.arrayfire.com/wp-content/uploads/2015/05/ArrayFire-vs-OpenCV-ORB.png',0,'attachment','image/png',0),(8313,18528,'2015-05-26 19:02:37','2015-05-26 19:02:37','','ArrayFire-vs-OpenCV-FAST','','inherit','open','closed','','arrayfire-vs-opencv-fast-2','','','2015-05-26 19:02:37','2015-05-26 19:02:37','',8299,'http://sandbox.arrayfire.com/wp-content/uploads/2015/05/ArrayFire-vs-OpenCV-FAST1.png',0,'attachment','image/png',0),(8314,18528,'2015-05-26 19:19:59','2015-05-26 19:19:59','A few weeks ago we added some computer vision functionality to our open source <a href=\"http://sandbox.arrayfire.com/download\">ArrayFire GPU computing</a> library. Specifically, we implemented the <a href=\"http://www.springerlink.com/index/10.1007/11744023\">FAST</a> feature extractor, <a href=\"http://www.springerlink.com/index/10.1007/978-3-642-15561-1\">BRIEF</a> feature point descriptor, <a href=\"http://ieeexplore.ieee.org/lpdocs/epic03/wrapper.htm?arnumber=6126544\">ORB</a> multi-resolution scale invariant feature extractor, and a <a href=\"http://en.wikipedia.org/wiki/Hamming_distance\">Hamming distance</a> function. When combined, these functions enable you to find features in videos (or images) and track them between successive frames.\r\n\r\n<!--more-->\r\n\r\nHere is a quick video showing these functions executing on a few frames from the <a href=\"http://www.blender.org/\">Blender Foundation</a>\'s <a href=\"http://www.bigbuckbunny.org\">Big Buck Bunny</a> video:\r\n\r\n<iframe width=\"854\" height=\"510\" src=\"https://www.youtube.com/embed/sHHvORwgFQ4\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"></iframe>\r\n<h2>Using FAST and ORB</h2>\r\nNow that you have seen the functionality in action, how do you use these in your code? Assuming that you have a suitable function that can load your video frames in to ArrayFire \"array\" objects, it\'s pretty simple:\r\n<pre>// Run FAST on a frame and get the features:\r\naf::features fast_features = af::fast(frame, 20, 9, 1, 0.05f);\r\n</pre>\r\nThe `af::features` object is a special structure which contains the `(x,y)` location of the features, their scores, and the number of features. To get access to this information simply use the `getX()`, `getY()`, `getScore()`, and `getNumFeatures()` functions:\r\n<pre>af::array x_pos = fast_features.getX();\r\naf::array y_pos = fast_features.getY();\r\naf::array scores = fast_features.getScore();\r\nint N = fast_features.getNumFeatures();\r\n</pre>\r\nORB has a slightly different syntax:\r\n<pre>// Run ORB on a frame and get the features and descriptors\r\naf::features orb_features;\r\naf::array orb_descriptors;\r\naf::orb(orb_features, orb_descriptors, frame, 20, 1000, 1.2, 1, false);\r\n</pre>\r\nThe features from `ORB` may be accessed in the same fashion as `FAST` described above. The `orb_descriptors` variable is a Nx8 array containing extracted descriptors (read the <a href=\"http://ieeexplore.ieee.org/lpdocs/epic03/wrapper.htm?arnumber=6126544\">ORB paper</a> for further details on this structure).\r\n\r\nThe Hamming matcher I mention in the video is almost ready to be committed to our upstream development branch, so it is also worth mentioning how it can be used. Assuming you have a list of features from two sources called `a_features` and `b_features` respectively, you can compute their Hamming distance using ArrayFire as follows:\r\n<pre>af::array idx;\r\naf::array distances;\r\naf::array a_features;\r\naf::array b_features;\r\naf::hamming_matcher(idx, distances, a_features, b_features, 0, 1);\r\n</pre>\r\nThen you may get the indicies of features whose distance is less than, say 50, using ArrayFire\'s `where` operator. After you have these inidices, you can pick out these near-matching features pretty easily:\r\n<pre class=\"\">// select features with distances less than 50:\r\naf::array near_matches = where(dist &lt; 50);\r\n// and now extract information about those features:\r\narray a_feat_x = a_features.getX()(near_matches)\r\narray a_feat_y = a_features.getY()(near_matches)\r\n...\r\n</pre>\r\nBecause these are ArrayFire array objects, they exist in your GPU\'s (or other accelerator device\'s) memory. To get access to them within your host code, you need to get a copy of the data and place it somewhere in RAM:\r\n<pre class=\"\">float * features_x = a_feat_x.host();\r\nfloat * features_y = a_feat_y.host();\r\n</pre>\r\n<h2>Performance</h2>\r\nGiven how easy it is to use ArrayFire\'s computer vision code, the next question is \"how well does it perform?\" To answer this question we created a small benchmarking program which ran FAST and ORB on single frames from the Big Buck Bunny video on one of our machines with a NVIDIA K20 GPU. To benchmark the algorithms, we loaded the data into RAM (or to the GPU) prior to executing the core algorithms. The video frames were in 320p, 480p, 1080p, and 4k resolution. The results of our benchmarks are below:\r\n\r\n<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/05/ArrayFire-vs-OpenCV-FAST.png\"><img class=\"alignnone size-medium wp-image-8311\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/05/ArrayFire-vs-OpenCV-FAST-300x239.png\" alt=\"ArrayFire-vs-OpenCV-FAST\" width=\"300\" height=\"239\" /><img class=\"alignnone size-medium wp-image-8312\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/05/ArrayFire-vs-OpenCV-ORB-300x243.png\" alt=\"ArrayFire-vs-OpenCV-ORB\" width=\"300\" height=\"243\" /></a>\r\n\r\n&nbsp;\r\n\r\nArrayFire\'s implementation of FAST is about 10% faster than OpenCV for all but 4k video frame. Similarly, for ORB, ArrayFire is about 50% faster than OpenCV for all but the 4k video where ArrayFire falls slightly behind. We are presently exploring methods to improve ArrayFire\'s performance on the 4k video.','Feature detection and tracking using ArrayFire','','inherit','open','closed','','8299-revision-v1','','','2015-05-26 19:19:59','2015-05-26 19:19:59','',8299,'http://sandbox.arrayfire.com/8299-revision-v1/',0,'revision','',0),(8315,18528,'2015-05-26 19:20:29','2015-05-26 19:20:29','A few weeks ago we added some computer vision functionality to our open source <a href=\"http://sandbox.arrayfire.com/download\">ArrayFire GPU computing</a> library. Specifically, we implemented the <a href=\"http://www.springerlink.com/index/10.1007/11744023\">FAST</a> feature extractor, <a href=\"http://www.springerlink.com/index/10.1007/978-3-642-15561-1\">BRIEF</a> feature point descriptor, <a href=\"http://ieeexplore.ieee.org/lpdocs/epic03/wrapper.htm?arnumber=6126544\">ORB</a> multi-resolution scale invariant feature extractor, and a <a href=\"http://en.wikipedia.org/wiki/Hamming_distance\">Hamming distance</a> function. When combined, these functions enable you to find features in videos (or images) and track them between successive frames.\r\n\r\n<!--more-->\r\n\r\nHere is a quick video showing these functions executing on a few frames from the <a href=\"http://www.blender.org/\">Blender Foundation</a>\'s <a href=\"http://www.bigbuckbunny.org\">Big Buck Bunny</a> video:\r\n\r\n<iframe width=\"854\" height=\"510\" src=\"https://www.youtube.com/embed/sHHvORwgFQ4\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"></iframe>\r\n<h3>Using FAST and ORB</h3>\r\nNow that you have seen the functionality in action, how do you use these in your code? Assuming that you have a suitable function that can load your video frames in to ArrayFire \"array\" objects, it\'s pretty simple:\r\n<pre>// Run FAST on a frame and get the features:\r\naf::features fast_features = af::fast(frame, 20, 9, 1, 0.05f);\r\n</pre>\r\nThe `af::features` object is a special structure which contains the `(x,y)` location of the features, their scores, and the number of features. To get access to this information simply use the `getX()`, `getY()`, `getScore()`, and `getNumFeatures()` functions:\r\n<pre>af::array x_pos = fast_features.getX();\r\naf::array y_pos = fast_features.getY();\r\naf::array scores = fast_features.getScore();\r\nint N = fast_features.getNumFeatures();\r\n</pre>\r\nORB has a slightly different syntax:\r\n<pre>// Run ORB on a frame and get the features and descriptors\r\naf::features orb_features;\r\naf::array orb_descriptors;\r\naf::orb(orb_features, orb_descriptors, frame, 20, 1000, 1.2, 1, false);\r\n</pre>\r\nThe features from `ORB` may be accessed in the same fashion as `FAST` described above. The `orb_descriptors` variable is a Nx8 array containing extracted descriptors (read the <a href=\"http://ieeexplore.ieee.org/lpdocs/epic03/wrapper.htm?arnumber=6126544\">ORB paper</a> for further details on this structure).\r\n\r\nThe Hamming matcher I mention in the video is almost ready to be committed to our upstream development branch, so it is also worth mentioning how it can be used. Assuming you have a list of features from two sources called `a_features` and `b_features` respectively, you can compute their Hamming distance using ArrayFire as follows:\r\n<pre>af::array idx;\r\naf::array distances;\r\naf::array a_features;\r\naf::array b_features;\r\naf::hamming_matcher(idx, distances, a_features, b_features, 0, 1);\r\n</pre>\r\nThen you may get the indicies of features whose distance is less than, say 50, using ArrayFire\'s `where` operator. After you have these inidices, you can pick out these near-matching features pretty easily:\r\n<pre class=\"\">// select features with distances less than 50:\r\naf::array near_matches = where(dist &lt; 50);\r\n// and now extract information about those features:\r\narray a_feat_x = a_features.getX()(near_matches)\r\narray a_feat_y = a_features.getY()(near_matches)\r\n...\r\n</pre>\r\nBecause these are ArrayFire array objects, they exist in your GPU\'s (or other accelerator device\'s) memory. To get access to them within your host code, you need to get a copy of the data and place it somewhere in RAM:\r\n<pre class=\"\">float * features_x = a_feat_x.host();\r\nfloat * features_y = a_feat_y.host();\r\n</pre>\r\n<h3>Performance</h3>\r\nGiven how easy it is to use ArrayFire\'s computer vision code, the next question is \"how well does it perform?\" To answer this question we created a small benchmarking program which ran FAST and ORB on single frames from the Big Buck Bunny video on one of our machines with a NVIDIA K20 GPU. To benchmark the algorithms, we loaded the data into RAM (or to the GPU) prior to executing the core algorithms. The video frames were in 320p, 480p, 1080p, and 4k resolution. The results of our benchmarks are below:\r\n\r\n<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/05/ArrayFire-vs-OpenCV-FAST.png\"><img class=\"alignnone size-medium wp-image-8311\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/05/ArrayFire-vs-OpenCV-FAST-300x239.png\" alt=\"ArrayFire-vs-OpenCV-FAST\" width=\"300\" height=\"239\" /><img class=\"alignnone size-medium wp-image-8312\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/05/ArrayFire-vs-OpenCV-ORB-300x243.png\" alt=\"ArrayFire-vs-OpenCV-ORB\" width=\"300\" height=\"243\" /></a>\r\n\r\n&nbsp;\r\n\r\nArrayFire\'s implementation of FAST is about 10% faster than OpenCV for all but 4k video frame. Similarly, for ORB, ArrayFire is about 50% faster than OpenCV for all but the 4k video where ArrayFire falls slightly behind. We are presently exploring methods to improve ArrayFire\'s performance on the 4k video.','Feature detection and tracking using ArrayFire','','inherit','open','closed','','8299-revision-v1','','','2015-05-26 19:20:29','2015-05-26 19:20:29','',8299,'http://sandbox.arrayfire.com/8299-revision-v1/',0,'revision','',0),(8316,18528,'2015-05-26 19:21:45','2015-05-26 19:21:45','A few weeks ago we added some computer vision functionality to our open source <a href=\"http://sandbox.arrayfire.com/download\">ArrayFire GPU computing</a> library. Specifically, we implemented the <a href=\"http://www.springerlink.com/index/10.1007/11744023\">FAST</a> feature extractor, <a href=\"http://www.springerlink.com/index/10.1007/978-3-642-15561-1\">BRIEF</a> feature point descriptor, <a href=\"http://ieeexplore.ieee.org/lpdocs/epic03/wrapper.htm?arnumber=6126544\">ORB</a> multi-resolution scale invariant feature extractor, and a <a href=\"http://en.wikipedia.org/wiki/Hamming_distance\">Hamming distance</a> function. When combined, these functions enable you to find features in videos (or images) and track them between successive frames.\r\n\r\n<!--more-->\r\n\r\nHere is a quick video showing these functions executing on a few frames from the <a href=\"http://www.blender.org/\">Blender Foundation</a>\'s <a href=\"http://www.bigbuckbunny.org\">Big Buck Bunny</a> video:\r\n\r\n<iframe width=\"854\" height=\"510\" src=\"https://www.youtube.com/embed/sHHvORwgFQ4\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"></iframe>\r\n<h4>Using FAST and ORB</h4>\r\nNow that you have seen the functionality in action, how do you use these in your code? Assuming that you have a suitable function that can load your video frames in to ArrayFire \"array\" objects, it\'s pretty simple:\r\n<pre>// Run FAST on a frame and get the features:\r\naf::features fast_features = af::fast(frame, 20, 9, 1, 0.05f);\r\n</pre>\r\nThe `af::features` object is a special structure which contains the `(x,y)` location of the features, their scores, and the number of features. To get access to this information simply use the `getX()`, `getY()`, `getScore()`, and `getNumFeatures()` functions:\r\n<pre>af::array x_pos = fast_features.getX();\r\naf::array y_pos = fast_features.getY();\r\naf::array scores = fast_features.getScore();\r\nint N = fast_features.getNumFeatures();\r\n</pre>\r\nORB has a slightly different syntax:\r\n<pre>// Run ORB on a frame and get the features and descriptors\r\naf::features orb_features;\r\naf::array orb_descriptors;\r\naf::orb(orb_features, orb_descriptors, frame, 20, 1000, 1.2, 1, false);\r\n</pre>\r\nThe features from `ORB` may be accessed in the same fashion as `FAST` described above. The `orb_descriptors` variable is a Nx8 array containing extracted descriptors (read the <a href=\"http://ieeexplore.ieee.org/lpdocs/epic03/wrapper.htm?arnumber=6126544\">ORB paper</a> for further details on this structure).\r\n\r\nThe Hamming matcher I mention in the video is almost ready to be committed to our upstream development branch, so it is also worth mentioning how it can be used. Assuming you have a list of features from two sources called `a_features` and `b_features` respectively, you can compute their Hamming distance using ArrayFire as follows:\r\n<pre>af::array idx;\r\naf::array distances;\r\naf::array a_features;\r\naf::array b_features;\r\naf::hamming_matcher(idx, distances, a_features, b_features, 0, 1);\r\n</pre>\r\nThen you may get the indicies of features whose distance is less than, say 50, using ArrayFire\'s `where` operator. After you have these inidices, you can pick out these near-matching features pretty easily:\r\n<pre class=\"\">// select features with distances less than 50:\r\naf::array near_matches = where(dist &lt; 50);\r\n// and now extract information about those features:\r\narray a_feat_x = a_features.getX()(near_matches)\r\narray a_feat_y = a_features.getY()(near_matches)\r\n...\r\n</pre>\r\nBecause these are ArrayFire array objects, they exist in your GPU\'s (or other accelerator device\'s) memory. To get access to them within your host code, you need to get a copy of the data and place it somewhere in RAM:\r\n<pre class=\"\">float * features_x = a_feat_x.host();\r\nfloat * features_y = a_feat_y.host();\r\n</pre>\r\n<h4>Performance</h4>\r\nGiven how easy it is to use ArrayFire\'s computer vision code, the next question is \"how well does it perform?\" To answer this question we created a small benchmarking program which ran FAST and ORB on single frames from the Big Buck Bunny video on one of our machines with a NVIDIA K20 GPU. To benchmark the algorithms, we loaded the data into RAM (or to the GPU) prior to executing the core algorithms. The video frames were in 320p, 480p, 1080p, and 4k resolution. The results of our benchmarks are below:\r\n\r\n<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/05/ArrayFire-vs-OpenCV-FAST.png\"><img class=\"alignnone size-medium wp-image-8311\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/05/ArrayFire-vs-OpenCV-FAST-300x239.png\" alt=\"ArrayFire-vs-OpenCV-FAST\" width=\"300\" height=\"239\" /><img class=\"alignnone size-medium wp-image-8312\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/05/ArrayFire-vs-OpenCV-ORB-300x243.png\" alt=\"ArrayFire-vs-OpenCV-ORB\" width=\"300\" height=\"243\" /></a>\r\n\r\n&nbsp;\r\n\r\nArrayFire\'s implementation of FAST is about 10% faster than OpenCV for all but 4k video frame. Similarly, for ORB, ArrayFire is about 50% faster than OpenCV for all but the 4k video where ArrayFire falls slightly behind. We are presently exploring methods to improve ArrayFire\'s performance on the 4k video.','Feature detection and tracking using ArrayFire','','inherit','open','closed','','8299-revision-v1','','','2015-05-26 19:21:45','2015-05-26 19:21:45','',8299,'http://sandbox.arrayfire.com/8299-revision-v1/',0,'revision','',0),(8320,18528,'2015-05-26 19:26:47','2015-05-26 19:26:47','A few weeks ago we added some computer vision functionality to our open source <a href=\"http://sandbox.arrayfire.com/download\">ArrayFire GPU computing</a> library. Specifically, we implemented the <a href=\"http://www.springerlink.com/index/10.1007/11744023\">FAST</a> feature extractor, <a href=\"http://www.springerlink.com/index/10.1007/978-3-642-15561-1\">BRIEF</a> feature point descriptor, <a href=\"http://ieeexplore.ieee.org/lpdocs/epic03/wrapper.htm?arnumber=6126544\">ORB</a> multi-resolution scale invariant feature extractor, and a <a href=\"http://en.wikipedia.org/wiki/Hamming_distance\">Hamming distance</a> function. When combined, these functions enable you to find features in videos (or images) and track them between successive frames.\r\n\r\n<!--more-->\r\n\r\nHere is a quick video showing these functions executing on a few frames from the <a href=\"http://www.blender.org/\">Blender Foundation</a>\'s <a href=\"http://www.bigbuckbunny.org\">Big Buck Bunny</a> video:\r\n\r\n<iframe width=\"854\" height=\"510\" src=\"https://www.youtube.com/embed/sHHvORwgFQ4\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"></iframe>\r\n<h4>Using FAST and ORB</h4>\r\nNow that you have seen the functionality in action, how do you use these in your code? Assuming that you have a suitable function that can load your video frames in to ArrayFire \"array\" objects, it\'s pretty simple:\r\n<pre>// Run FAST on a frame and get the features:\r\naf::features fast_features = af::fast(frame, 20, 9, 1, 0.05f);\r\n</pre>\r\nThe `af::features` object is a special structure which contains the `(x,y)` location of the features, their scores, and the number of features. To get access to this information simply use the `getX()`, `getY()`, `getScore()`, and `getNumFeatures()` functions:\r\n<pre>af::array x_pos = fast_features.getX();\r\naf::array y_pos = fast_features.getY();\r\naf::array scores = fast_features.getScore();\r\nint N = fast_features.getNumFeatures();\r\n</pre>\r\nORB has a slightly different syntax:\r\n<pre>// Run ORB on a frame and get the features and descriptors\r\naf::features orb_features;\r\naf::array orb_descriptors;\r\naf::orb(orb_features, orb_descriptors, frame, 20, 1000, 1.2, 1, false);\r\n</pre>\r\nThe features from `ORB` may be accessed in the same fashion as `FAST` described above. The `orb_descriptors` variable is a Nx8 array containing extracted descriptors (read the <a href=\"http://ieeexplore.ieee.org/lpdocs/epic03/wrapper.htm?arnumber=6126544\">ORB paper</a> for further details on this structure).\r\n\r\nThe Hamming matcher I mention in the video is almost ready to be committed to our upstream development branch, so it is also worth mentioning how it can be used. Assuming you have a list of features from two sources called `a_features` and `b_features` respectively, you can compute their Hamming distance using ArrayFire as follows:\r\n<pre>af::array idx;\r\naf::array distances;\r\naf::array a_features;\r\naf::array b_features;\r\naf::hamming_matcher(idx, distances, a_features, b_features, 0, 1);\r\n</pre>\r\nThen you may get the indicies of features whose distance is less than, say 50, using ArrayFire\'s `where` operator. After you have these inidices, you can pick out these near-matching features pretty easily:\r\n<pre class=\"\">// select features with distances less than 50:\r\naf::array near_matches = where(dist &lt; 50);\r\n// and now extract information about those features:\r\narray a_feat_x = a_features.getX()(near_matches)\r\narray a_feat_y = a_features.getY()(near_matches)\r\n...\r\n</pre>\r\nBecause these are ArrayFire array objects, they exist in your GPU\'s (or other accelerator device\'s) memory. To get access to them within your host code, you need to get a copy of the data and place it somewhere in RAM:\r\n<pre class=\"\">float * features_x = a_feat_x.host();\r\nfloat * features_y = a_feat_y.host();\r\n</pre>\r\n<h4>Performance</h4>\r\nGiven how easy it is to use ArrayFire\'s computer vision code, the next question is \"how well does it perform?\" To answer this question we created a small benchmarking program which ran FAST and ORB on single frames from the Big Buck Bunny video on one of our machines with a NVIDIA K20 GPU. To benchmark the algorithms, we loaded the data into RAM (or to the GPU) prior to executing the core algorithms. The video frames were in 320p, 480p, 1080p, and 4k resolution. The results of our benchmarks are below:\r\n\r\n<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/05/ArrayFire-vs-OpenCV-FAST.png\"><img class=\"aligncenter wp-image-8311 size-full\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/05/ArrayFire-vs-OpenCV-FAST-e1432668237331.png\" alt=\"ArrayFire-vs-OpenCV-FAST\" width=\"400\" height=\"319\" /></a>\r\n\r\nAbove you see the throughput (in images/second) as a function of image height (for 16:9 aspect video frames) for the FAST corner detection algorithm. ArrayFire\'s implementation of FAST is about 10% faster than OpenCV for all but 4k video frames.\r\n\r\n<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/05/ArrayFire-vs-OpenCV-FAST.png\"><img class=\"aligncenter wp-image-8312 size-full\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/05/ArrayFire-vs-OpenCV-ORB-e1432668305827.png\" alt=\"ArrayFire-vs-OpenCV-ORB\" width=\"400\" height=\"324\" /></a>\r\n\r\nSimilarly, ArrayFire\'s implementation of ORB is about 50% faster than OpenCV for all but the 4k video where ArrayFire falls slightly behind. We are presently exploring methods to improve ArrayFire\'s performance on the 4k video.','Feature detection and tracking using ArrayFire','','inherit','open','closed','','8299-revision-v1','','','2015-05-26 19:26:47','2015-05-26 19:26:47','',8299,'http://sandbox.arrayfire.com/8299-revision-v1/',0,'revision','',0),(8321,18528,'2015-05-26 19:27:58','2015-05-26 19:27:58','A few weeks ago we added some computer vision functionality to our open source <a href=\"http://sandbox.arrayfire.com/download\">ArrayFire GPU computing</a> library. Specifically, we implemented the <a href=\"http://www.springerlink.com/index/10.1007/11744023\">FAST</a> feature extractor, <a href=\"http://www.springerlink.com/index/10.1007/978-3-642-15561-1\">BRIEF</a> feature point descriptor, <a href=\"http://ieeexplore.ieee.org/lpdocs/epic03/wrapper.htm?arnumber=6126544\">ORB</a> multi-resolution scale invariant feature extractor, and a <a href=\"http://en.wikipedia.org/wiki/Hamming_distance\">Hamming distance</a> function. When combined, these functions enable you to find features in videos (or images) and track them between successive frames.\r\n\r\n<!--more-->\r\n\r\nHere is a quick video showing these functions executing on a few frames from the <a href=\"http://www.blender.org/\">Blender Foundation</a>\'s <a href=\"http://www.bigbuckbunny.org\">Big Buck Bunny</a> video:\r\n\r\n<iframe width=\"854\" height=\"510\" src=\"https://www.youtube.com/embed/sHHvORwgFQ4\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"></iframe>\r\n<h4>Using FAST and ORB</h4>\r\nNow that you have seen the functionality in action, how do you use these in your code? Assuming that you have a suitable function that can load your video frames in to ArrayFire \"array\" objects, it\'s pretty simple:\r\n<pre>// Run FAST on a frame and get the features:\r\naf::features fast_features = af::fast(frame, 20, 9, 1, 0.05f);\r\n</pre>\r\nThe `af::features` object is a special structure which contains the `(x,y)` location of the features, their scores, and the number of features. To get access to this information simply use the `getX()`, `getY()`, `getScore()`, and `getNumFeatures()` functions:\r\n<pre>af::array x_pos = fast_features.getX();\r\naf::array y_pos = fast_features.getY();\r\naf::array scores = fast_features.getScore();\r\nint N = fast_features.getNumFeatures();\r\n</pre>\r\nORB has a slightly different syntax:\r\n<pre>// Run ORB on a frame and get the features and descriptors\r\naf::features orb_features;\r\naf::array orb_descriptors;\r\naf::orb(orb_features, orb_descriptors, frame, 20, 1000, 1.2, 1, false);\r\n</pre>\r\nThe features from `ORB` may be accessed in the same fashion as `FAST` described above. The `orb_descriptors` variable is a Nx8 array containing extracted descriptors (read the <a href=\"http://ieeexplore.ieee.org/lpdocs/epic03/wrapper.htm?arnumber=6126544\">ORB paper</a> for further details on this structure).\r\n\r\nThe Hamming matcher I mention in the video is almost ready to be committed to our upstream development branch, so it is also worth mentioning how it can be used. Assuming you have a list of features from two sources called `a_features` and `b_features` respectively, you can compute their Hamming distance using ArrayFire as follows:\r\n<pre>af::array idx;\r\naf::array distances;\r\naf::array a_features;\r\naf::array b_features;\r\naf::hamming_matcher(idx, distances, a_features, b_features, 0, 1);\r\n</pre>\r\nThen you may get the indicies of features whose distance is less than, say 50, using ArrayFire\'s `where` operator. After you have these inidices, you can pick out these near-matching features pretty easily:\r\n<pre class=\"\">// select features with distances less than 50:\r\naf::array near_matches = where(dist &lt; 50);\r\n// and now extract information about those features:\r\narray a_feat_x = a_features.getX()(near_matches)\r\narray a_feat_y = a_features.getY()(near_matches)\r\n...\r\n</pre>\r\nBecause these are ArrayFire array objects, they exist in your GPU\'s (or other accelerator device\'s) memory. To get access to them within your host code, you need to get a copy of the data and place it somewhere in RAM:\r\n<pre class=\"\">float * features_x = a_feat_x.host();\r\nfloat * features_y = a_feat_y.host();\r\n</pre>\r\n<h4>Performance</h4>\r\nGiven how easy it is to use ArrayFire\'s computer vision code, the next question is \"how well does it perform?\" To answer this question we created a small benchmarking program which ran FAST and ORB on single frames from the Big Buck Bunny video on one of our machines with a NVIDIA K20 GPU using ArrayFire\'s and OpenCV\'s CUDA implementations.. To benchmark the algorithms, we loaded the data into RAM (or to the GPU) prior to executing the core algorithms. The video frames were in 320p, 480p, 1080p, and 4k resolution. The results of our benchmarks are below:\r\n\r\n<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/05/ArrayFire-vs-OpenCV-FAST.png\"><img class=\"aligncenter wp-image-8311 size-full\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/05/ArrayFire-vs-OpenCV-FAST-e1432668237331.png\" alt=\"ArrayFire-vs-OpenCV-FAST\" width=\"400\" height=\"319\" /></a>\r\n\r\nAbove you see the throughput (in images/second) as a function of image height (for 16:9 aspect video frames) for the FAST corner detection algorithm. ArrayFire\'s implementation of FAST is about 10% faster than OpenCV for all but 4k video frames.\r\n\r\n<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/05/ArrayFire-vs-OpenCV-FAST.png\"><img class=\"aligncenter wp-image-8312 size-full\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/05/ArrayFire-vs-OpenCV-ORB-e1432668305827.png\" alt=\"ArrayFire-vs-OpenCV-ORB\" width=\"400\" height=\"324\" /></a>\r\n\r\nSimilarly, ArrayFire\'s implementation of ORB is about 50% faster than OpenCV for all but the 4k video where ArrayFire falls slightly behind. We are presently exploring methods to improve ArrayFire\'s performance on the 4k video.','Feature detection and tracking using ArrayFire','','inherit','open','closed','','8299-revision-v1','','','2015-05-26 19:27:58','2015-05-26 19:27:58','',8299,'http://sandbox.arrayfire.com/8299-revision-v1/',0,'revision','',0),(8322,18528,'2015-05-26 19:29:06','2015-05-26 19:29:06','A few weeks ago we added some computer vision functionality to our open source <a href=\"http://sandbox.arrayfire.com/download\">ArrayFire GPU computing</a> library. Specifically, we implemented the <a href=\"http://www.springerlink.com/index/10.1007/11744023\">FAST</a> feature extractor, <a href=\"http://www.springerlink.com/index/10.1007/978-3-642-15561-1\">BRIEF</a> feature point descriptor, <a href=\"http://ieeexplore.ieee.org/lpdocs/epic03/wrapper.htm?arnumber=6126544\">ORB</a> multi-resolution scale invariant feature extractor, and a <a href=\"http://en.wikipedia.org/wiki/Hamming_distance\">Hamming distance</a> function. When combined, these functions enable you to find features in videos (or images) and track them between successive frames.\r\n\r\n<!--more-->\r\n<h4>FAST and ORB: a demonstration</h4>\r\nHere is a quick video showing these functions executing on a few frames from the <a href=\"http://www.blender.org/\">Blender Foundation</a>\'s <a href=\"http://www.bigbuckbunny.org\">Big Buck Bunny</a> video:\r\n\r\n<iframe width=\"854\" height=\"510\" src=\"https://www.youtube.com/embed/sHHvORwgFQ4\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"></iframe>\r\n<h4>Using FAST and ORB</h4>\r\nNow that you have seen the functionality in action, how do you use these in your code? Assuming that you have a suitable function that can load your video frames in to ArrayFire \"array\" objects, it\'s pretty simple:\r\n<pre>// Run FAST on a frame and get the features:\r\naf::features fast_features = af::fast(frame, 20, 9, 1, 0.05f);\r\n</pre>\r\nThe `af::features` object is a special structure which contains the `(x,y)` location of the features, their scores, and the number of features. To get access to this information simply use the `getX()`, `getY()`, `getScore()`, and `getNumFeatures()` functions:\r\n<pre>af::array x_pos = fast_features.getX();\r\naf::array y_pos = fast_features.getY();\r\naf::array scores = fast_features.getScore();\r\nint N = fast_features.getNumFeatures();\r\n</pre>\r\nORB has a slightly different syntax:\r\n<pre>// Run ORB on a frame and get the features and descriptors\r\naf::features orb_features;\r\naf::array orb_descriptors;\r\naf::orb(orb_features, orb_descriptors, frame, 20, 1000, 1.2, 1, false);\r\n</pre>\r\nThe features from `ORB` may be accessed in the same fashion as `FAST` described above. The `orb_descriptors` variable is a Nx8 array containing extracted descriptors (read the <a href=\"http://ieeexplore.ieee.org/lpdocs/epic03/wrapper.htm?arnumber=6126544\">ORB paper</a> for further details on this structure).\r\n\r\nThe Hamming matcher I mention in the video is almost ready to be committed to our upstream development branch, so it is also worth mentioning how it can be used. Assuming you have a list of features from two sources called `a_features` and `b_features` respectively, you can compute their Hamming distance using ArrayFire as follows:\r\n<pre>af::array idx;\r\naf::array distances;\r\naf::array a_features;\r\naf::array b_features;\r\naf::hamming_matcher(idx, distances, a_features, b_features, 0, 1);\r\n</pre>\r\nThen you may get the indicies of features whose distance is less than, say 50, using ArrayFire\'s `where` operator. After you have these inidices, you can pick out these near-matching features pretty easily:\r\n<pre class=\"\">// select features with distances less than 50:\r\naf::array near_matches = where(dist &lt; 50);\r\n// and now extract information about those features:\r\narray a_feat_x = a_features.getX()(near_matches)\r\narray a_feat_y = a_features.getY()(near_matches)\r\n...\r\n</pre>\r\nBecause these are ArrayFire array objects, they exist in your GPU\'s (or other accelerator device\'s) memory. To get access to them within your host code, you need to get a copy of the data and place it somewhere in RAM:\r\n<pre class=\"\">float * features_x = a_feat_x.host();\r\nfloat * features_y = a_feat_y.host();\r\n</pre>\r\n<h4>Performance</h4>\r\nGiven how easy it is to use ArrayFire\'s computer vision code, the next question is \"how well does it perform?\" To answer this question we created a small benchmarking program which ran FAST and ORB on single frames from the Big Buck Bunny video on one of our machines with a NVIDIA K20 GPU using ArrayFire\'s and OpenCV\'s CUDA implementations.. To benchmark the algorithms, we loaded the data into RAM (or to the GPU) prior to executing the core algorithms. The video frames were in 320p, 480p, 1080p, and 4k resolution. The results of our benchmarks are below:\r\n\r\n<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/05/ArrayFire-vs-OpenCV-FAST.png\"><img class=\"aligncenter wp-image-8311 size-full\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/05/ArrayFire-vs-OpenCV-FAST-e1432668237331.png\" alt=\"ArrayFire-vs-OpenCV-FAST\" width=\"400\" height=\"319\" /></a>\r\n\r\nAbove you see the throughput (in images/second) as a function of image height (for 16:9 aspect video frames) for the FAST corner detection algorithm. ArrayFire\'s implementation of FAST is about 10% faster than OpenCV for all but 4k video frames.\r\n\r\n<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/05/ArrayFire-vs-OpenCV-FAST.png\"><img class=\"aligncenter wp-image-8312 size-full\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/05/ArrayFire-vs-OpenCV-ORB-e1432668305827.png\" alt=\"ArrayFire-vs-OpenCV-ORB\" width=\"400\" height=\"324\" /></a>\r\n\r\nSimilarly, ArrayFire\'s implementation of ORB is about 50% faster than OpenCV for all but the 4k video where ArrayFire falls slightly behind. We are presently exploring methods to improve ArrayFire\'s performance on the 4k video.','Feature detection and tracking using ArrayFire','','inherit','open','closed','','8299-revision-v1','','','2015-05-26 19:29:06','2015-05-26 19:29:06','',8299,'http://sandbox.arrayfire.com/8299-revision-v1/',0,'revision','',0),(8323,18528,'2015-05-26 19:29:18','2015-05-26 19:29:18','A few weeks ago we added some computer vision functionality to our open source <a href=\"http://sandbox.arrayfire.com/download\">ArrayFire GPU computing</a> library. Specifically, we implemented the <a href=\"http://www.springerlink.com/index/10.1007/11744023\">FAST</a> feature extractor, <a href=\"http://www.springerlink.com/index/10.1007/978-3-642-15561-1\">BRIEF</a> feature point descriptor, <a href=\"http://ieeexplore.ieee.org/lpdocs/epic03/wrapper.htm?arnumber=6126544\">ORB</a> multi-resolution scale invariant feature extractor, and a <a href=\"http://en.wikipedia.org/wiki/Hamming_distance\">Hamming distance</a> function. When combined, these functions enable you to find features in videos (or images) and track them between successive frames.\r\n\r\n<!--more-->\r\n<h4>FAST and ORB in ArrayFire: a demonstration</h4>\r\nHere is a quick video showing these functions executing on a few frames from the <a href=\"http://www.blender.org/\">Blender Foundation</a>\'s <a href=\"http://www.bigbuckbunny.org\">Big Buck Bunny</a> video:\r\n\r\n<iframe width=\"854\" height=\"510\" src=\"https://www.youtube.com/embed/sHHvORwgFQ4\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"></iframe>\r\n<h4>Using FAST and ORB</h4>\r\nNow that you have seen the functionality in action, how do you use these in your code? Assuming that you have a suitable function that can load your video frames in to ArrayFire \"array\" objects, it\'s pretty simple:\r\n<pre>// Run FAST on a frame and get the features:\r\naf::features fast_features = af::fast(frame, 20, 9, 1, 0.05f);\r\n</pre>\r\nThe `af::features` object is a special structure which contains the `(x,y)` location of the features, their scores, and the number of features. To get access to this information simply use the `getX()`, `getY()`, `getScore()`, and `getNumFeatures()` functions:\r\n<pre>af::array x_pos = fast_features.getX();\r\naf::array y_pos = fast_features.getY();\r\naf::array scores = fast_features.getScore();\r\nint N = fast_features.getNumFeatures();\r\n</pre>\r\nORB has a slightly different syntax:\r\n<pre>// Run ORB on a frame and get the features and descriptors\r\naf::features orb_features;\r\naf::array orb_descriptors;\r\naf::orb(orb_features, orb_descriptors, frame, 20, 1000, 1.2, 1, false);\r\n</pre>\r\nThe features from `ORB` may be accessed in the same fashion as `FAST` described above. The `orb_descriptors` variable is a Nx8 array containing extracted descriptors (read the <a href=\"http://ieeexplore.ieee.org/lpdocs/epic03/wrapper.htm?arnumber=6126544\">ORB paper</a> for further details on this structure).\r\n\r\nThe Hamming matcher I mention in the video is almost ready to be committed to our upstream development branch, so it is also worth mentioning how it can be used. Assuming you have a list of features from two sources called `a_features` and `b_features` respectively, you can compute their Hamming distance using ArrayFire as follows:\r\n<pre>af::array idx;\r\naf::array distances;\r\naf::array a_features;\r\naf::array b_features;\r\naf::hamming_matcher(idx, distances, a_features, b_features, 0, 1);\r\n</pre>\r\nThen you may get the indicies of features whose distance is less than, say 50, using ArrayFire\'s `where` operator. After you have these inidices, you can pick out these near-matching features pretty easily:\r\n<pre class=\"\">// select features with distances less than 50:\r\naf::array near_matches = where(dist &lt; 50);\r\n// and now extract information about those features:\r\narray a_feat_x = a_features.getX()(near_matches)\r\narray a_feat_y = a_features.getY()(near_matches)\r\n...\r\n</pre>\r\nBecause these are ArrayFire array objects, they exist in your GPU\'s (or other accelerator device\'s) memory. To get access to them within your host code, you need to get a copy of the data and place it somewhere in RAM:\r\n<pre class=\"\">float * features_x = a_feat_x.host();\r\nfloat * features_y = a_feat_y.host();\r\n</pre>\r\n<h4>Performance</h4>\r\nGiven how easy it is to use ArrayFire\'s computer vision code, the next question is \"how well does it perform?\" To answer this question we created a small benchmarking program which ran FAST and ORB on single frames from the Big Buck Bunny video on one of our machines with a NVIDIA K20 GPU using ArrayFire\'s and OpenCV\'s CUDA implementations.. To benchmark the algorithms, we loaded the data into RAM (or to the GPU) prior to executing the core algorithms. The video frames were in 320p, 480p, 1080p, and 4k resolution. The results of our benchmarks are below:\r\n\r\n<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/05/ArrayFire-vs-OpenCV-FAST.png\"><img class=\"aligncenter wp-image-8311 size-full\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/05/ArrayFire-vs-OpenCV-FAST-e1432668237331.png\" alt=\"ArrayFire-vs-OpenCV-FAST\" width=\"400\" height=\"319\" /></a>\r\n\r\nAbove you see the throughput (in images/second) as a function of image height (for 16:9 aspect video frames) for the FAST corner detection algorithm. ArrayFire\'s implementation of FAST is about 10% faster than OpenCV for all but 4k video frames.\r\n\r\n<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/05/ArrayFire-vs-OpenCV-FAST.png\"><img class=\"aligncenter wp-image-8312 size-full\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/05/ArrayFire-vs-OpenCV-ORB-e1432668305827.png\" alt=\"ArrayFire-vs-OpenCV-ORB\" width=\"400\" height=\"324\" /></a>\r\n\r\nSimilarly, ArrayFire\'s implementation of ORB is about 50% faster than OpenCV for all but the 4k video where ArrayFire falls slightly behind. We are presently exploring methods to improve ArrayFire\'s performance on the 4k video.','Feature detection and tracking using ArrayFire','','inherit','open','closed','','8299-revision-v1','','','2015-05-26 19:29:18','2015-05-26 19:29:18','',8299,'http://sandbox.arrayfire.com/8299-revision-v1/',0,'revision','',0),(8324,18528,'2015-05-26 19:37:00','2015-05-26 19:37:00','A few weeks ago we added some computer vision functionality to our open source <a href=\"http://sandbox.arrayfire.com/download\">ArrayFire GPU computing</a> library. Specifically, we implemented the <a href=\"http://www.springerlink.com/index/10.1007/11744023\">FAST</a> feature extractor, <a href=\"http://www.springerlink.com/index/10.1007/978-3-642-15561-1\">BRIEF</a> feature point descriptor, <a href=\"http://ieeexplore.ieee.org/lpdocs/epic03/wrapper.htm?arnumber=6126544\">ORB</a> multi-resolution scale invariant feature extractor, and a <a href=\"http://en.wikipedia.org/wiki/Hamming_distance\">Hamming distance</a> function. When combined, these functions enable you to find features in videos (or images) and track them between successive frames.\r\n\r\n<!--more-->\r\n<h4>FAST and ORB in ArrayFire: a demonstration</h4>\r\nHere is a quick video showing these functions executing on a few frames from the <a href=\"http://www.blender.org/\">Blender Foundation</a>\'s <a href=\"http://www.bigbuckbunny.org\">Big Buck Bunny</a> video:\r\n\r\n<iframe width=\"854\" height=\"510\" src=\"https://www.youtube.com/embed/sHHvORwgFQ4\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"></iframe>\r\n<h4>Using FAST and ORB</h4>\r\nNow that you have seen the functionality in action, how do you use these in your code? Assuming that you have a suitable function that can load your video frames in to ArrayFire \"array\" objects, it\'s pretty simple. To use FAST simply call the fast function:\r\n<pre>// Run FAST on a frame and get the features:\r\naf::features fast_features = af::fast(frame, 20, 9, 1, 0.05f);\r\n</pre>\r\nThe `af::features` object is a special structure which contains the `(x,y)` location of the features, their scores, and the number of features. To get access to this information simply use the `getX()`, `getY()`, `getScore()`, and `getNumFeatures()` functions:\r\n<pre>af::array x_pos = fast_features.getX();\r\naf::array y_pos = fast_features.getY();\r\naf::array scores = fast_features.getScore();\r\nint N = fast_features.getNumFeatures();\r\n</pre>\r\nORB has a slightly different syntax:\r\n<pre>// Run ORB on a frame and get the features and descriptors\r\naf::features orb_features;\r\naf::array orb_descriptors;\r\naf::orb(orb_features, orb_descriptors, frame, 20, 1000, 1.2, 1, false);\r\n</pre>\r\nThe features from `ORB` may be accessed in the same fashion as `FAST` described above. The `orb_descriptors` variable is a Nx8 array containing extracted descriptors (read the <a href=\"http://ieeexplore.ieee.org/lpdocs/epic03/wrapper.htm?arnumber=6126544\">ORB paper</a> for further details on this structure).\r\n\r\nThe Hamming matcher I mention in the video is almost ready to be committed to our upstream development branch, so it is also worth mentioning how it can be used. Assuming you have a list of features from two sources called `a_features` and `b_features` respectively, you can compute their Hamming distance using ArrayFire as follows:\r\n<pre>af::array idx;\r\naf::array distances;\r\naf::array a_features;\r\naf::array b_features;\r\naf::hamming_matcher(idx, distances, a_features, b_features, 0, 1);\r\n</pre>\r\nThen you may get the indicies of features whose distance is less than, say 50, using ArrayFire\'s `where` operator. After you have these inidices, you can pick out these near-matching features pretty easily:\r\n<pre class=\"\">// select features with distances less than 50:\r\naf::array near_matches = where(dist &lt; 50);\r\n// and now extract information about those features:\r\narray a_feat_x = a_features.getX()(near_matches)\r\narray a_feat_y = a_features.getY()(near_matches)\r\n...\r\n</pre>\r\nBecause these are ArrayFire array objects, they exist in your GPU\'s (or other accelerator device\'s) memory. To get access to them within your host code, you need to get a copy of the data and place it somewhere in RAM:\r\n<pre class=\"\">float * features_x = a_feat_x.host();\r\nfloat * features_y = a_feat_y.host();\r\n</pre>\r\nFor further information about ArrayFire\'s <a href=\"http://www.sandbox.arrayfire.com/docs/group__cv__func__fast.htm\">FAST</a> and <a href=\"http://www.sandbox.arrayfire.com/docs/group__cv__func__orb.htm\">ORB</a> implementations, please see the ArrayFire\'s <a href=\"http://sandbox.arrayfire.com/docs/group__cv__mat.htm\">computer vision function documentation</a>.\r\n<h4>Performance</h4>\r\nGiven how easy it is to use ArrayFire\'s computer vision code, the next question is \"how well does it perform?\" To answer this question we created a small benchmarking program which ran FAST and ORB on single frames from the Big Buck Bunny video on one of our machines with a NVIDIA K20 GPU using ArrayFire\'s and OpenCV\'s CUDA implementations.. To benchmark the algorithms, we loaded the data into RAM (or to the GPU) prior to executing the core algorithms. The video frames were in 320p, 480p, 1080p, and 4k resolution. The results of our benchmarks are below:\r\n\r\n<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/05/ArrayFire-vs-OpenCV-FAST.png\"><img class=\"aligncenter wp-image-8311 size-full\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/05/ArrayFire-vs-OpenCV-FAST-e1432668237331.png\" alt=\"ArrayFire-vs-OpenCV-FAST\" width=\"400\" height=\"319\" /></a>\r\n\r\nAbove you see the throughput (in images/second) as a function of image height (for 16:9 aspect video frames) for the FAST corner detection algorithm. ArrayFire\'s implementation of FAST is about 10% faster than OpenCV for all but 4k video frames.\r\n\r\n<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/05/ArrayFire-vs-OpenCV-FAST.png\"><img class=\"aligncenter wp-image-8312 size-full\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/05/ArrayFire-vs-OpenCV-ORB-e1432668305827.png\" alt=\"ArrayFire-vs-OpenCV-ORB\" width=\"400\" height=\"324\" /></a>\r\n\r\nSimilarly, ArrayFire\'s implementation of ORB is about 50% faster than OpenCV for all but the 4k video where ArrayFire falls slightly behind. We are presently exploring methods to improve ArrayFire\'s performance on the 4k video.','Feature detection and tracking using ArrayFire','','inherit','open','closed','','8299-revision-v1','','','2015-05-26 19:37:00','2015-05-26 19:37:00','',8299,'http://sandbox.arrayfire.com/8299-revision-v1/',0,'revision','',0),(8327,7,'2015-06-01 18:23:58','2015-06-01 18:23:58','[content_band inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"10px\" padding_bottom=\"40px\"][column type=\"one-half\"][custom_headline type=\"left\" level=\"h2\"]Call the ArrayFire team[/custom_headline]\r\n\r\nHire us to accelerate your code, train your pros, or even write new code for your organization!\r\n\r\nWe’ve already helped thousands of organizations speed up their code. We’ve accelerated algorithms,  sped up data sets, and solved challenging problems of all types in the past, and we’re confident that we can accelerate your code, too.\r\n\r\nStart by setting up a free consultation to discuss your project with an ArrayFire expert today!\r\n\r\n[gap size=\"5%\"][button  type=\"flat\" shape=\"rounded\" href=\"http://meetme.so/arrayfire\" size=\"normal\" ]Schedule a consultation[/button][/column][column type=\"one-half\" last=\"true\" class=\"center-text\"][gap size=\"15%\"]<img class=\"aligncenter wp-image-462\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/Bat-signal.png\" alt=\"Bat signal\" width=\"700\" height=\"437\" />[/column][gap size=\"2%\"][/content_band][content_band bg_color=\"#f2f2f2\" inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"10px\" padding_bottom=\"40px\"]\r\n\r\n[column type=\"one-half\"] [custom_headline type=\"left\" level=\"h2\"]Starter Package ($799) [/custom_headline] Hire us for a single day. We\'ll match you with one engineer dedicated for a full day, supported by senior and test engineers throughout the day. Here\'s how it works:\r\n\r\n[icon_list] [icon_list_item type=\"angle-double-right\"]We conduct an initial phone call.[/icon_list_item] [icon_list_item type=\"angle-double-right\"]You send us your code or algorithm. [/icon_list_item] [icon_list_item type=\"angle-double-right\"]We analyze your code for potential GPU benefit.[/icon_list_item][icon_list_item type=\"angle-double-right\"]We accelerate as much of your code as is possible within the one-day effort, applying our extensive GPU software libraries.[/icon_list_item][icon_list_item type=\"angle-double-right\"]We produce a final report for you, along with your optimized code.[/icon_list_item] [/icon_list] The final report outlines the best approach to follow for full GPU-acceleration of your code.\r\n\r\n[button type=\"flat\"  shape=\"rounded\" size=\"regular\" href=\"http://sandbox.arrayfire.com/product-category/starter-package/\" title=\"Starter Package\"]Get the Starter Package[/button]\r\n\r\n&nbsp;\r\n\r\n[/column][column type=\"one-half\" last=\"true\" ][gap size=\"15%\"]<img class=\"aligncenter wp-image-4962\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/02/Benchmark-guy-torso-opposite.png\" alt=\"Benchmark guy, torso opposite\" width=\"450\" height=\"397\" />[/column]\r\n<div></div>\r\n[/content_band]\r\n\r\n[content_band inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"10px\" padding_bottom=\"40px\" ]\r\n\r\n[column type=\"one-half\"]\r\n\r\n&nbsp;\r\n\r\n[gap size=\"12%\"]\r\n\r\n<img class=\"aligncenter size-large wp-image-5100\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/Triumvirate_Exported-1024x599.png\" alt=\"Triumvirate_Exported\" width=\"742\" height=\"434\" />[/column]\r\n\r\n[column type=\"one-half\"  last=\"true\" ]\r\n\r\n[custom_headline type=\"left\" level=\"h2\" ]Custom coding[/custom_headline]\r\n\r\nYour hardware can do anything, given the right code. Getting that code right can be tricky when your team is swamped in work or when you\'re new to parallel programming. Bring us in—our team is capable of writing custom code that\'s as unique as your work and tailored to your task. Here\'s what we bring to the table:\r\n\r\n[icon_list] [icon_list_item type=\"angle-double-right\"]Excellence in GPU code[/icon_list_item] [icon_list_item type=\"angle-double-right\"]Well-written, efficient C, C++, Fortran, Java, or .NET [/icon_list_item] [icon_list_item type=\"angle-double-right\"]Application porting and integration[/icon_list_item][icon_list_item type=\"angle-double-right\"]Tuning software to peak hardware performance[/icon_list_item][icon_list_item type=\"angle-double-right\"]Scalability of algorithms to handle enterprise-level programs[/icon_list_item] [/icon_list][button  type=\"flat\" shape=\"rounded\" href=\"http://meetme.so/arrayfire\" size=\"regular\" ]Schedule a consultation[/button][/column] [/content_band]\r\n\r\n[content_band bg_color=\"#f2f2f2\" inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"10px\" padding_bottom=\"40px\"][custom_headline type=\"left\"  level=\"h2\" ]Case studies[/custom_headline][gap size=\"4%\"]\r\n\r\n[column type=\"one-half\"][promo image=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/10/glasses-logo-promo-01.png\" alt=\"Glasses.com\"]The Glasses.com app relies on computer vision to recognize the features of a user’s face. The application then generates an accurate, high-fidelity, three-dimensional model of that face, and virtually places selected frames on the image.\r\n<p style=\"text-align: center;\">[button type=\"flat\" shape=\"rounded\" href=\"http://sandbox.arrayfire.com/case-study-glasses-com-app-with-3dfit-technology/\" size=\"regular\" ]Read the case study[/button][/promo][/column]</p>\r\n[column type=\"one-half\" last=\"true\"][promo image=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/10/reveal-logo-promo-01.png\" alt=\"Reveal Imaging\"]Reveal Imaging, an SAIC company, uses ArrayFire in developing threat-detection products for transportation systems—such as cargo and baggage screening in airports—and in securing facilities and public events.\r\n<p style=\"text-align: center;\">[button type=\"flat\" shape=\"rounded\" href=\"http://sandbox.arrayfire.com/case-study-reveal-imaging/\" size=\"regular\" ]Read the case study[/button][/promo][/column][/content_band]</p>','Consulting','','inherit','open','closed','','6634-revision-v1','','','2015-06-01 18:23:58','2015-06-01 18:23:58','',6634,'http://sandbox.arrayfire.com/6634-revision-v1/',0,'revision','',0),(8328,7,'2015-06-01 18:42:15','2015-06-01 18:42:15','[content_band inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"10px\" padding_bottom=\"40px\"][column type=\"one-half\" ][custom_headline type=\"left\" level=\"h2\" ]Faster code[/custom_headline]\r\n\r\nArrayFire allows your code to run its fastest. It beats efforts to manually write CUDA or OpenCL kernels. It beats compiler optimizations. It beats other libraries. ArrayFire is the simply best way to accelerate your code.\r\n\r\nWant proof? Check out our benchmarks. All benchmarks were performed on a NVIDIA Tesla C2050 with an Intel i7-950 processor (updates coming soon). The benchmarks compare ArrayFire with several popular CPU-based acceleration libraries, including <a href=\"http://software.intel.com/en-us/articles/intel-mkl/\" target=\"_new\">Intel Math Kernel Library</a>, <a href=\"http://software.intel.com/en-us/articles/intel-ipp/\" target=\"_new\">Intel Integrated Performance Primitives</a>, <a href=\"http://eigen.tuxfamily.org/index.php?title=Main_Page\" target=\"_new\">Eigen</a>, and <a href=\"http://arma.sourceforge.net/\" target=\"_new\">Armadillo</a>.\r\n\r\n[button type=\"flat\" shape=\"rounded\" size=\"regular\" href=\"http://sandbox.arrayfire.com/download\" title=\"Download now!\"]Download ArrayFire[/button]\r\n\r\n&nbsp;\r\n\r\n[/column]\r\n\r\n[column type=\"one-half\"  last=\"true\" fade=\"true\" fade_animation=\"in-from-left\" ][gap size=\"10%\"][tab_nav type=\"four-up\"][tab_nav_item title=\"Base\" active=\"true\"][tab_nav_item title=\"Linear Algebra\" active=\"\"][tab_nav_item title=\"Convolution\" active=\"\"][tab_nav_item title=\"Utility\" active=\"\"][/tab_nav][tabs][tab active=\"true\"][accordion id=\"my-accordion\"] [accordion_item title=\"Matrix Multiply\" parent_id=\"my-accordion\"]<img class=\"aligncenter wp-image-351 size-full\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/matrix_multiply-e1409845945961.png\" alt=\"Matrix Multiply\" width=\"482\" height=\"344\" />[/accordion_item] [accordion_item title=\"Matrix Transpose\" parent_id=\"my-accordion\"]<img class=\"aligncenter wp-image-352 size-full\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/matrix_transpose-e1409846117548.png\" alt=\"Matrix Transpose\" width=\"482\" height=\"344\" />[/accordion_item] [accordion_item title=\"FFT\" parent_id=\"my-accordion\"]<img class=\"aligncenter wp-image-349 size-full\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/fft-e1409846374468.png\" alt=\"FFT\" width=\"491\" height=\"350\" />[/accordion_item][/accordion][/tab][tab][accordion id=\"my-accordion\"] [accordion_item title=\"LU\" parent_id=\"my-accordion\"]<img class=\"aligncenter size-full wp-image-350\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/lu-e1409846254351.png\" alt=\"LU\" width=\"491\" height=\"350\" />[/accordion_item] [accordion_item title=\"SVD\" parent_id=\"my-accordion\"]<img class=\"aligncenter size-full wp-image-357\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/svd-e1409846164788.png\" alt=\"SVD\" width=\"491\" height=\"350\" />[/accordion_item] [accordion_item title=\"Solve: Ax=b\" parent_id=\"my-accordion\"]<img class=\"aligncenter size-full wp-image-354\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/solve-e1409846072990.png\" alt=\"Solve\" width=\"491\" height=\"350\" />[/accordion_item][/accordion][/tab][tab][accordion id=\"my-accordion\"] [accordion_item title=\"Separable Convolution\" parent_id=\"my-accordion\"]<img class=\"aligncenter size-full wp-image-348\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/convs-e1409846211948.png\" alt=\"Separable Convolution\" width=\"491\" height=\"350\" />[/accordion_item] [accordion_item title=\"CONV\" parent_id=\"my-accordion\"]<img class=\"aligncenter size-full wp-image-347\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/conv-e1409846333930.png\" alt=\"Conv\" width=\"491\" height=\"350\" />[/accordion_item][/accordion][/tab][tab][accordion id=\"my-accordion\"] [accordion_item title=\"Sum\" parent_id=\"my-accordion\"]<img class=\"aligncenter size-full wp-image-356\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/sum-e1409846033653.png\" alt=\"sum\" width=\"491\" height=\"350\" />[/accordion_item] [accordion_item title=\"Sort\" parent_id=\"my-accordion\"]<img class=\"aligncenter size-full wp-image-355\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/sort-e1409845987155.png\" alt=\"sort\" width=\"491\" height=\"350\" />[/accordion_item] [accordion_item title=\"Cumulative Sum\" parent_id=\"my-accordion\"]<img class=\"aligncenter size-full wp-image-353\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/scan-e1409845901355.png\" alt=\"scan\" width=\"491\" height=\"350\" />[/accordion_item][/accordion][/tab][/tabs][/column][/content_band]\r\n\r\n[content_band bg_color=\"#f2f2f2\" inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"40px\" padding_bottom=\"40px\"]\r\n\r\n[column type=\"one-half\"][gap size=\"10%\"]<img class=\"aligncenter wp-image-4801 size-full\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/comingatyou-e1409844224608.png\" alt=\"comingatyou\" width=\"433\" height=\"302\" />\r\n\r\n[gap size=\"13%\"][/column][column type=\"one-half\" last=\"true\"][custom_headline type=\"left\" level=\"h2\"]Hardware neutral[/custom_headline]\r\n\r\nArrayFire supports CUDA-capable NVIDIA GPUs, OpenCL devices, and a C-programming backend. The OpenCL devices include AMD GPUs/APUs and Intel Xeon Phi co-processors. It also supports mobile OpenCL devices from ARM, Qualcomm, and others. With ArrayFire, you can easily switch between CUDA or OpenCL without changing your code.\r\n\r\nArrayFire is a high-performance software library designed for maximum productivity and speed without the hassle of writing difficult low-level device code. Each of <a href=\"http://www.sandbox.arrayfire.com/docs/modules.htm\">ArrayFire\'s functions</a> has been hand-tuned by our CUDA and OpenCL experts. [gap size=\"5%\"]\r\n\r\n[/column]\r\n\r\n[/content_band]\r\n\r\n[content_band inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"40px\" padding_bottom=\"40px\"]\r\n\r\n[column type=\"one-half\"][custom_headline type=\"left\" level=\"h2\"]Open Source[/custom_headline]\r\n\r\nArrayFire is open source—it’s all there and it’s all free. We\'re big fans of freedom, collaboration, and perpetual motion. Adapt ArrayFire to meet your needs, watch it blaze, and tell us all about it!\r\n\r\nBe sure to check out all of the ArrayFire functions (and a lot more!) in our <a href=\"http://www.sandbox.arrayfire.com/docs/index.htm\">documentation</a>. And don’t forget to visit our <a href=\"https://groups.google.com/forum/#!forum/arrayfire-users\">forums</a> to connect with the ArrayFire community and pick up acceleration tips and best practices.\r\n\r\n[/column]\r\n\r\n[column type=\"one-half\" last=\"true\"][gap size=\"3%\"][counter num_start=\"0\" num_end=\"1042\" num_speed=\"5000\"  num_color=\"#f08027\" text_below=\"stars\" text_color=\"#212c43\"]\r\n\r\n[counter num_start=\"0\" num_end=\"127\" num_speed=\"5000\"  num_color=\"#f08027\"  text_below=\"forks\" text_color=\"#212c43\"]\r\n\r\n[counter num_start=\"0\" num_end=\"240\" num_speed=\"5000\"  num_color=\"#f08027\"  text_below=\"functions\" text_color=\"#212c43\"]\r\n\r\n[counter num_start=\"0\" num_end=\"2438\" num_speed=\"5000\"  num_color=\"#f08027\"  text_below=\"commits\" text_color=\"#212c43\"]\r\n\r\n[/column][/content_band]','Why ArrayFire?','','inherit','open','closed','','7054-revision-v1','','','2015-06-01 18:42:15','2015-06-01 18:42:15','',7054,'http://sandbox.arrayfire.com/7054-revision-v1/',0,'revision','',0),(8329,7,'2015-06-01 19:11:31','2015-06-01 19:11:31','[content_band inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"10px\" padding_bottom=\"40px\"][column type=\"one-half\" ][custom_headline type=\"left\" level=\"h2\" ]Faster code[/custom_headline]\r\n\r\nArrayFire allows your code to run its fastest. It beats efforts to manually write CUDA or OpenCL kernels. It beats compiler optimizations. It beats other libraries. ArrayFire is the simply best way to accelerate your code.\r\n\r\nWant proof? Check out our benchmarks. All benchmarks were performed on a NVIDIA Tesla C2050 with an Intel i7-950 processor (updates coming soon). The benchmarks compare ArrayFire with several popular CPU-based acceleration libraries, including <a href=\"http://software.intel.com/en-us/articles/intel-mkl/\" target=\"_new\">Intel Math Kernel Library</a>, <a href=\"http://software.intel.com/en-us/articles/intel-ipp/\" target=\"_new\">Intel Integrated Performance Primitives</a>, <a href=\"http://eigen.tuxfamily.org/index.php?title=Main_Page\" target=\"_new\">Eigen</a>, and <a href=\"http://arma.sourceforge.net/\" target=\"_new\">Armadillo</a>.\r\n\r\n[button type=\"flat\" shape=\"rounded\" size=\"regular\" href=\"http://sandbox.arrayfire.com/download\" title=\"Download now!\"]Download ArrayFire[/button]\r\n\r\n&nbsp;\r\n\r\n[/column]\r\n\r\n[column type=\"one-half\"  last=\"true\" fade=\"true\" fade_animation=\"in-from-left\" ][gap size=\"10%\"][tab_nav type=\"four-up\"][tab_nav_item title=\"Base\" active=\"true\"][tab_nav_item title=\"Linear Algebra\" active=\"\"][tab_nav_item title=\"Convolution\" active=\"\"][tab_nav_item title=\"Utility\" active=\"\"][/tab_nav][tabs][tab active=\"true\"][accordion id=\"my-accordion\"] [accordion_item title=\"Matrix Multiply\" parent_id=\"my-accordion\"]<img class=\"aligncenter wp-image-351 size-full\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/matrix_multiply-e1409845945961.png\" alt=\"Matrix Multiply\" width=\"482\" height=\"344\" />[/accordion_item] [accordion_item title=\"Matrix Transpose\" parent_id=\"my-accordion\"]<img class=\"aligncenter wp-image-352 size-full\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/matrix_transpose-e1409846117548.png\" alt=\"Matrix Transpose\" width=\"482\" height=\"344\" />[/accordion_item] [accordion_item title=\"FFT\" parent_id=\"my-accordion\"]<img class=\"aligncenter wp-image-349 size-full\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/fft-e1409846374468.png\" alt=\"FFT\" width=\"491\" height=\"350\" />[/accordion_item][/accordion][/tab][tab][accordion id=\"my-accordion\"] [accordion_item title=\"LU\" parent_id=\"my-accordion\"]<img class=\"aligncenter size-full wp-image-350\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/lu-e1409846254351.png\" alt=\"LU\" width=\"491\" height=\"350\" />[/accordion_item] [accordion_item title=\"SVD\" parent_id=\"my-accordion\"]<img class=\"aligncenter size-full wp-image-357\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/svd-e1409846164788.png\" alt=\"SVD\" width=\"491\" height=\"350\" />[/accordion_item] [accordion_item title=\"Solve: Ax=b\" parent_id=\"my-accordion\"]<img class=\"aligncenter size-full wp-image-354\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/solve-e1409846072990.png\" alt=\"Solve\" width=\"491\" height=\"350\" />[/accordion_item][/accordion][/tab][tab][accordion id=\"my-accordion\"] [accordion_item title=\"Separable Convolution\" parent_id=\"my-accordion\"]<img class=\"aligncenter size-full wp-image-348\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/convs-e1409846211948.png\" alt=\"Separable Convolution\" width=\"491\" height=\"350\" />[/accordion_item] [accordion_item title=\"CONV\" parent_id=\"my-accordion\"]<img class=\"aligncenter size-full wp-image-347\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/conv-e1409846333930.png\" alt=\"Conv\" width=\"491\" height=\"350\" />[/accordion_item][/accordion][/tab][tab][accordion id=\"my-accordion\"] [accordion_item title=\"Sum\" parent_id=\"my-accordion\"]<img class=\"aligncenter size-full wp-image-356\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/sum-e1409846033653.png\" alt=\"sum\" width=\"491\" height=\"350\" />[/accordion_item] [accordion_item title=\"Sort\" parent_id=\"my-accordion\"]<img class=\"aligncenter size-full wp-image-355\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/sort-e1409845987155.png\" alt=\"sort\" width=\"491\" height=\"350\" />[/accordion_item] [accordion_item title=\"Cumulative Sum\" parent_id=\"my-accordion\"]<img class=\"aligncenter size-full wp-image-353\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/scan-e1409845901355.png\" alt=\"scan\" width=\"491\" height=\"350\" />[/accordion_item][/accordion][/tab][/tabs][/column][/content_band]\r\n\r\n[content_band bg_color=\"#f2f2f2\" inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"40px\" padding_bottom=\"40px\"]\r\n\r\n[column type=\"one-half\"][gap size=\"10%\"]<img class=\"aligncenter wp-image-4801 size-full\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/comingatyou-e1409844224608.png\" alt=\"comingatyou\" width=\"433\" height=\"302\" />\r\n\r\n[gap size=\"13%\"][/column][column type=\"one-half\" last=\"true\"][custom_headline type=\"left\" level=\"h2\"]Hardware neutral[/custom_headline]\r\n\r\nArrayFire supports CUDA-capable NVIDIA GPUs, OpenCL devices, and a C-programming backend. The OpenCL devices include AMD GPUs/APUs and Intel Xeon Phi co-processors. It also supports mobile OpenCL devices from ARM, Qualcomm, and others. With ArrayFire, you can easily switch between CUDA or OpenCL without changing your code.\r\n\r\nArrayFire is a high-performance software library designed for maximum productivity and speed without the hassle of writing difficult low-level device code. Each of <a href=\"http://www.sandbox.arrayfire.com/docs/modules.htm\">ArrayFire\'s functions</a> has been hand-tuned by our CUDA and OpenCL experts. [gap size=\"5%\"]\r\n\r\n[/column]\r\n\r\n[/content_band]\r\n\r\n[content_band inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"40px\" padding_bottom=\"40px\"]\r\n\r\n[column type=\"one-half\"][custom_headline type=\"left\" level=\"h2\"]Open Source[/custom_headline]\r\n\r\nArrayFire is open source—it’s all there and it’s all free. We\'re big fans of freedom, collaboration, and perpetual motion. Adapt ArrayFire to meet your needs, watch it blaze, and tell us all about it!\r\n\r\nBe sure to check out all of the ArrayFire functions (and a lot more!) in our <a href=\"http://www.sandbox.arrayfire.com/docs/index.htm\">documentation</a>. And don’t forget to visit our <a href=\"https://groups.google.com/forum/#!forum/arrayfire-users\">forums</a> to connect with the ArrayFire community and pick up acceleration tips and best practices. [gap size=\"11%\"]\r\n\r\n[/column]\r\n\r\n[column type=\"one-fourth\"][gap size=\"40%\"][counter num_start=\"0\" num_end=\"1042\" num_speed=\"5000\"  num_color=\"#f08027\" text_below=\"stars\" text_color=\"#212c43\"]\r\n\r\n[counter num_start=\"0\" num_end=\"127\" num_speed=\"5000\"  num_color=\"#f08027\"  text_below=\"forks\" text_color=\"#212c43\"][/column][column type=\"one-fourth\" last=\"true\"][gap size=\"40%\"]\r\n\r\n[counter num_start=\"0\" num_end=\"240\" num_speed=\"5000\"  num_color=\"#f08027\"  text_below=\"functions\" text_color=\"#212c43\"]\r\n\r\n[counter num_start=\"0\" num_end=\"2438\" num_speed=\"5000\"  num_color=\"#f08027\"  text_below=\"commits\" text_color=\"#212c43\"]\r\n\r\n[/column][/content_band]','Why ArrayFire?','','inherit','open','closed','','7054-revision-v1','','','2015-06-01 19:11:31','2015-06-01 19:11:31','',7054,'http://sandbox.arrayfire.com/7054-revision-v1/',0,'revision','',0),(8330,7,'2015-06-01 19:18:33','2015-06-01 19:18:33','[content_band inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"40px\" padding_bottom=\"40px\"][column type=\"two-fifths\"]\r\n\r\n[custom_headline type=\"left\" level=\"h3\"]If you want faster code, you\'ve come to the right place.[/custom_headline][gap size=\"3%\"]<img class=\"aligncenter wp-image-8232 size-medium\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/05/Button-scribbles-02-01-300x43.png\" alt=\"Button scribbles-02-01\" width=\"300\" height=\"43\" />[button  type=\"flat\" shape=\"rounded\" href=\"http://sandbox.arrayfire.com/download\" size=\"x-large\" block=\"true\"]Download ArrayFire[/button]\r\n\r\n[gap size=\"5%\"]\r\n\r\n[button  type=\"flat\" block=\"true\" shape=\"rounded\" href=\"http://sandbox.arrayfire.com/consulting/\" size=\"x-large\" ]Schedule a consultation[/button][gap size=\"2%\"]<img class=\"aligncenter size-full wp-image-8229\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2015/05/Button-scribbles-01.png\" alt=\"Button scribbles-01\" width=\"976\" height=\"117\" />\r\n\r\n[/column][column type=\"three-fifths\" last=\"true\"][gap size=\"7%\"]\r\n<div id=\"wistia_rj2bar3xxp\" class=\"wistia_embed\" style=\"width: 640px; height: 388px;\"></div>\r\n<script src=\"//fast.wistia.com/assets/external/E-v1.js\" charset=\"ISO-8859-1\"></script><script>// <![CDATA[\r\nwistiaEmbed = Wistia.embed(\"rj2bar3xxp\");\r\n// ]]></script>\r\n[/column]\r\n<div id=\"arrayfire\"></div>\r\n[/content_band]\r\n\r\n[content_band bg_color=\"#f2f2f2\" inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"40px\" padding_bottom=\"40px\"]\r\n\r\n[column type=\"one-third\" ][custom_headline type=\"left\" level=\"h3\" class=\"center-text\"][image src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/car-e1412967813807.png\" class=\"mbn\"] Faster Code[/custom_headline][line style=\"border-top: solid #999999;\"]ArrayFire is a blazing fast software library for GPU computing. Its easy-to-use API and array-based function set make GPU programming simple. A few lines of code in ArrayFire can replace dozens of lines of raw GPU code, saving you valuable time and lowering development costs.[/column]\r\n\r\n[column type=\"one-third\" ][custom_headline type=\"left\" level=\"h3\" class=\"center-text\"][image src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/09/mini-motorcycle-01-e1412969290876.png\" class=\"mbn\"] Hardware Neutral[/custom_headline][line style=\"border-top: solid #999999;\"]ArrayFire supports both CUDA-capable NVIDIA GPUs and most OpenCL devices, including AMD GPUs/APUs and Intel Xeon Phi co-processors. It also supports mobile OpenCL devices from ARM, Qualcomm, and others. We want your code to run as fast as possible, regardless of the hardware.[/column]\r\n\r\n[column type=\"one-third\" last=\"true\" ][custom_headline type=\"left\" level=\"h3\" class=\"center-text\"][image src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/09/mini-plane-01-e1412969527633.png\" class=\"mbn\"] Open Source[/custom_headline][line style=\"border-top: solid #999999;\"]ArrayFire is open source—it\'s all there and it\'s all free. Be sure to check out all of the ArrayFire functions (and a lot more!) in our excellent <a href=\"http://www.sandbox.arrayfire.com/docs/index.htm\">documentation</a>. And don\'t forget to visit our <a href=\"http://sandbox.arrayfire.com/forums/\">forums</a> to connect with the ArrayFire community and pick up acceleration tips and innovative best practices.[/column]\r\n<p style=\"text-align: center;\">[column type=\"one-third\" class=\"center-text\"][button  type=\"flat\" shape=\"rounded\" size=\"regular\" href=\"http://www.sandbox.arrayfire.com/docs/examples.htm\"]See some examples[/button][/column]</p>\r\n<p style=\"text-align: center;\">[column type=\"one-third\" class=\"center-text\"][button type=\"flat\" shape=\"rounded\" size=\"regular\" href=\"http://www.sandbox.arrayfire.com/download\"]Download ArrayFire[/button][/column]</p>\r\n<p style=\"text-align: center;\">[column type=\"one-third\" class=\"center-text\" last=\"true\"][button type=\"flat\" shape=\"rounded\" size=\"regular\" href=\"http://www.sandbox.arrayfire.com/docs/index.htm\"]View the documentation[/button][/column][gap size=\"3%\"][/content_band]</p>','Home','','inherit','open','closed','','245-revision-v1','','','2015-06-01 19:18:33','2015-06-01 19:18:33','',245,'http://sandbox.arrayfire.com/245-revision-v1/',0,'revision','',0),(8332,7,'2015-06-02 17:33:57','2015-06-02 17:33:57','Today we are pleased to announce the release of <a href=\"http://sandbox.arrayfire.com/\">ArrayFire v3.0</a>. This new version features major changes to ArrayFire’s visualization library, a new CPU backend, and dense linear algebra for OpenCL devices. It also includes improvements across the board for ArrayFire’s OpenCL backend. A complete list ArrayFire v3.0 updates and new features can be found in the product <a href=\"http://sandbox.arrayfire.com/docs/releasenotes.htm\">Release Notes</a>.\r\n\r\nWith over 8 years of continuous development, the open source ArrayFire library is the top CUDA and OpenCL software library. ArrayFire supports CUDA-capable GPUs, OpenCL devices, and other accelerators. With its easy-to-use API, this hardware-neutral software library is designed for maximum speed without the hassle of writing time-consuming CUDA and OpenCL device code. With ArrayFire’s library functions, developers can maximize productivity and performance. Each of ArrayFire’s functions has been hand-tuned by CUDA and OpenCL experts.\r\n\r\n<b>Major updates and new features</b>\r\n<ul>\r\n	<li>Major changes to the visualization library</li>\r\n	<li>Introducing handle based C API</li>\r\n	<li>New backend: CPU fallback available for systems without GPUs</li>\r\n	<li>Dense linear algebra functions available for all backends</li>\r\n	<li>Support for 64 bit integers</li>\r\n</ul>\r\n<b>New functions added in the following categories</b>\r\n<ul>\r\n	<li>Data generation</li>\r\n	<li>Computer Vision</li>\r\n	<li>Image Processing</li>\r\n	<li>Linear Algebra</li>\r\n	<li>Visualization</li>\r\n</ul>\r\n<strong>Benefits of the binary installers​</strong>\r\n\r\nWe\'re now using MKL in our installers to speed up CPU and OpenCL backends. The CUDA backend is compiled to be optimized for each CUDA architecture, making it more portable. By default, building the open source version compiles only for the GPUs present in the system.\r\n\r\n<strong>What people are saying</strong>\r\n\r\nKent Knox, Senior Member of Technical Staff from AMD, says:\r\n<blockquote>Arrayfire is a model example of how open sourcing scientific libraries should work. They have made their own code open to the public for review by the community at large, and they build upon existing open source math libraries to improve their own. With their investment in robust automation, they enhance the correctness and performance of the overall scientific ecosystem.</blockquote>\r\nJason Ramapuram, a machine learning engineer, says:\r\n<blockquote>ArrayFire has provided an elegant and simple solution for deploying GPU based machine learning applications. Being able to implement neural networks and auto encoders without delving into the any CUDA/OpenCL/BLAS details has been immensely helpful for research purposes. All of this is bundled in a brilliant open source package with an amazingly helpful team that is very open to implementing and resolving an issues that arise.</blockquote>\r\n<b>Availability</b>\r\n\r\nVisit ArrayFire’s website to download <a href=\"http://sandbox.arrayfire.com/download/\">ArrayFire v3.0 Installers</a> or GitHub account page to <a href=\"https://github.com/arrayfire/arrayfire\">download</a> and build the source code. The ArrayFire software library operates under the BSD 3-Clause License which enables unencumbered deployment and portability of ArrayFire for all uses, including commercially.\r\n\r\n<b>Dedicated support and coding services</b>\r\n\r\nArrayFire offers dedicated <a href=\"http://sandbox.arrayfire.com/?page_id=6648\">support packages</a> for ArrayFire users.\r\n\r\nArrayFire serves many clients through consulting and <a href=\"http://sandbox.arrayfire.com/consulting/\">coding services</a>, algorithm development, porting code, and training courses for developers.','ArrayFire v3.0 is here!','','inherit','open','closed','','8291-revision-v1','','','2015-06-02 17:33:57','2015-06-02 17:33:57','',8291,'http://sandbox.arrayfire.com/8291-revision-v1/',0,'revision','',0),(8334,7,'2015-06-02 17:45:06','2015-06-02 17:45:06','[content_band inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"10px\" padding_bottom=\"40px\"]\r\n[custom_headline type=\"left\" level=\"h2\"]\r\nArrayFire Installers\r\n[/custom_headline]\r\n[custom_headline type=\"left\" level=\"h5\"]\r\nEach download contains both CUDA and OpenCL files.\r\n[/custom_headline]\r\n[gap size=\"6%\"]\r\n\r\n[column type=\"one-fourth\"][button  block=\"true\" class=\"center-text\" type=\"flat\" shape=\"rounded\" href=\"http://go.sandbox.arrayfire.com/l/37882/2015-03-19/lvvyk\" size=\"regular\" ]Windows, v3.0 (64-bit)[/button][/column] [column type=\"one-fourth\"][button block=\"true\" type=\"flat\"  shape=\"rounded\" href=\"http://go.sandbox.arrayfire.com/l/37882/2015-03-19/lw515\" size=\"regular\" ]Linux, v3.0 (64-bit)[/button][/column][column type=\"one-fourth\"][button  block=\"true\" type=\"flat\"  shape=\"rounded\" href=\"http://go.sandbox.arrayfire.com/l/37882/2015-03-19/ltx4p\" size=\"regular\" ]Mac OSX, v3.0 (64-bit)[/button][/column] [column type=\"one-fourth\" last=\"true\"][button block=\"true\"  type=\"flat\"  shape=\"rounded\" href=\"http://go.sandbox.arrayfire.com/l/37882/2015-03-19/lw51f\" size=\"regular\" ]Tegra K1 v3.0 (32-bit)[/button][/column][gap size=\"9%\"]\r\n\r\nCheck out our GitHub repository to <a href=\"https://github.com/arrayfire/arrayfire\">build from the source</a>.\r\n\r\nLooking for an older installer? <a href=\"http://sandbox.arrayfire.com/installer_archive\">Try here</a>.[/content_band]\r\n<p style=\"text-align: left;\">[content_band inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"10px\" padding_bottom=\"40px\" bg_color=\"#f1f1f1\"][column type=\"one-half\"][gap size=\"8%\"]<img class=\"aligncenter wp-image-5156\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/02/mobile_Exported1-e1395437261846.png\" alt=\"mobile_Exported\" width=\"233\" height=\"311\" />[/column][column type=\"one-half\" last=\"true\"]\r\n[custom_headline type=\"left\" level=\"h2\"]\r\nGreat. What now?\r\n[/custom_headline]</p>\r\n<p style=\"text-align: left;\">[gap size=\"5%\"]</p>\r\n<p style=\"text-align: left;\">Welcome to ArrayFire! You\'ve got an awesome library there—learn more about its features and functions on <a href=\"http://www.sandbox.arrayfire.com/docs/index.htm\">our documentation</a>.</p>\r\n<p style=\"text-align: left;\">In addition to our <a href=\"https://groups.google.com/forum/#!forum/arrayfire-users\">ArrayFire user group</a> and <a href=\"http://sandbox.arrayfire.com/blog/\">our blog</a>, we offer a plethora of <a href=\"http://sandbox.arrayfire.com/support/\">support options</a> to fit your needs.</p>\r\n<p style=\"text-align: left;\">Got a job that needs closer attention? Hire us! Our engineers are acceleration wizards. Check out our <a href=\"http://sandbox.arrayfire.com/consulting/\">consulting offerings</a>, or set up a free <a href=\"http://meetme.so/arrayfire\">technical consultation</a> with us today![/column]</p>\r\n<p style=\"text-align: left;\">[/content_band]</p>\r\n<p style=\"text-align: center;\"></p>','Download','','inherit','open','closed','','5931-revision-v1','','','2015-06-02 17:45:06','2015-06-02 17:45:06','',5931,'http://sandbox.arrayfire.com/5931-revision-v1/',0,'revision','',0),