(5990,7,'2014-06-20 19:34:15','2014-06-20 19:34:15','[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://www.meetme.so/arrayfire\" 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>[/column]\r\n<div id=\"arrayfire\"></div>\r\n[/content_band]\r\n\r\n[content_band inner_container=\"true\" no_margin=\"true\" border=\"top\" padding_top=\"40px\" padding_bottom=\"40px\"][column type=\"one-half\"][custom_headline type=\"left\" level=\"h3\"]Faster code[/custom_headline]\r\n\r\nArrayFire is a fast, hardware-neutral software library for GPU computing with an easy-to-use API. Its array-based function set makes 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.\r\n\r\n[gap size=\"10%\"][button  type=\"flat\" shape=\"rounded\" href=\"http://sandbox.arrayfire.com/download\" size=\"x-large\" ]Download ArrayFire[/button][/column][column type=\"one-half\" last=\"true\" class=\"center-text\"][gap size=\"5%\"][image src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/Triumvirate_Exported.png\"][/column] [gap size=\"5%\"]\r\n\r\n[column type=\"one-third\" class=\"center-text\"][image src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/04/Googlelogo-e1396387097279.png\"][line]Video content analysis is the basis for categorizing videos and enabling search by content. Google used ArrayFire to extract motion features in video, improving performance by substantially accelerating the solution of the L1-regularized least-squares optimization problem.[/column][column type=\"one-third\" class=\"center-text\"][image src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/04/Koch-Industries-e1396387359637.jpg\"][line]Andrew Shin, Market Risk Manager of Koch Supply &amp; Trading, achieves significant performance increases on option pricing algorithms using ArrayFire software, \"My buddy and I are, at best, novice programmers and we couldn\'t imagine having to figure out how to code all this in CUDA.\"[/column][column type=\"one-third\" last=\"true\" class=\"center-text\"][image src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/04/nasa-e1396387230473.png\"][line]The main thrust of this research was improving Mars rover image compression via GPUs and genetic algorithms. With ArrayFire software and GPUs, the researchers were able to achieve 5X speedups on the larger data sizes.[/column]\r\n<div id=\"hardware\"></div>\r\n[/content_band]\r\n[content_band inner_container=\"true\" no_margin=\"true\" border=\"top\" padding_top=\"40px\" padding_bottom=\"40px\"]\r\n\r\n[column type=\"one-half\"][gap size=\"15%\"]\r\n\r\n<img class=\"aligncenter\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/CUDA-logo.jpg\" alt=\"CUDA logo\" width=\"231\" height=\"140\" />\r\n\r\n<img class=\"aligncenter\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/OpenCLLogo_678x452.png\" alt=\"OpenCL\" width=\"326\" height=\"217\" />\r\n\r\n[/column][column type=\"one-half\" last=\"true\"][gap size=\"10%\"]\r\n\r\n[custom_headline type=\"left\" level=\"h3\"] ArrayFire for CUDA and OpenCL[/custom_headline]\r\n\r\nArrayFire supports 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.\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 ArrayFire\'s functions has been hand-tuned by our CUDA and OpenCL experts.\r\n\r\n[/column]\r\n<div id=\"mobile\"></div>\r\n[/content_band]\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 id=\"documentation\"></div>\r\n[/content_band]\r\n\r\n[content_band inner_container=\"true\" no_margin=\"true\" border=\"top\" padding_top=\"40px\" padding_bottom=\"40px\"][column type=\"one-half\"][custom_headline type=\"left\" level=\"h3\"]Documentation[/custom_headline]\r\n<h5>ArrayFire for C, C++, and Fortran</h5>\r\nOpen the hood—take a look at the beautiful nitty-gritty.\r\n\r\n[icon type=\"angle-double-right\"] <a href=\"http://www.sandbox.arrayfire.com/docs/installation.htm\" target=\"_blank\">CUDA &amp; OpenCL C/C++</a>\r\n<h5>Functions</h5>\r\nHundreds of functions, hand-tuned and optimized by our engineers.\r\n\r\n[icon type=\"angle-double-right\"] <a title=\"ArrayFire Functions\" href=\"http://www.sandbox.arrayfire.com/docs/modules.htm\">ArrayFire Functions</a>\r\n<h5>User Forums</h5>\r\nEvery post gets a response from ArrayFire engineers.\r\n\r\n[icon type=\"angle-double-right\"] <a href=\"http://forums.accelereyes.com/\" target=\"_blank\">User Forums</a>\r\n\r\n[/column][column class=\"center-text\" type=\"one-half\" last=\"true\" fade=\"true\" fade_animation=\"in-from-right\" ][gap size=\"5%\"][image src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/gears1.png\"][/column]\r\n<div id=\"benchmarks\"></div>\r\n[/content_band]\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\" fade=\"true\" fade_animation=\"in-from-left\" ][gap size=\"5%\"][image src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/02/Benchmark-guy-torso-opposite-e1392155948298.png\"][/column]\r\n\r\n[column type=\"one-half\" last=\"true\"][custom_headline type=\"left\" level=\"h3\" ]Benchmarks[/custom_headline]\r\n\r\nAll benchmarks were performed on a NVIDIA Tesla C2050 with an Intel i7-950 processor. 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>.[/column]\r\n\r\n[column type=\"one-fifth\"].[/column][column type=\"three-fifths\"][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\"]<img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/matrix_multiply-1024x730.png\" alt=\"Matrix Multiply\" width=\"491\" height=\"350\" />[line]<img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/matrix_transpose-1024x730.png\" alt=\"Matrix Transpose\" width=\"491\" height=\"350\" />[line]<img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/fft-1024x730.png\" alt=\"FFT\" width=\"491\" height=\"350\" />[/tab][tab]<img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/lu-1024x730.png\" alt=\"LU\" width=\"491\" height=\"350\" />[line]<img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/svd-1024x730.png\" alt=\"SVD\" width=\"491\" height=\"350\" />[line]<img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/solve-1024x730.png\" alt=\"Solve\" width=\"491\" height=\"350\" />[/tab][tab]<img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/convs-1024x730.png\" alt=\"Convs\" width=\"491\" height=\"350\" />[line]<img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/conv-1024x730.png\" alt=\"Conv\" width=\"491\" height=\"350\" />[/tab][tab]<img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/sum-1024x730.png\" alt=\"sum\" width=\"491\" height=\"350\" />[line]<img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/sort-1024x730.png\" alt=\"sort\" width=\"491\" height=\"350\" />[line]<img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/scan-1024x730.png\" alt=\"scan\" width=\"491\" height=\"350\" />[/tab][/tabs][/column][column type=\"one-fifth\" last=\"true\"].[/column]\r\n<div id=\"free\"></div>\r\n[/content_band]\r\n\r\n[content_band inner_container=\"true\" no_margin=\"true\" border=\"top\" padding_top=\"40px\" padding_bottom=\"40px\" ]\r\n\r\n[column type=\"one-half\"].[/column][column type=\"one-fourth\"].[custom_headline type=\"center\"  level=\"h3\" class=\"mtn\"]ArrayFire Free[/custom_headline][/column][column type=\"one-fourth\" last=\"true\"].[/column][column type=\"one-fourth\"  fade=\"true\" fade_animation=\"in-from-left\" ][image src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/right-leaning-e1391788779101.png\"][/column][column type=\"one-fourth\"]\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>[custom_headline type=\"center\" level=\"h5\"]Functions[/custom_headline]</td>\r\n</tr>\r\n<tr>\r\n<td>[icon type=\"check-circle\" style=\"color: #8cc540;\"] Basic Operations</td>\r\n</tr>\r\n<tr>\r\n<td>[icon type=\"check-circle\" style=\"color: #8cc540;\"] Arithmetic</td>\r\n</tr>\r\n<tr>\r\n<td>[icon type=\"check-circle\" style=\"color: #8cc540;\"] Signal Processing</td>\r\n</tr>\r\n<tr>\r\n<td>[icon type=\"check-circle\" style=\"color: #8cc540;\"] Image Processing</td>\r\n</tr>\r\n<tr>\r\n<td>[icon type=\"check-circle\" style=\"color: #8cc540;\"] Statistics</td>\r\n</tr>\r\n<tr>\r\n<td>[icon type=\"check-circle\" style=\"color: #8cc540;\"] Visualization</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n[gap size=\"17%\"][button type=\"flat\" block=\"true\" shape=\"rounded\" size=\"large\"  href=\"http://sandbox.arrayfire.com/download\"]Download ArrayFire[/button] [/column][column type=\"one-fourth\"]\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>[custom_headline type=\"center\" level=\"h5\"]Hardware[/custom_headline]</td>\r\n</tr>\r\n<tr>\r\n<td>[icon type=\"check-circle\" style=\"color: #8cc540;\"] CUDA</td>\r\n</tr>\r\n<tr>\r\n<td>[icon type=\"check-circle\" style=\"color: #8cc540;\"] OpenCL</td>\r\n</tr>\r\n<tr>\r\n<td>[custom_headline type=\"center\" level=\"h5\"]Languages[/custom_headline]</td>\r\n</tr>\r\n<tr>\r\n<td>[icon type=\"check-circle\" style=\"color: #8cc540;\"] C/C++</td>\r\n</tr>\r\n<tr>\r\n<td>[icon type=\"check-circle\" style=\"color: #8cc540;\"] Fortran</td>\r\n</tr>\r\n<tr>\r\n<td>[custom_headline type=\"center\" level=\"h5\"]Advanced[/custom_headline]</td>\r\n</tr>\r\n<tr>\r\n<td> [icon type=\"check-circle\" style=\"color: #8cc540;\"] GFOR Loop</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n[/column][column type=\"one-fourth\" last=\"true\"]\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>[custom_headline type=\"center\" level=\"h5\"]Platforms[/custom_headline]</td>\r\n</tr>\r\n<tr>\r\n<td>[icon type=\"check-circle\" style=\"color: #8cc540;\"] Windows</td>\r\n</tr>\r\n<tr>\r\n<td>[icon type=\"check-circle\" style=\"color: #8cc540;\"] Linux</td>\r\n</tr>\r\n<tr>\r\n<td>[icon type=\"check-circle\" style=\"color: #8cc540;\"] Mac</td>\r\n</tr>\r\n<tr>\r\n<td>[custom_headline type=\"center\" level=\"h5\"]Data Types[/custom_headline]</td>\r\n</tr>\r\n<tr>\r\n<td>[icon type=\"check-circle\" style=\"color: #8cc540;\"] All types</td>\r\n</tr>\r\n<tr>\r\n<td>[custom_headline type=\"center\" level=\"h5\"]Support[/custom_headline]</td>\r\n</tr>\r\n<tr>\r\n<td> [icon type=\"check-circle\" style=\"color: #8cc540;\"] Forums</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n<div id=\"licensing\"></div>\r\n[/column][gap size=\"8%\"]\r\n\r\n[pricing_table id=\"pricing\" columns=\"3\"][pricing_table_column  featured=\"false\" title=\"ArrayFire Developer\" currency=\"$\" price=\"499 / year\" interval=\"$149 / year (Academic)\"] [icon_list] [icon_list_item type=\"star\" ]Dedicated license [/icon_list_item] [icon_list_item  type=\"times-circle\"] Starts at 2 GPUs or devices [/icon_list_item] [icon_list_item type=\"times-circle\"] Linear algebra [/icon_list_item] [icon_list_item type=\"times-circle\"] Sparse matrices [/icon_list_item][icon_list_item type=\"times-circle\"] Phone support [/icon_list_item][icon_list_item type=\"times-circle\"] Premium support &amp; consulting [/icon_list_item][/icon_list] [button href=\"http://sandbox.arrayfire.com/shop\"] Purchase [/button] [/pricing_table_column] [pricing_table_column featured=\"true\" featured_sub=\"Most Popular\" title=\"ArrayFire Pro\" currency=\"$\" price=\"1,499 / year\" interval=\"$525 / year (Academic)\"] [icon_list] [icon_list_item type=\"star\"] Dedicated license [/icon_list_item] [icon_list_item type=\"star\"] Starts at 2 GPUs or devices [/icon_list_item] [icon_list_item type=\"star\"] Linear algebra [/icon_list_item][icon_list_item type=\"star\"] Sparse matrices [/icon_list_item][icon_list_item type=\"times-circle\"] Phone support [/icon_list_item][icon_list_item type=\"times-circle\"] Premium support &amp; consulting [/icon_list_item] [/icon_list] [button href=\"http://sandbox.arrayfire.com/shop\"]Purchase [/button] [/pricing_table_column] [pricing_table_column featured=\"false\" title=\"ArrayFire Enterprise\" currency=\"$\" price=\"2,999 / year\" interval=\"$1,049 / year (Academic)\"] [icon_list] [icon_list_item type=\"star\"] Dedicated license [/icon_list_item] [icon_list_item type=\"star\"] Starts at 2 GPUs or devices [/icon_list_item] [icon_list_item type=\"star\"] Linear algebra [/icon_list_item][icon_list_item type=\"star\"]Sparse matrices [/icon_list_item][icon_list_item type=\"star\"] Phone support[/icon_list_item][icon_list_item type=\"star\"]Premium support &amp; consulting [/icon_list_item][/icon_list] [button href=\"http://sandbox.arrayfire.com/shop\"] Purchase [/button] [/pricing_table_column] [/pricing_table]\r\n<div id=\"whitepapers\"></div>\r\n[/content_band]\r\n\r\n[content_band inner_container=\"true\" no_margin=\"true\" border=\"top\" padding_top=\"40px\" padding_bottom=\"40px\" ]\r\n\r\n[column type=\"one-half\"][gap size=\"20%\"][image type=\"thumbnail\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/02/wp2.jpg\"][button href=\"http://go.sandbox.arrayfire.com/l/37882/2014-05-29/dw83/37882/18534/arrayfire_matrix_computations_chrzeszczyk.pdf\" shape=\"rounded\" size=\"regular\" block=\"true\"]Download <em>Matrix Computations on the GPU with ArrayFire for C/C++</em>[/button][/column][column type=\"one-half\" last=\"true\"]\r\n\r\n[custom_headline type=\"left\" level=\"h3\" ]Whitepapers[/custom_headline]\r\n\r\n<img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/02/Whitepaper-1.png\" alt=\"Whitepaper 1\" width=\"466\" height=\"374\" />\r\n\r\n&nbsp;\r\n\r\n[/column][gap size=\"10%\"]\r\n\r\n[column type=\"one-half\"]<img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/02/Whitepaper-2.png\" alt=\"Whitepaper 2\" width=\"442\" height=\"304\" />[/column][column type=\"one-half\" last=\"true\"][image type=\"thumbnail\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/02/wp1.jpg\"][button href=\"http://go.sandbox.arrayfire.com/l/37882/2014-05-29/dw81/37882/18532/arrayfire_whitepaper.pdf\" shape=\"rounded\" size=\"regular\"  block=\"true\" float=\"right\"]Download <em>High-level GPU Computing in C, C++, and Fortran</em>[/button][/column]\r\n<div id=\"casestudies\"></div>\r\n[/content_band]\r\n\r\n[content_band inner_container=\"true\" no_margin=\"true\" border=\"top\" padding_top=\"40px\" padding_bottom=\"40px\" ]\r\n\r\n[column type=\"one-half\"][gap size=\"12%\"][custom_headline type=\"left\" level=\"h3\" ]Case Studies[/custom_headline]\r\n\r\nLearn how ArrayFire has worked in real code, including applications in academia, finance, government, life sciences, manufacturing, media, and oil &amp; gas.[/column][column type=\"one-half\" last=\"true\" fade=\"true\" fade_animation=\"in-from right\"][image src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/02/model-A.png\"][/column][custom_headline type=\"left\" level=\"h5\"]Academia [/custom_headline][accordion][accordion_item title=\"Accelerating LTE Simulation | Tsinghua University\"]\r\n\r\nAuthors: Yuan Gao, Yin Sun, Chun Hui Zhou, Xin Su, Xi Bin Xu, Shi Dong Zhou, Tsinghua University\r\nSpeedup: 3X\r\n\r\nFast simulations are a driving force in several research projects. However, the accompanying long simulation times can tend to be a drag in many of these projects. In this article, we shall bring up the example of the work on 3GPP LTE System Simulation by Yuan Gao et al (from Tsinghua University, Beijing) and demonstrate how the use of ArrayFire software can significantly improve the simulator performance and lead to faster validation times in simulation projects.[/accordion_item]\r\n\r\n[accordion_item title=\"High Performance Compressive Sensing | Rice University\"]\r\n\r\nAuthors: Nabor Reyna and Wotao Yin from Rice University\r\nSpeedup: 5X\r\n\r\nThis work deals with reconstruction of signals using partial Fourier matrices (RecPF). The major computational components of the algorithm involve shrinkage and FFTs. ArrayFire software is employed to accelerate this compute-heavy code.[/accordion_item]\r\n\r\n[accordion_item title=\"Power System Simulations | Indian Institute of Technology, Roorkee, India\"]\r\nAuthors: Indian Institute of Technology, Roorkee\r\nSpeedup: 35X\r\n\r\nPower flow studies are one of the most important aspects of power system planning and operation. The power flow reveals the sinusoidal steady state characteristics of the entire system - voltages, real and reactive power generated, and absorbed and line losses- elucidating the voltage magnitudes and angles at each bus, the generation of each generating unit, and real and reactive power losses in the system. All this is necessary to ensure the security, economy, and control of electrical energy distribution. Learn how ArrayFire software can deliver magnitudes of performance improvement over CPU-based solutions.[/accordion_item]\r\n\r\n[accordion_item title=\"Antenna Array Simulations | University of Naples Federico II\"]\r\n\r\nAuthors: A. Capozzoli, C. Cucio, A. Liseno at University of Naples Federico II\r\nSpeedup: 24X\r\n\r\nAntenna array design involves repeated simulation to tune the many parameters involved, and waiting around for simulations to finish is no fun. Offloading the optimization problem onto the GPU cuts that time down significantly. In their recent paper, Capozzoli, Curcio, and Liseno of University of Naples Federico II demonstrated how a simple modification to their echo generator array simulation took advantage of the GPU to bring immediate speedups.[/accordion_item]\r\n\r\n[accordion_item title=\"Laplace Transform Inversion | Acunum Algorithms and Simulations\"]\r\n\r\nAuthors: Patrick Kano and Moysey Brio at Acunum Algorithms and Simulations\r\nSpeedup: 3.8X\r\n\r\nThe numerical inversion of the Laplace transform is a long standing problem due its implicit ill-posedness. Patrick Kano and Moysey Brio of Acunum Algorithms and Simulations, with their experience in computational methods and algorithm development, found a solution that not only works, but is very fast.[/accordion_item]\r\n\r\n[accordion_item title=\"Compressed Sensing for Image Reconstruction | College of Engineering, Roorkee, India\"]\r\n\r\nAuthors: Kuldeep Yadav, Ankush Mittal, M. A. Ansar, and Avi Srivastava, College of Engineering, Roorkee, India\r\nSpeedup: 8X\r\n\r\nCompressed sensing is very critical in the areas of medical image reconstruction, image acquisition or sensor networks. An algorithm for compressed sensing developed using a Basis Pursuit Algorithm shows over 8X speedup when run on an NVIDIA GPU.[/accordion_item]\r\n\r\n[accordion_item title=\"Fat/Water Reconstruction for Medical Images | Case Western Reserve University\"]\r\n\r\nAuthors: D. H. Johnson, S. Narayan, C. A. Flask, and D. L. Wilson, Case Western Reserve University\r\nSpeedup: 11.6X\r\n\r\nCase Western Reserve University researchers turned to GPUs running ArrayFire software to develop a fast and robust version of the \"Iterative Decomposition of water and fat with an Echo Asymmetry and Least-squares\" (IDEAL) reconstruction algorithm. This algorithm uses a lot of Image Processing algorithms for reconstruction, and was shown to achieve very high speedups.\r\n[/accordion_item]\r\n\r\n[/accordion]\r\n<h5>Finance</h5>\r\n[accordion][accordion_item title=\"Option Pricing | Koch Supply and Trading\"]\r\n\r\nAuthors: Koch Supply &amp; Trading\r\nSpeedup: 51.8X\r\n\r\nAndrew Shin, Market Risk Manager of Koch Supply &amp; Trading, achieves significant performance increases on option pricing algorithms using ArrayFire software to accelerate his code with GPUs. Andrew says, \"My buddy and I are, at best, novice programmers and we couldn\'t imagine having to figure out how to code all this in CUDA.\" But he found ArrayFire software to be straight-forward. With these results, he says he can see ArrayFire software and GPUs populating Koch\'s mark-to-futures cube, which contains its assets, simulations, and simulated asset prices.[/accordion_item]\r\n\r\n[accordion_item title=\"GPU Computing in Automated Trader | Automated Trader\"]\r\n\r\nAuthors: Automated Trader\r\nSpeedup: 37.5X\r\n\r\nThe Q1 2012 issue of Automated Trader contains an excellent Mashup piece reviewing software for algorithmic trading. The article provides a wonderful glimpse into the 1-2 month adventure of Andy Webb, Automated Trader.s Founder, and Wrecking Crew building a fast trading platform from several technologies. The full trading platform they built was quite extensive. The part that caught our eye was the core computational component of the pipeline. That component involved permuting 1,000 potential pairs with cointegration tests for 350 time windows on each potential pair.\r\n[/accordion_item]\r\n[accordion_item title=\"GPUs in Quantitative Analytics and Finance | Private Bank\"]\r\n\r\nThe world of Quantitative finance is all about getting accurate results really, really fast. ArrayFire is working with one of the largest banks in Spain to maximize their output using GPUs. Click the link below for an overview of the uses of GPU computing in finance.[/accordion_item][/accordion]\r\n<h5>Government</h5>\r\n[accordion][accordion_item title=\"Powering Mars Research | NASA and UAA in Anchorage\" ]\r\n\r\nAuthors: NASA and UAA in Anchorage\r\nSpeedup: 5X\r\n\r\nThe main thrust of this research is improving mars rover image compression via GPUs and genetic algorithms. With ArrayFire software and GPUs, the researchers were able to achieve 5X speedups on the larger data sizes. The algorithm works by pairing neighboring pixels with a random one and then adjusting the random pixel based on whether it incrementally improves the original image. Babb described the algorithm as an embarrassingly parallel process, ideally suited to GPU acceleration. He estimates he has been able to achieve a 20 to 30 percent error reduction in subjects like fingerprints and satellite imagery.[/accordion_item]\r\n\r\n[accordion_item title=\"Radar Image Formation | System Planning Corporation\"]\r\n\r\nAuthors: Gary Rubin and Earl Sager - System Planning Corporation\r\nSpeedup: ~45X\r\n\r\nRadar imaging is computationally intensive. As a result, many imaging algorithms apply FFT-based approximations. While efficient, these algorithms sacrifice data fidelity for speed. Other algorithms better preserve information, but are often too slow for many applications. At System Planning Corporation (SPC) , we have implemented a SAR/ISAR imaging routine based on the Backprojection algorithm. Using ArrayFire software, we have demonstrated speedups of roughly 45x for large datasets.[/accordion_item]\r\n\r\n[accordion_item title=\"Radar Clutter Reduction | System Planning Corporation\"]\r\n\r\nAuthors: David Berger and Gary Rubin - System Planning Corporation\r\nSpeedup: 5-10X\r\n\r\nSystem Planning Corporation (SPC) uses ArrayFire software to accelerate radar processing algorithms. The system processes raw data from marine navigation radars using a variety of thresholding techniques to extract real targets from clutter. This involves highly data-parallel processing in which each radar pulse is subjected to the same computations; very few operations occur across multiple pulses. Using ArrayFire software, SPC has achieved 10x speed improvements relative to a Core i7-920 CPU and 5x improvements relative to a realtime DSP implementation.[/accordion_item]\r\n\r\n[accordion_item title=\"Novel Algorithms for Linear Algebra | SAIC\" ]\r\n\r\nAuthors: Nolan Davis and Daniel Redig, SAIC\r\nSpeedup: 3.5X\r\n\r\nNolan Davis and Daniel Redig at SAIC recently presented work on Hybrid GPU/Multicore Solutions for Large Linear Algebra Problems where they developed a novel algorithm for LU decomposition, one of the most important routines in linear algebra. They presented a Hybrid CPU/GPU computing approach, where problems too large to fit in GPU memory can also be solved faster than using only the CPU.\r\n[/accordion_item]\r\n[accordion_item title=\"Geolocation | BAE Systems\"]\r\n\r\nAuthors: BAE Systems\r\nSpeedup: 17X\r\n\r\nGeolocation is the identification of the real-world geographic location of a target of interest. In this application, the system receives the signal with an array of several antennas and computes the direction of arrival of the radio energy by measuring the time difference of arrival (or the phase difference) at the different antennas.\r\n[/accordion_item]\r\n[accordion_item title=\"Tsunami Modeling | University of Minnesota, Boise State, Saint Scholastica, and NCAR\"]\r\n\r\nAuthors: University of Minnesota, Boise State, Saint Scholastica, and NCAR\r\nSpeedup: 3-5X\r\n\r\nNatural catastrophic disasters like tsunamis commonly strike with little warning. For most people, tsunamis are underrated as major hazards. People sometimes wrongly believe that they occur infrequently and only along distant coasts. Tsunamis are usually caused by earthquakes. Seismic signals can give some margin of warning since the speed of tsunami waves travels at 1/30 the speed of seismic waves. Still there is little time between the creation of the tsunami and its impact making fast processing critical to producing effective warning systems. ArrayFire software was used to run an RBF simulation on the GPU with a time to solution not available by other alternatives.\r\n[/accordion_item][/accordion]\r\n<h5>Life Sciences</h5>\r\n[accordion][accordion_item title=\"Parallelized Gene Predictors | University of Quebec\" ]\r\n\r\nAuthors: University of Quebec\r\nSpeedup: 43X\r\n\r\nComputerized approaches to studying the human genome are challenged by the exploding amount of data, which doubles roughly every 6 months. In order to deal with this burgeoning datasets, demands for faster processing power continue to arise. This work focuses on predicting genes using frequency analysis with FFTs and with an equivalent technique known as Goertzel\'s algorithm. In these applications, the emphasis of this paper is to propose tools to geneticists and molecular biologists for the prediction or identification of new genes using existing complementary strategies. The criteria for these tools are speed, reliability, accuracy and ease of use, thus requiring little training.\r\n[/accordion_item]\r\n[accordion_item title=\"Pathology Advances with GPUs | Northeastern University\" ]\r\n\r\nAuthors: Laboratory for Spectral Diagnosis at Northeastern University\r\nSpeedup: 100X+\r\n\r\nOne element of the hyperspectral image analysis workflow that requires more than a traditional desktop workstation or personal computer is Hierarchical Cluster analysis (HCA). HCA requires a large amount of data space and substantial computation time (~11 hours) for typical datasets using a single processor personal computer. Rather than following the traditional approach of moving to a lower level programming language like C or C++ and complex parallel programming paradigms such as OpenMP or the Massage Passing Interface (MPI), the lab utilized graphics processing units, or GPUs, and the ArrayFire software platform. The solution allowed the lab to dramatically increase the performance of the analysis while substantially decreasing the amount of calendar time to reach the desired results.\r\n[/accordion_item]\r\n[accordion_item title=\"Hepatitis C Virus - Mutation Modeling | Centers for Disease Control and Prevention\" ]\r\n\r\nAuthors: CDC Research and Development Team\r\nSpeedup: ~20X\r\n\r\nThis case study provides a look at biological research regarding coordinated mutations of the Hepatitis C Virus (HCV). ArrayFire provided collaborative R&amp;D resources and greatly improved the speed of this HCV research with the use of parallelization, reducing the computing time from 40 days to less than 1 day. Most importantly, the conclusion of the case study illustrates the the relative price-performance of personal supercomputers that leverage GPUs and ArrayFire software provides a compelling solution versus other architectures and approaches.\r\n[/accordion_item]\r\n[accordion_item title=\"Accelerating the SPM Package for Neuroimaging | Georgia Institute of Technology\" ]\r\n\r\nAuthors: Georgia Institute of Technology\r\nSpeedup: 3.5X\r\n\r\nThe Georgia Tech team explores the value of ArrayFire software and GPUs for fMRI workflows within the popular SPM - Statistical Parametric Mapping software widely used in neuroscience research.\r\n[/accordion_item]\r\n[accordion_item title=\"Medical Image Compression | Indian Institute of Technology, Roorkee, India\" ]\r\n\r\nAuthors: Jaideep Singh, Ipseeta Aruni, R. Balasubramanian - IIT - Roorkee, India\r\nSpeedup: 38X\r\n\r\nThis study presents the acceleration of Haar wavelet-based image compression algorithm for medical imaging on the Graphics Processing Unit (GPU) using ArrayFire software. Due to bandwidth and image size constraints of medical imaging systems, image compression plays a vital role in reducing the bit rate of transmission or storage. Wavelet-based image compression provides the most promising approach for high quality image compression.\r\n[/accordion_item]\r\n[accordion_item title=\"Brain Displacement | Spencer Technologies\"]\r\n\r\nAuthors: Spencer Technologies\r\nSpeedup: 12X\r\n\r\nSpencer describes how ArrayFire software facilitates the development of fast algorithms enabling observation of brain displacement across depth with sampling density that far surpasses previous benchmarks.\r\n[/accordion_item]\r\n[accordion_item title=\"Multidimensional Scaling for Genomics | Leibniz Institute of Plant Genetics and Crop Plant Research\" ]\r\n\r\nAuthors: Leibniz Institute of Plant Genetics and Crop Plant Research\r\nSpeedup: 20-35X\r\n\r\nMultidimensional scaling (MDS) is a general computing technique to turn a distance matrix into a set of reconstructed points with pair-wise relationships approximating the original distances by points located in a usually low-dimensional space. ArrayFire software is used to enhance execution of the HiT-MDS procedure and delivers considerable performance improvement.\r\n[/accordion_item]\r\n[accordion_item title=\"Drug Delivery Model | Georgia Institute of Technology\"]\r\n\r\nAuthors: Georgia Institute of Technology\r\nSpeedup: 70X\r\n\r\nIn this work, the researchers simulate the delivery of a novel nanoparticle chemotherapy drug to cancerous tissue. Simulation allows scientists to predict experimental outcomes and thus reduce the cost of development and time to clinical relevance. The simulation model includes blood vessels, tumor cells, and healthy cells and an engine to calculate the spatial distributions of both drug and oxygen. ArrayFire software is used to speed up the diffusion calculations for the drug and oxygen within the tissue.\r\n[/accordion_item]\r\n[accordion_item title=\"Biomedical Infrared Spectroscopy | University of Manchester and Nofima Mat, Norway\" ]\r\n\r\nAuthors: University of Manchester and Nofima Mat, Norway\r\nSpeedup: Hours of runtime reduction\r\n\r\nThe authors present an iterative algorithm that applies full Mie scattering theory and avoids noise accumulation in their iterative algorithm by integrating a curve-fitting step. ArrayFire software along with NVIDIA GPUs are leveraged to reduce the time added by the curve-fitting step.\r\n[/accordion_item][/accordion]\r\n<h5>Manufacturing</h5>\r\n[accordion][accordion_item title=\"Feature Learning on Images | Stanford\" ]\r\n\r\nAuthors: Andrew Ng, Stanford University\r\nSpeedup: Ability to process many images in parallel\r\n\r\nStanford researchers in Andrew Ng\'s group used GPUs and ArrayFire software to speed up their work on Feature Learning Architectures. They decided to use ArrayFire software for this study because of the need to quickly evaluate many architectures on thousands of images. ArrayFire software taps into the immense computing power of GPUs and speeds up research utilizing many images.\r\n[/accordion_item]\r\n[accordion_item title=\"Tomography of Vegetation - Filtered Back-Projection and Non-Uniform FFTs | Universita di Napoli Federico II\" ]\r\n\r\nAuthors: Drs. Capozzoli, Curcio, di Vico, and Liseno, Universita di Napoli Federico II\r\nSpeedup: 10X\r\n\r\nIn order to investigate changes of forest biomass, scientists use microwave tomography to image the vegetation. At the smallest scale, individual plants can be imaged to investigate branching and growth, but even synthetic aperture radar can reveal large-scale changes in regional ecology. To the right, you can see the experimental setup to image an individual plant.\r\n[/accordion_item]\r\n[accordion_item title=\"Action Recognition with Independent Subspace Analysis | Stanford University\" ]\r\n\r\nAuthors: Quoc Le, Will Zou, Serena Yeung, Andrew Ng, Stanford University\r\nSpeedup: 4.4X\r\n\r\nIn a paper at this year\'s CVPR 2011, entitled \"Learning hierarchical invariant spatio-temporal features for action recognition with independent subspace analysis\", the authors explain how their unsupervised feature learning algorithm competes with other algorithms that are hand crafted or use learned features. For their training purposes, they used a multi-layered stacked convolutional ISA (Independent subspace analysis) network. An ISA is used for learning features from image patches without supervision.\r\n[/accordion_item][/accordion]\r\n<h5>Media and Computer Vision</h5>\r\n[accordion][accordion_item title=\"Fast Computer Vision with OpenCV and ArrayFire | OpenCV Blogger\" ]\r\n\r\nAuthors: OpenCV Blogger\r\nSpeedup: ~10X\r\n\r\nThe OpenCV library is the defacto standard for doing computer vision and image processing research projects. OpenCV includes several hundreds of computer vision algorithms, aimed for use in realtime vision applications. This case study shows how to use both libraries together. There is a simple example application that demonstrates using OpenCV for webcam access and ArrayFire for some basic processing routines and displaying results.\r\n[/accordion_item]\r\n[accordion_item title=\"Video Processing | Google\" ]\r\n\r\nAuthors: Google and Stanford\r\nSpeedup: 10-20X\r\n\r\nVideo content analysis is the basis for categorizing videos and enabling search by content. Growing interest in using sparse-coding methods to extract motion features in video in support of video content analysis led to the application of ArrayFire software to improve performance by substantially accelerating the solution of the L1-regularized least-squares optimization problem.\r\n[/accordion_item]\r\n[accordion_item title=\"Action Recognition with Independent Subspace Analysis | Stanford University\"]\r\n\r\nAuthors: Quoc Le, Will Zou, Serena Yeung, Andrew Ng, Stanford University\r\nSpeedup: 4.4X\r\n\r\nIn a paper at this year\'s CVPR 2011, entitled \"Learning hierarchical invariant spatio-temporal features for action recognition with independent subspace analysis\", the authors explain how their unsupervised feature learning algorithm competes with other algorithms that are hand crafted or use learned features. For their training purposes, they used a multi-layered stacked convolutional ISA (Independent subspace analysis) network. An ISA is used for learning features from image patches without supervision.\r\n[/accordion_item]\r\n[accordion_item title=\"Music Beat Analysis | Georgia Tech\"]\r\n\r\nAuthors: Vidhur Vohra - Georgia Tech\r\nSpeedup: 15X\r\n\r\nDid you ever wonder how the music visualizer in your media player works? Watching it pulsate in synchrony with the beats of the song is almost as entertaining as listening to the song itself! Researchers have been attempting to detect beats in audio signals for many years, and there are many techniques available, from the simplest (and least accurate) to more complicated algorithms that are highly accurate. All algorithms, though, perform some form of signal processing and frequency analysis, applications highly suited to GPU Computing.\r\n[/accordion_item]\r\n[accordion_item title=\"Optimization Methods for Deep Learning | Stanford Artificial Intelligence Laboratory\" ]\r\n\r\nAuthors: Stanford Artificial Intelligence Laboratory\r\nSpeedup: Improved accuracy\r\n\r\nResearchers at SAIL (Stanford Artificial Intelligence Laboratory), have done it again. They have successfully used ArrayFire software to speed up the training part of Deep Learning algorithms. In their paper titled .On Optimization Methods for Deep Learning., they experiment with some of the well known training algorithms and demostrate their scalability across parallel architectures (GPUs as well as multi-machine networks). The algorithms include SGDs (Stochastic Gradient Descent) L-BFGS (Limited BFGS used for solving non-linear problems), CG (Conjugate Gradient).\r\n[/accordion_item]\r\n[accordion_item title=\"Feature Learning on Images | Stanford University\" ]\r\n\r\nAuthors: Andrew Ng, Stanford University\r\nSpeedup: Ability to process many images in parallel\r\n\r\nStanford researchers in Andrew Ng’s group used ArrayFire software to speed up their work on Feature Learning Architectures. They decided to use ArrayFire software for this study because of the need to quickly evaluate many architectures on thousands of images. ArrayFire software taps into the immense computing power of GPUs and speeds up research utilizing many images.\r\n[/accordion_item]\r\n[accordion_item title=\"Digital Holography for Imaging | National University of Ireland, Maynooth\" ]\r\n\r\nAuthors: Nitesh Pandey, Damien Kelly, Bryan Hennelly and Thomas Naughton from the National University of Ireland, Maynooth\r\nSpeedup: 17X\r\n\r\nDigital holography is a powerful imaging technique with many new applications like true 3D display. It allows the capture of both amplitude and phase information of the light reflected off the surface of 3D objects. Researchers at the National University of Ireland, Maynooth are developing techniques based on digital holography for 3D display applications.\r\nReconstruction of large digital holograms can be computationally intensive to generate on CPUs, but GPUs running ArrayFire software offer amazing possibilities.\r\n[/accordion_item][/accordion]\r\n<h5>Oil and Gas</h5>\r\n[accordion][accordion_item title=\"3D Mantle Convection - Geodynamics | Boise State, University of Colorado, University of Minnesota\" ]\r\n\r\nAuthors: Boise State, University of Colorado, University of Minnesota\r\nSpeedup: 2.5-4.5X\r\n\r\nThe authors introduce a GPU implementation of a three-dimensional mantle convection modeling at a high Rayleigh number to the solid earth geophysics community. They outline code development time, compare performance of CPUs versus GPUs, and deliver powerful visualizations.\r\n[/accordion_item]\r\n[accordion_item title=\"Ground Water Simulations | Louisiana State University\" ]\r\n\r\nAuthors: Kevin R. Tubbs and Frank T-C. Tsai at Louisiana State University\r\nSpeedup: &gt;20X\r\n\r\nA lattice Boltzmann method for solving the shallow water equations and the advection-dispersion equation is developed and implemented on graphics processing unit (GPU)-based architectures. The proposed LBM is implemented to an NVIDIA Computing Processor in a single GPU workstation. GPU computing is performed using ArrayFire software. Mass transport with velocity-dependent dispersion in shallow water flow is simulated by combining the MRT-LBM model and the TRT-LBM model. The GPU parallel performance increases as the grid size increases. The results indicate the promise of the GPU-accelerated LBM for modeling mass transport phenomena in shallow water flows.\r\n[/accordion_item]\r\n[accordion_item title=\"Shallow Water Fluid Flow | Louisiana State University\" ]\r\n\r\nAuthors: Louisiana State University\r\nSpeedup: &gt;10X\r\n\r\nA lattice Boltzmann method (LBM) on high performance computing (HPC) environments for three-dimensional shallow water flow fields coupled to mass transport is developed. LBM is an attractive method for solving the multilayered shallow water equations because the extension to multilayer is straight forward with all of the simplicities and advantages of the LBM in mass transport in shallow water flows and the LBM performance on central processing unit (CPU)-based and graphics processing unit (GPU)-based HPC environments.\r\n[/accordion_item][/accordion]\r\n<div id=\"consulting\"></div>\r\n[/content_band]\r\n<div id=\"services\"></div>\r\n[content_band inner_container=\"true\" no_margin=\"true\" border=\"top\" padding_top=\"40px\" padding_bottom=\"40px\"][column type=\"one-half\"][custom_headline type=\"left\" level=\"h3\"]Hire our acceleration gang[/custom_headline]\r\n\r\nHire us to accelerate your code. Or to train your pros. Or even to write new code for your organization!\r\n\r\nWe’ve already helped thousands of organizations speedup their code. We’ve accelerated algorithms, data sets, and challenging problems of all types in the past, and we’re confident that we can accelerate your code too.\r\n\r\n[gap size=\"10%\"][button  type=\"flat\" shape=\"rounded\" href=\"http://meetme.so/arrayfire\" size=\"x-large\" ]Schedule a consultation[/button][/column][column type=\"one-half\" last=\"true\" class=\"center-text\"][gap size=\"5%\"][image src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/Bat-signal-e1391790016951.png\"][/column] [gap size=\"7%\"]\r\n\r\n[column type=\"one-third\" class=\"center-text\"][image src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/04/LFG-B-HORZ_202_K-e1396448935778.jpg\"][line]Lincoln Financial Group 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 10-12 hours to run the entire code. After porting to CUDA, they were able to do the same work in about 30 minutes.[/column][column type=\"one-third\" class=\"center-text\"][image src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/02/reveal_logo-e1396449044651.jpg\"][line]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.[/column][column type=\"one-third\" last=\"true\" class=\"center-text\"][image src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/04/1800contactlogo.png\"][line]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.[/column]\r\n<div id=\"starterpackage\"></div>\r\n[/content_band]\r\n\r\n[content_band inner_container=\"true\" no_margin=\"true\" border=\"top\" padding_top=\"40px\" padding_bottom=\"40px\"]\r\n\r\n[column type=\"one-half\" last=\"false\" fade=\"true\" fade_animation=\"in-from-left\" ][gap size=\"10%\"][image src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/comingatyou.png\"][/column][column type=\"one-half\" last=\"true\"] [custom_headline type=\"left\" level=\"h3\"]Starter Package ($500)* [/custom_headline] Hire us for 1-day. We set you up with one engineer dedicated for a full day, as well as support from 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\"]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 the code as is possible within the 1-day effort, applying our extensive GPU software libraries[/icon_list_item][icon_list_item type=\"angle-double-right\"]We produce a final report, along with 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&nbsp;\r\n\r\n[button type=\"flat\" shape=\"rounded\" size=\"regular\" href=\"http://sandbox.arrayfire.com/product/consulting-starter-package/\" title=\"Starter Package\"]Buy the Starter Package[/button]\r\n\r\n&nbsp;\r\n\r\n*Limit one (1) per customer.\r\n\r\n[/column]\r\n<div id=\"customcode\"></div>\r\n[/content_band] [content_band inner_container=\"true\" no_margin=\"true\" border=\"top\" padding_top=\"40px\" padding_bottom=\"40px\" ]\r\n\r\n[column type=\"one-half\"][custom_headline type=\"left\" level=\"h3\" ]Custom Coding Work[/custom_headline]\r\n\r\n[custom_headline type=\"left\" level=\"h6\" ]Why Choose Us?[/custom_headline] [icon_list] [icon_list_item type=\"angle-double-right\"]Deep experience, already servicing thousands of customers[/icon_list_item] [icon_list_item type=\"angle-double-right\"]Quality work, with leading GPU software [/icon_list_item] [icon_list_item type=\"angle-double-right\"]Efficient delivery, with ArrayFire\'s code base we can deliver results fast[/icon_list_item][icon_list_item type=\"angle-double-right\"]Proven, we make customers happy through faster code[/icon_list_item][/icon_list] [custom_headline type=\"left\" level=\"h6\" ]Our Strengths[/custom_headline] [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\" size=\"regular\" href=\"http://meetme.so/arrayfire\" title=\"Tech Consultation\"]Schedule a consultation[/button] [/column][column type=\"one-half\"  fade=\"true\" fade_animation=\"in-from-right\" last=\"true\" ][gap size=\"25%\"][image src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/02/Holoham.png\"][/column]\r\n<div id=\"training\"></div>\r\n[/content_band] [content_band inner_container=\"true\" no_margin=\"true\" border=\"top\" padding_top=\"40px\" padding_bottom=\"40px\" ]\r\n\r\n[column type=\"one-half\"][custom_headline type=\"left\" level=\"h3\" ]Training[/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. Please <a href=\"mailto:sales@arrayfire.com\">contact us</a> to learn more about our training offerings.\r\n\r\nWe recommend that attendees have a working knowledge of C/C++ in order to gain the most from the training courses. For more information about the content of our training lectures and hands-on practicums, please see the following training course syllabus.\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[column type=\"one-half\" class=\"center-text\"] [gap size=\"17%\"]\r\n<div>[button type=\"flat\" shape=\"rounded\" size=\"jumbo\" href=\"mailto:sales@arrayfire.com?Subject=Training%20Inquiry\"] Register for Training[/button]</div>\r\n[/column][column type=\"one-half\" last=\"true\"][custom_headline type=\"left\" level=\"h3\"]Included in Course[/custom_headline]\r\n\r\n[icon_list] [icon_list_item type=\"angle-double-right\"]Instruction by an excellent and interesting expert, with 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[/column]\r\n\r\n<span style=\"line-height: 1.5em;\">[gap size=\"5%\"]</span>\r\n\r\n[custom_headline type=\"left\" level=\"h3\"]Training Course 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:\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:\r\nReductions\r\nScan Algorithms\r\nSort\r\nConvolution\r\nCustomer-Specific Problem [/column][/content_band]','Home','','inherit','open','open','','245-revision-v1','','','2014-06-20 19:34:15','2014-06-20 19:34:15','',245,'http://sandbox.arrayfire.com/245-revision-v1/',0,'revision','',0),(5991,7,'2014-06-20 19:35:35','2014-06-20 19:35:35','[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://www.meetme.so/arrayfire\" 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>[/column]\r\n<div id=\"arrayfire\"></div>\r\n[/content_band]\r\n\r\n[content_band inner_container=\"true\" no_margin=\"true\" border=\"top\" padding_top=\"40px\" padding_bottom=\"40px\"][column type=\"one-half\"][custom_headline type=\"left\" level=\"h3\"]Faster code[/custom_headline]\r\n\r\nArrayFire is a fast, hardware-neutral software library for GPU computing with an easy-to-use API. Its array-based function set makes 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.\r\n\r\n[gap size=\"10%\"][button  type=\"flat\" shape=\"rounded\" href=\"http://sandbox.arrayfire.com/download\" size=\"x-large\" ]Download ArrayFire[/button][/column][column type=\"one-half\" last=\"true\" class=\"center-text\"][gap size=\"5%\"][image src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/Triumvirate_Exported.png\"][/column] [gap size=\"5%\"]\r\n\r\n[column type=\"one-third\" class=\"center-text\"][image src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/04/Googlelogo-e1396387097279.png\"][line]Video content analysis is the basis for categorizing videos and enabling search by content. Google used ArrayFire to extract motion features in video, improving performance by substantially accelerating the solution of the L1-regularized least-squares optimization problem.[/column][column type=\"one-third\" class=\"center-text\"][image src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/04/Koch-Industries-e1396387359637.jpg\"][line]Andrew Shin, Market Risk Manager of Koch Supply &amp; Trading, achieves significant performance increases on option pricing algorithms using ArrayFire software, \"My buddy and I are, at best, novice programmers and we couldn\'t imagine having to figure out how to code all this in CUDA.\"[/column][column type=\"one-third\" last=\"true\" class=\"center-text\"][image src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/04/nasa-e1396387230473.png\"][line]The main thrust of this research was improving Mars rover image compression via GPUs and genetic algorithms. With ArrayFire software and GPUs, the researchers were able to achieve 5X speedups on the larger data sizes.[/column]\r\n<div id=\"hardware\"></div>\r\n[/content_band]\r\n[content_band inner_container=\"true\" no_margin=\"true\" border=\"top\" padding_top=\"40px\" padding_bottom=\"40px\"]\r\n\r\n[column type=\"one-half\"][gap size=\"15%\"]\r\n\r\n<img class=\"aligncenter\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/CUDA-logo.jpg\" alt=\"CUDA logo\" width=\"231\" height=\"140\" />\r\n\r\n<img class=\"aligncenter\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/OpenCLLogo_678x452.png\" alt=\"OpenCL\" width=\"326\" height=\"217\" />\r\n\r\n[/column][column type=\"one-half\" last=\"true\"][gap size=\"10%\"]\r\n\r\n[custom_headline type=\"left\" level=\"h3\"] ArrayFire for CUDA and OpenCL[/custom_headline]\r\n\r\nArrayFire supports 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.\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 ArrayFire\'s functions has been hand-tuned by our CUDA and OpenCL experts.\r\n\r\n[/column]\r\n<div id=\"mobile\"></div>\r\n[/content_band]\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 id=\"documentation\"></div>\r\n[/content_band]\r\n\r\n[content_band inner_container=\"true\" no_margin=\"true\" border=\"top\" padding_top=\"40px\" padding_bottom=\"40px\"][column type=\"one-half\"][custom_headline type=\"left\" level=\"h3\"]Documentation[/custom_headline]\r\n<h5>ArrayFire for C, C++, and Fortran</h5>\r\nOpen the hood—take a look at the beautiful nitty-gritty.\r\n\r\n[icon type=\"angle-double-right\"] <a href=\"http://www.sandbox.arrayfire.com/docs/installation.htm\" target=\"_blank\">CUDA &amp; OpenCL C/C++</a>\r\n<h5>Functions</h5>\r\nHundreds of functions, hand-tuned and optimized by our engineers.\r\n\r\n[icon type=\"angle-double-right\"] <a title=\"ArrayFire Functions\" href=\"http://www.sandbox.arrayfire.com/docs/modules.htm\">ArrayFire Functions</a>\r\n<h5>User Forums</h5>\r\nEvery post gets a response from ArrayFire engineers.\r\n\r\n[icon type=\"angle-double-right\"] <a href=\"http://forums.accelereyes.com/\" target=\"_blank\">User Forums</a>\r\n\r\n[/column][column class=\"center-text\" type=\"one-half\" last=\"true\" fade=\"true\" fade_animation=\"in-from-right\" ][gap size=\"5%\"][image src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/gears1.png\"][/column]\r\n<div id=\"benchmarks\"></div>\r\n[/content_band]\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\" fade=\"true\" fade_animation=\"in-from-left\" ][gap size=\"5%\"][image src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/02/Benchmark-guy-torso-opposite-e1392155948298.png\"][/column]\r\n\r\n[column type=\"one-half\" last=\"true\"][custom_headline type=\"left\" level=\"h3\" ]Benchmarks[/custom_headline]\r\n\r\nAll benchmarks were performed on a NVIDIA Tesla C2050 with an Intel i7-950 processor. 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>.[/column]\r\n\r\n[column type=\"one-fifth\"].[/column][column type=\"three-fifths\"][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\"]<img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/matrix_multiply-1024x730.png\" alt=\"Matrix Multiply\" width=\"491\" height=\"350\" />[line]<img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/matrix_transpose-1024x730.png\" alt=\"Matrix Transpose\" width=\"491\" height=\"350\" />[line]<img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/fft-1024x730.png\" alt=\"FFT\" width=\"491\" height=\"350\" />[/tab][tab]<img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/lu-1024x730.png\" alt=\"LU\" width=\"491\" height=\"350\" />[line]<img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/svd-1024x730.png\" alt=\"SVD\" width=\"491\" height=\"350\" />[line]<img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/solve-1024x730.png\" alt=\"Solve\" width=\"491\" height=\"350\" />[/tab][tab]<img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/convs-1024x730.png\" alt=\"Convs\" width=\"491\" height=\"350\" />[line]<img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/conv-1024x730.png\" alt=\"Conv\" width=\"491\" height=\"350\" />[/tab][tab]<img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/sum-1024x730.png\" alt=\"sum\" width=\"491\" height=\"350\" />[line]<img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/sort-1024x730.png\" alt=\"sort\" width=\"491\" height=\"350\" />[line]<img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/scan-1024x730.png\" alt=\"scan\" width=\"491\" height=\"350\" />[/tab][/tabs][/column][column type=\"one-fifth\" last=\"true\"].[/column]\r\n<div id=\"free\"></div>\r\n[/content_band]\r\n\r\n[content_band inner_container=\"true\" no_margin=\"true\" border=\"top\" padding_top=\"40px\" padding_bottom=\"40px\" ]\r\n\r\n[column type=\"one-half\"].[/column][column type=\"one-fourth\"].[custom_headline type=\"center\"  level=\"h3\" class=\"mtn\"]ArrayFire Free[/custom_headline][/column][column type=\"one-fourth\" last=\"true\"].[/column][column type=\"one-fourth\"  fade=\"true\" fade_animation=\"in-from-left\" ][image src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/right-leaning-e1391788779101.png\"][/column][column type=\"one-fourth\"]\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>[custom_headline type=\"center\" level=\"h5\"]Functions[/custom_headline]</td>\r\n</tr>\r\n<tr>\r\n<td>[icon type=\"check-circle\" style=\"color: #8cc540;\"] Basic Operations</td>\r\n</tr>\r\n<tr>\r\n<td>[icon type=\"check-circle\" style=\"color: #8cc540;\"] Arithmetic</td>\r\n</tr>\r\n<tr>\r\n<td>[icon type=\"check-circle\" style=\"color: #8cc540;\"] Signal Processing</td>\r\n</tr>\r\n<tr>\r\n<td>[icon type=\"check-circle\" style=\"color: #8cc540;\"] Image Processing</td>\r\n</tr>\r\n<tr>\r\n<td>[icon type=\"check-circle\" style=\"color: #8cc540;\"] Statistics</td>\r\n</tr>\r\n<tr>\r\n<td>[icon type=\"check-circle\" style=\"color: #8cc540;\"] Visualization</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n[gap size=\"17%\"][button type=\"flat\" block=\"true\" shape=\"rounded\" size=\"large\"  href=\"http://sandbox.arrayfire.com/download\"]Download ArrayFire[/button] [/column][column type=\"one-fourth\"]\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>[custom_headline type=\"center\" level=\"h5\"]Hardware[/custom_headline]</td>\r\n</tr>\r\n<tr>\r\n<td>[icon type=\"check-circle\" style=\"color: #8cc540;\"] CUDA</td>\r\n</tr>\r\n<tr>\r\n<td>[icon type=\"check-circle\" style=\"color: #8cc540;\"] OpenCL</td>\r\n</tr>\r\n<tr>\r\n<td>[custom_headline type=\"center\" level=\"h5\"]Languages[/custom_headline]</td>\r\n</tr>\r\n<tr>\r\n<td>[icon type=\"check-circle\" style=\"color: #8cc540;\"] C/C++</td>\r\n</tr>\r\n<tr>\r\n<td>[icon type=\"check-circle\" style=\"color: #8cc540;\"] Fortran</td>\r\n</tr>\r\n<tr>\r\n<td>[custom_headline type=\"center\" level=\"h5\"]Advanced[/custom_headline]</td>\r\n</tr>\r\n<tr>\r\n<td> [icon type=\"check-circle\" style=\"color: #8cc540;\"] GFOR Loop</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n[/column][column type=\"one-fourth\" last=\"true\"]\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>[custom_headline type=\"center\" level=\"h5\"]Platforms[/custom_headline]</td>\r\n</tr>\r\n<tr>\r\n<td>[icon type=\"check-circle\" style=\"color: #8cc540;\"] Windows</td>\r\n</tr>\r\n<tr>\r\n<td>[icon type=\"check-circle\" style=\"color: #8cc540;\"] Linux</td>\r\n</tr>\r\n<tr>\r\n<td>[icon type=\"check-circle\" style=\"color: #8cc540;\"] Mac</td>\r\n</tr>\r\n<tr>\r\n<td>[custom_headline type=\"center\" level=\"h5\"]Data Types[/custom_headline]</td>\r\n</tr>\r\n<tr>\r\n<td>[icon type=\"check-circle\" style=\"color: #8cc540;\"] All types</td>\r\n</tr>\r\n<tr>\r\n<td>[custom_headline type=\"center\" level=\"h5\"]Support[/custom_headline]</td>\r\n</tr>\r\n<tr>\r\n<td> [icon type=\"check-circle\" style=\"color: #8cc540;\"] Forums</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n<div id=\"licensing\"></div>\r\n[/column][gap size=\"8%\"]\r\n\r\n[pricing_table id=\"pricing\" columns=\"3\"][pricing_table_column  featured=\"false\" title=\"ArrayFire Developer\" currency=\"$\" price=\"499 / year\" interval=\"$149 / year (Academic)\"] [icon_list] [icon_list_item type=\"star\" ]Dedicated license [/icon_list_item] [icon_list_item  type=\"times-circle\"] Starts at 2 GPUs or devices [/icon_list_item] [icon_list_item type=\"times-circle\"] Linear algebra [/icon_list_item] [icon_list_item type=\"times-circle\"] Sparse matrices [/icon_list_item][icon_list_item type=\"times-circle\"] Phone support [/icon_list_item][icon_list_item type=\"times-circle\"] Premium support &amp; consulting [/icon_list_item][/icon_list] [button href=\" http://sandbox.arrayfire.com/product-category/arrayfire/\"] Purchase [/button] [/pricing_table_column] [pricing_table_column featured=\"true\" featured_sub=\"Most Popular\" title=\"ArrayFire Pro\" currency=\"$\" price=\"1,499 / year\" interval=\"$525 / year (Academic)\"] [icon_list] [icon_list_item type=\"star\"] Dedicated license [/icon_list_item] [icon_list_item type=\"star\"] Starts at 2 GPUs or devices [/icon_list_item] [icon_list_item type=\"star\"] Linear algebra [/icon_list_item][icon_list_item type=\"star\"] Sparse matrices [/icon_list_item][icon_list_item type=\"times-circle\"] Phone support [/icon_list_item][icon_list_item type=\"times-circle\"] Premium support &amp; consulting [/icon_list_item] [/icon_list] [button href=\" http://sandbox.arrayfire.com/product-category/arrayfire/\"]Purchase [/button] [/pricing_table_column] [pricing_table_column featured=\"false\" title=\"ArrayFire Enterprise\" currency=\"$\" price=\"2,999 / year\" interval=\"$1,049 / year (Academic)\"] [icon_list] [icon_list_item type=\"star\"] Dedicated license [/icon_list_item] [icon_list_item type=\"star\"] Starts at 2 GPUs or devices [/icon_list_item] [icon_list_item type=\"star\"] Linear algebra [/icon_list_item][icon_list_item type=\"star\"]Sparse matrices [/icon_list_item][icon_list_item type=\"star\"] Phone support[/icon_list_item][icon_list_item type=\"star\"]Premium support &amp; consulting [/icon_list_item][/icon_list] [button href=\" http://sandbox.arrayfire.com/product-category/arrayfire/\"] Purchase [/button] [/pricing_table_column] [/pricing_table]\r\n<div id=\"whitepapers\"></div>\r\n[/content_band]\r\n\r\n[content_band inner_container=\"true\" no_margin=\"true\" border=\"top\" padding_top=\"40px\" padding_bottom=\"40px\" ]\r\n\r\n[column type=\"one-half\"][gap size=\"20%\"][image type=\"thumbnail\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/02/wp2.jpg\"][button href=\"http://go.sandbox.arrayfire.com/l/37882/2014-05-29/dw83/37882/18534/arrayfire_matrix_computations_chrzeszczyk.pdf\" shape=\"rounded\" size=\"regular\" block=\"true\"]Download <em>Matrix Computations on the GPU with ArrayFire for C/C++</em>[/button][/column][column type=\"one-half\" last=\"true\"]\r\n\r\n[custom_headline type=\"left\" level=\"h3\" ]Whitepapers[/custom_headline]\r\n\r\n<img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/02/Whitepaper-1.png\" alt=\"Whitepaper 1\" width=\"466\" height=\"374\" />\r\n\r\n&nbsp;\r\n\r\n[/column][gap size=\"10%\"]\r\n\r\n[column type=\"one-half\"]<img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/02/Whitepaper-2.png\" alt=\"Whitepaper 2\" width=\"442\" height=\"304\" />[/column][column type=\"one-half\" last=\"true\"][image type=\"thumbnail\" src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/02/wp1.jpg\"][button href=\"http://go.sandbox.arrayfire.com/l/37882/2014-05-29/dw81/37882/18532/arrayfire_whitepaper.pdf\" shape=\"rounded\" size=\"regular\"  block=\"true\" float=\"right\"]Download <em>High-level GPU Computing in C, C++, and Fortran</em>[/button][/column]\r\n<div id=\"casestudies\"></div>\r\n[/content_band]\r\n\r\n[content_band inner_container=\"true\" no_margin=\"true\" border=\"top\" padding_top=\"40px\" padding_bottom=\"40px\" ]\r\n\r\n[column type=\"one-half\"][gap size=\"12%\"][custom_headline type=\"left\" level=\"h3\" ]Case Studies[/custom_headline]\r\n\r\nLearn how ArrayFire has worked in real code, including applications in academia, finance, government, life sciences, manufacturing, media, and oil &amp; gas.[/column][column type=\"one-half\" last=\"true\" fade=\"true\" fade_animation=\"in-from right\"][image src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/02/model-A.png\"][/column][custom_headline type=\"left\" level=\"h5\"]Academia [/custom_headline][accordion][accordion_item title=\"Accelerating LTE Simulation | Tsinghua University\"]\r\n\r\nAuthors: Yuan Gao, Yin Sun, Chun Hui Zhou, Xin Su, Xi Bin Xu, Shi Dong Zhou, Tsinghua University\r\nSpeedup: 3X\r\n\r\nFast simulations are a driving force in several research projects. However, the accompanying long simulation times can tend to be a drag in many of these projects. In this article, we shall bring up the example of the work on 3GPP LTE System Simulation by Yuan Gao et al (from Tsinghua University, Beijing) and demonstrate how the use of ArrayFire software can significantly improve the simulator performance and lead to faster validation times in simulation projects.[/accordion_item]\r\n\r\n[accordion_item title=\"High Performance Compressive Sensing | Rice University\"]\r\n\r\nAuthors: Nabor Reyna and Wotao Yin from Rice University\r\nSpeedup: 5X\r\n\r\nThis work deals with reconstruction of signals using partial Fourier matrices (RecPF). The major computational components of the algorithm involve shrinkage and FFTs. ArrayFire software is employed to accelerate this compute-heavy code.[/accordion_item]\r\n\r\n[accordion_item title=\"Power System Simulations | Indian Institute of Technology, Roorkee, India\"]\r\nAuthors: Indian Institute of Technology, Roorkee\r\nSpeedup: 35X\r\n\r\nPower flow studies are one of the most important aspects of power system planning and operation. The power flow reveals the sinusoidal steady state characteristics of the entire system - voltages, real and reactive power generated, and absorbed and line losses- elucidating the voltage magnitudes and angles at each bus, the generation of each generating unit, and real and reactive power losses in the system. All this is necessary to ensure the security, economy, and control of electrical energy distribution. Learn how ArrayFire software can deliver magnitudes of performance improvement over CPU-based solutions.[/accordion_item]\r\n\r\n[accordion_item title=\"Antenna Array Simulations | University of Naples Federico II\"]\r\n\r\nAuthors: A. Capozzoli, C. Cucio, A. Liseno at University of Naples Federico II\r\nSpeedup: 24X\r\n\r\nAntenna array design involves repeated simulation to tune the many parameters involved, and waiting around for simulations to finish is no fun. Offloading the optimization problem onto the GPU cuts that time down significantly. In their recent paper, Capozzoli, Curcio, and Liseno of University of Naples Federico II demonstrated how a simple modification to their echo generator array simulation took advantage of the GPU to bring immediate speedups.[/accordion_item]\r\n\r\n[accordion_item title=\"Laplace Transform Inversion | Acunum Algorithms and Simulations\"]\r\n\r\nAuthors: Patrick Kano and Moysey Brio at Acunum Algorithms and Simulations\r\nSpeedup: 3.8X\r\n\r\nThe numerical inversion of the Laplace transform is a long standing problem due its implicit ill-posedness. Patrick Kano and Moysey Brio of Acunum Algorithms and Simulations, with their experience in computational methods and algorithm development, found a solution that not only works, but is very fast.[/accordion_item]\r\n\r\n[accordion_item title=\"Compressed Sensing for Image Reconstruction | College of Engineering, Roorkee, India\"]\r\n\r\nAuthors: Kuldeep Yadav, Ankush Mittal, M. A. Ansar, and Avi Srivastava, College of Engineering, Roorkee, India\r\nSpeedup: 8X\r\n\r\nCompressed sensing is very critical in the areas of medical image reconstruction, image acquisition or sensor networks. An algorithm for compressed sensing developed using a Basis Pursuit Algorithm shows over 8X speedup when run on an NVIDIA GPU.[/accordion_item]\r\n\r\n[accordion_item title=\"Fat/Water Reconstruction for Medical Images | Case Western Reserve University\"]\r\n\r\nAuthors: D. H. Johnson, S. Narayan, C. A. Flask, and D. L. Wilson, Case Western Reserve University\r\nSpeedup: 11.6X\r\n\r\nCase Western Reserve University researchers turned to GPUs running ArrayFire software to develop a fast and robust version of the \"Iterative Decomposition of water and fat with an Echo Asymmetry and Least-squares\" (IDEAL) reconstruction algorithm. This algorithm uses a lot of Image Processing algorithms for reconstruction, and was shown to achieve very high speedups.\r\n[/accordion_item]\r\n\r\n[/accordion]\r\n<h5>Finance</h5>\r\n[accordion][accordion_item title=\"Option Pricing | Koch Supply and Trading\"]\r\n\r\nAuthors: Koch Supply &amp; Trading\r\nSpeedup: 51.8X\r\n\r\nAndrew Shin, Market Risk Manager of Koch Supply &amp; Trading, achieves significant performance increases on option pricing algorithms using ArrayFire software to accelerate his code with GPUs. Andrew says, \"My buddy and I are, at best, novice programmers and we couldn\'t imagine having to figure out how to code all this in CUDA.\" But he found ArrayFire software to be straight-forward. With these results, he says he can see ArrayFire software and GPUs populating Koch\'s mark-to-futures cube, which contains its assets, simulations, and simulated asset prices.[/accordion_item]\r\n\r\n[accordion_item title=\"GPU Computing in Automated Trader | Automated Trader\"]\r\n\r\nAuthors: Automated Trader\r\nSpeedup: 37.5X\r\n\r\nThe Q1 2012 issue of Automated Trader contains an excellent Mashup piece reviewing software for algorithmic trading. The article provides a wonderful glimpse into the 1-2 month adventure of Andy Webb, Automated Trader.s Founder, and Wrecking Crew building a fast trading platform from several technologies. The full trading platform they built was quite extensive. The part that caught our eye was the core computational component of the pipeline. That component involved permuting 1,000 potential pairs with cointegration tests for 350 time windows on each potential pair.\r\n[/accordion_item]\r\n[accordion_item title=\"GPUs in Quantitative Analytics and Finance | Private Bank\"]\r\n\r\nThe world of Quantitative finance is all about getting accurate results really, really fast. ArrayFire is working with one of the largest banks in Spain to maximize their output using GPUs. Click the link below for an overview of the uses of GPU computing in finance.[/accordion_item][/accordion]\r\n<h5>Government</h5>\r\n[accordion][accordion_item title=\"Powering Mars Research | NASA and UAA in Anchorage\" ]\r\n\r\nAuthors: NASA and UAA in Anchorage\r\nSpeedup: 5X\r\n\r\nThe main thrust of this research is improving mars rover image compression via GPUs and genetic algorithms. With ArrayFire software and GPUs, the researchers were able to achieve 5X speedups on the larger data sizes. The algorithm works by pairing neighboring pixels with a random one and then adjusting the random pixel based on whether it incrementally improves the original image. Babb described the algorithm as an embarrassingly parallel process, ideally suited to GPU acceleration. He estimates he has been able to achieve a 20 to 30 percent error reduction in subjects like fingerprints and satellite imagery.[/accordion_item]\r\n\r\n[accordion_item title=\"Radar Image Formation | System Planning Corporation\"]\r\n\r\nAuthors: Gary Rubin and Earl Sager - System Planning Corporation\r\nSpeedup: ~45X\r\n\r\nRadar imaging is computationally intensive. As a result, many imaging algorithms apply FFT-based approximations. While efficient, these algorithms sacrifice data fidelity for speed. Other algorithms better preserve information, but are often too slow for many applications. At System Planning Corporation (SPC) , we have implemented a SAR/ISAR imaging routine based on the Backprojection algorithm. Using ArrayFire software, we have demonstrated speedups of roughly 45x for large datasets.[/accordion_item]\r\n\r\n[accordion_item title=\"Radar Clutter Reduction | System Planning Corporation\"]\r\n\r\nAuthors: David Berger and Gary Rubin - System Planning Corporation\r\nSpeedup: 5-10X\r\n\r\nSystem Planning Corporation (SPC) uses ArrayFire software to accelerate radar processing algorithms. The system processes raw data from marine navigation radars using a variety of thresholding techniques to extract real targets from clutter. This involves highly data-parallel processing in which each radar pulse is subjected to the same computations; very few operations occur across multiple pulses. Using ArrayFire software, SPC has achieved 10x speed improvements relative to a Core i7-920 CPU and 5x improvements relative to a realtime DSP implementation.[/accordion_item]\r\n\r\n[accordion_item title=\"Novel Algorithms for Linear Algebra | SAIC\" ]\r\n\r\nAuthors: Nolan Davis and Daniel Redig, SAIC\r\nSpeedup: 3.5X\r\n\r\nNolan Davis and Daniel Redig at SAIC recently presented work on Hybrid GPU/Multicore Solutions for Large Linear Algebra Problems where they developed a novel algorithm for LU decomposition, one of the most important routines in linear algebra. They presented a Hybrid CPU/GPU computing approach, where problems too large to fit in GPU memory can also be solved faster than using only the CPU.\r\n[/accordion_item]\r\n[accordion_item title=\"Geolocation | BAE Systems\"]\r\n\r\nAuthors: BAE Systems\r\nSpeedup: 17X\r\n\r\nGeolocation is the identification of the real-world geographic location of a target of interest. In this application, the system receives the signal with an array of several antennas and computes the direction of arrival of the radio energy by measuring the time difference of arrival (or the phase difference) at the different antennas.\r\n[/accordion_item]\r\n[accordion_item title=\"Tsunami Modeling | University of Minnesota, Boise State, Saint Scholastica, and NCAR\"]\r\n\r\nAuthors: University of Minnesota, Boise State, Saint Scholastica, and NCAR\r\nSpeedup: 3-5X\r\n\r\nNatural catastrophic disasters like tsunamis commonly strike with little warning. For most people, tsunamis are underrated as major hazards. People sometimes wrongly believe that they occur infrequently and only along distant coasts. Tsunamis are usually caused by earthquakes. Seismic signals can give some margin of warning since the speed of tsunami waves travels at 1/30 the speed of seismic waves. Still there is little time between the creation of the tsunami and its impact making fast processing critical to producing effective warning systems. ArrayFire software was used to run an RBF simulation on the GPU with a time to solution not available by other alternatives.\r\n[/accordion_item][/accordion]\r\n<h5>Life Sciences</h5>\r\n[accordion][accordion_item title=\"Parallelized Gene Predictors | University of Quebec\" ]\r\n\r\nAuthors: University of Quebec\r\nSpeedup: 43X\r\n\r\nComputerized approaches to studying the human genome are challenged by the exploding amount of data, which doubles roughly every 6 months. In order to deal with this burgeoning datasets, demands for faster processing power continue to arise. This work focuses on predicting genes using frequency analysis with FFTs and with an equivalent technique known as Goertzel\'s algorithm. In these applications, the emphasis of this paper is to propose tools to geneticists and molecular biologists for the prediction or identification of new genes using existing complementary strategies. The criteria for these tools are speed, reliability, accuracy and ease of use, thus requiring little training.\r\n[/accordion_item]\r\n[accordion_item title=\"Pathology Advances with GPUs | Northeastern University\" ]\r\n\r\nAuthors: Laboratory for Spectral Diagnosis at Northeastern University\r\nSpeedup: 100X+\r\n\r\nOne element of the hyperspectral image analysis workflow that requires more than a traditional desktop workstation or personal computer is Hierarchical Cluster analysis (HCA). HCA requires a large amount of data space and substantial computation time (~11 hours) for typical datasets using a single processor personal computer. Rather than following the traditional approach of moving to a lower level programming language like C or C++ and complex parallel programming paradigms such as OpenMP or the Massage Passing Interface (MPI), the lab utilized graphics processing units, or GPUs, and the ArrayFire software platform. The solution allowed the lab to dramatically increase the performance of the analysis while substantially decreasing the amount of calendar time to reach the desired results.\r\n[/accordion_item]\r\n[accordion_item title=\"Hepatitis C Virus - Mutation Modeling | Centers for Disease Control and Prevention\" ]\r\n\r\nAuthors: CDC Research and Development Team\r\nSpeedup: ~20X\r\n\r\nThis case study provides a look at biological research regarding coordinated mutations of the Hepatitis C Virus (HCV). ArrayFire provided collaborative R&amp;D resources and greatly improved the speed of this HCV research with the use of parallelization, reducing the computing time from 40 days to less than 1 day. Most importantly, the conclusion of the case study illustrates the the relative price-performance of personal supercomputers that leverage GPUs and ArrayFire software provides a compelling solution versus other architectures and approaches.\r\n[/accordion_item]\r\n[accordion_item title=\"Accelerating the SPM Package for Neuroimaging | Georgia Institute of Technology\" ]\r\n\r\nAuthors: Georgia Institute of Technology\r\nSpeedup: 3.5X\r\n\r\nThe Georgia Tech team explores the value of ArrayFire software and GPUs for fMRI workflows within the popular SPM - Statistical Parametric Mapping software widely used in neuroscience research.\r\n[/accordion_item]\r\n[accordion_item title=\"Medical Image Compression | Indian Institute of Technology, Roorkee, India\" ]\r\n\r\nAuthors: Jaideep Singh, Ipseeta Aruni, R. Balasubramanian - IIT - Roorkee, India\r\nSpeedup: 38X\r\n\r\nThis study presents the acceleration of Haar wavelet-based image compression algorithm for medical imaging on the Graphics Processing Unit (GPU) using ArrayFire software. Due to bandwidth and image size constraints of medical imaging systems, image compression plays a vital role in reducing the bit rate of transmission or storage. Wavelet-based image compression provides the most promising approach for high quality image compression.\r\n[/accordion_item]\r\n[accordion_item title=\"Brain Displacement | Spencer Technologies\"]\r\n\r\nAuthors: Spencer Technologies\r\nSpeedup: 12X\r\n\r\nSpencer describes how ArrayFire software facilitates the development of fast algorithms enabling observation of brain displacement across depth with sampling density that far surpasses previous benchmarks.\r\n[/accordion_item]\r\n[accordion_item title=\"Multidimensional Scaling for Genomics | Leibniz Institute of Plant Genetics and Crop Plant Research\" ]\r\n\r\nAuthors: Leibniz Institute of Plant Genetics and Crop Plant Research\r\nSpeedup: 20-35X\r\n\r\nMultidimensional scaling (MDS) is a general computing technique to turn a distance matrix into a set of reconstructed points with pair-wise relationships approximating the original distances by points located in a usually low-dimensional space. ArrayFire software is used to enhance execution of the HiT-MDS procedure and delivers considerable performance improvement.\r\n[/accordion_item]\r\n[accordion_item title=\"Drug Delivery Model | Georgia Institute of Technology\"]\r\n\r\nAuthors: Georgia Institute of Technology\r\nSpeedup: 70X\r\n\r\nIn this work, the researchers simulate the delivery of a novel nanoparticle chemotherapy drug to cancerous tissue. Simulation allows scientists to predict experimental outcomes and thus reduce the cost of development and time to clinical relevance. The simulation model includes blood vessels, tumor cells, and healthy cells and an engine to calculate the spatial distributions of both drug and oxygen. ArrayFire software is used to speed up the diffusion calculations for the drug and oxygen within the tissue.\r\n[/accordion_item]\r\n[accordion_item title=\"Biomedical Infrared Spectroscopy | University of Manchester and Nofima Mat, Norway\" ]\r\n\r\nAuthors: University of Manchester and Nofima Mat, Norway\r\nSpeedup: Hours of runtime reduction\r\n\r\nThe authors present an iterative algorithm that applies full Mie scattering theory and avoids noise accumulation in their iterative algorithm by integrating a curve-fitting step. ArrayFire software along with NVIDIA GPUs are leveraged to reduce the time added by the curve-fitting step.\r\n[/accordion_item][/accordion]\r\n<h5>Manufacturing</h5>\r\n[accordion][accordion_item title=\"Feature Learning on Images | Stanford\" ]\r\n\r\nAuthors: Andrew Ng, Stanford University\r\nSpeedup: Ability to process many images in parallel\r\n\r\nStanford researchers in Andrew Ng\'s group used GPUs and ArrayFire software to speed up their work on Feature Learning Architectures. They decided to use ArrayFire software for this study because of the need to quickly evaluate many architectures on thousands of images. ArrayFire software taps into the immense computing power of GPUs and speeds up research utilizing many images.\r\n[/accordion_item]\r\n[accordion_item title=\"Tomography of Vegetation - Filtered Back-Projection and Non-Uniform FFTs | Universita di Napoli Federico II\" ]\r\n\r\nAuthors: Drs. Capozzoli, Curcio, di Vico, and Liseno, Universita di Napoli Federico II\r\nSpeedup: 10X\r\n\r\nIn order to investigate changes of forest biomass, scientists use microwave tomography to image the vegetation. At the smallest scale, individual plants can be imaged to investigate branching and growth, but even synthetic aperture radar can reveal large-scale changes in regional ecology. To the right, you can see the experimental setup to image an individual plant.\r\n[/accordion_item]\r\n[accordion_item title=\"Action Recognition with Independent Subspace Analysis | Stanford University\" ]\r\n\r\nAuthors: Quoc Le, Will Zou, Serena Yeung, Andrew Ng, Stanford University\r\nSpeedup: 4.4X\r\n\r\nIn a paper at this year\'s CVPR 2011, entitled \"Learning hierarchical invariant spatio-temporal features for action recognition with independent subspace analysis\", the authors explain how their unsupervised feature learning algorithm competes with other algorithms that are hand crafted or use learned features. For their training purposes, they used a multi-layered stacked convolutional ISA (Independent subspace analysis) network. An ISA is used for learning features from image patches without supervision.\r\n[/accordion_item][/accordion]\r\n<h5>Media and Computer Vision</h5>\r\n[accordion][accordion_item title=\"Fast Computer Vision with OpenCV and ArrayFire | OpenCV Blogger\" ]\r\n\r\nAuthors: OpenCV Blogger\r\nSpeedup: ~10X\r\n\r\nThe OpenCV library is the defacto standard for doing computer vision and image processing research projects. OpenCV includes several hundreds of computer vision algorithms, aimed for use in realtime vision applications. This case study shows how to use both libraries together. There is a simple example application that demonstrates using OpenCV for webcam access and ArrayFire for some basic processing routines and displaying results.\r\n[/accordion_item]\r\n[accordion_item title=\"Video Processing | Google\" ]\r\n\r\nAuthors: Google and Stanford\r\nSpeedup: 10-20X\r\n\r\nVideo content analysis is the basis for categorizing videos and enabling search by content. Growing interest in using sparse-coding methods to extract motion features in video in support of video content analysis led to the application of ArrayFire software to improve performance by substantially accelerating the solution of the L1-regularized least-squares optimization problem.\r\n[/accordion_item]\r\n[accordion_item title=\"Action Recognition with Independent Subspace Analysis | Stanford University\"]\r\n\r\nAuthors: Quoc Le, Will Zou, Serena Yeung, Andrew Ng, Stanford University\r\nSpeedup: 4.4X\r\n\r\nIn a paper at this year\'s CVPR 2011, entitled \"Learning hierarchical invariant spatio-temporal features for action recognition with independent subspace analysis\", the authors explain how their unsupervised feature learning algorithm competes with other algorithms that are hand crafted or use learned features. For their training purposes, they used a multi-layered stacked convolutional ISA (Independent subspace analysis) network. An ISA is used for learning features from image patches without supervision.\r\n[/accordion_item]\r\n[accordion_item title=\"Music Beat Analysis | Georgia Tech\"]\r\n\r\nAuthors: Vidhur Vohra - Georgia Tech\r\nSpeedup: 15X\r\n\r\nDid you ever wonder how the music visualizer in your media player works? Watching it pulsate in synchrony with the beats of the song is almost as entertaining as listening to the song itself! Researchers have been attempting to detect beats in audio signals for many years, and there are many techniques available, from the simplest (and least accurate) to more complicated algorithms that are highly accurate. All algorithms, though, perform some form of signal processing and frequency analysis, applications highly suited to GPU Computing.\r\n[/accordion_item]\r\n[accordion_item title=\"Optimization Methods for Deep Learning | Stanford Artificial Intelligence Laboratory\" ]\r\n\r\nAuthors: Stanford Artificial Intelligence Laboratory\r\nSpeedup: Improved accuracy\r\n\r\nResearchers at SAIL (Stanford Artificial Intelligence Laboratory), have done it again. They have successfully used ArrayFire software to speed up the training part of Deep Learning algorithms. In their paper titled .On Optimization Methods for Deep Learning., they experiment with some of the well known training algorithms and demostrate their scalability across parallel architectures (GPUs as well as multi-machine networks). The algorithms include SGDs (Stochastic Gradient Descent) L-BFGS (Limited BFGS used for solving non-linear problems), CG (Conjugate Gradient).\r\n[/accordion_item]\r\n[accordion_item title=\"Feature Learning on Images | Stanford University\" ]\r\n\r\nAuthors: Andrew Ng, Stanford University\r\nSpeedup: Ability to process many images in parallel\r\n\r\nStanford researchers in Andrew Ng’s group used ArrayFire software to speed up their work on Feature Learning Architectures. They decided to use ArrayFire software for this study because of the need to quickly evaluate many architectures on thousands of images. ArrayFire software taps into the immense computing power of GPUs and speeds up research utilizing many images.\r\n[/accordion_item]\r\n[accordion_item title=\"Digital Holography for Imaging | National University of Ireland, Maynooth\" ]\r\n\r\nAuthors: Nitesh Pandey, Damien Kelly, Bryan Hennelly and Thomas Naughton from the National University of Ireland, Maynooth\r\nSpeedup: 17X\r\n\r\nDigital holography is a powerful imaging technique with many new applications like true 3D display. It allows the capture of both amplitude and phase information of the light reflected off the surface of 3D objects. Researchers at the National University of Ireland, Maynooth are developing techniques based on digital holography for 3D display applications.\r\nReconstruction of large digital holograms can be computationally intensive to generate on CPUs, but GPUs running ArrayFire software offer amazing possibilities.\r\n[/accordion_item][/accordion]\r\n<h5>Oil and Gas</h5>\r\n[accordion][accordion_item title=\"3D Mantle Convection - Geodynamics | Boise State, University of Colorado, University of Minnesota\" ]\r\n\r\nAuthors: Boise State, University of Colorado, University of Minnesota\r\nSpeedup: 2.5-4.5X\r\n\r\nThe authors introduce a GPU implementation of a three-dimensional mantle convection modeling at a high Rayleigh number to the solid earth geophysics community. They outline code development time, compare performance of CPUs versus GPUs, and deliver powerful visualizations.\r\n[/accordion_item]\r\n[accordion_item title=\"Ground Water Simulations | Louisiana State University\" ]\r\n\r\nAuthors: Kevin R. Tubbs and Frank T-C. Tsai at Louisiana State University\r\nSpeedup: &gt;20X\r\n\r\nA lattice Boltzmann method for solving the shallow water equations and the advection-dispersion equation is developed and implemented on graphics processing unit (GPU)-based architectures. The proposed LBM is implemented to an NVIDIA Computing Processor in a single GPU workstation. GPU computing is performed using ArrayFire software. Mass transport with velocity-dependent dispersion in shallow water flow is simulated by combining the MRT-LBM model and the TRT-LBM model. The GPU parallel performance increases as the grid size increases. The results indicate the promise of the GPU-accelerated LBM for modeling mass transport phenomena in shallow water flows.\r\n[/accordion_item]\r\n[accordion_item title=\"Shallow Water Fluid Flow | Louisiana State University\" ]\r\n\r\nAuthors: Louisiana State University\r\nSpeedup: &gt;10X\r\n\r\nA lattice Boltzmann method (LBM) on high performance computing (HPC) environments for three-dimensional shallow water flow fields coupled to mass transport is developed. LBM is an attractive method for solving the multilayered shallow water equations because the extension to multilayer is straight forward with all of the simplicities and advantages of the LBM in mass transport in shallow water flows and the LBM performance on central processing unit (CPU)-based and graphics processing unit (GPU)-based HPC environments.\r\n[/accordion_item][/accordion]\r\n<div id=\"consulting\"></div>\r\n[/content_band]\r\n<div id=\"services\"></div>\r\n[content_band inner_container=\"true\" no_margin=\"true\" border=\"top\" padding_top=\"40px\" padding_bottom=\"40px\"][column type=\"one-half\"][custom_headline type=\"left\" level=\"h3\"]Hire our acceleration gang[/custom_headline]\r\n\r\nHire us to accelerate your code. Or to train your pros. Or even to write new code for your organization!\r\n\r\nWe’ve already helped thousands of organizations speedup their code. We’ve accelerated algorithms, data sets, and challenging problems of all types in the past, and we’re confident that we can accelerate your code too.\r\n\r\n[gap size=\"10%\"][button  type=\"flat\" shape=\"rounded\" href=\"http://meetme.so/arrayfire\" size=\"x-large\" ]Schedule a consultation[/button][/column][column type=\"one-half\" last=\"true\" class=\"center-text\"][gap size=\"5%\"][image src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/Bat-signal-e1391790016951.png\"][/column] [gap size=\"7%\"]\r\n\r\n[column type=\"one-third\" class=\"center-text\"][image src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/04/LFG-B-HORZ_202_K-e1396448935778.jpg\"][line]Lincoln Financial Group 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 10-12 hours to run the entire code. After porting to CUDA, they were able to do the same work in about 30 minutes.[/column][column type=\"one-third\" class=\"center-text\"][image src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/02/reveal_logo-e1396449044651.jpg\"][line]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.[/column][column type=\"one-third\" last=\"true\" class=\"center-text\"][image src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/04/1800contactlogo.png\"][line]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.[/column]\r\n<div id=\"starterpackage\"></div>\r\n[/content_band]\r\n\r\n[content_band inner_container=\"true\" no_margin=\"true\" border=\"top\" padding_top=\"40px\" padding_bottom=\"40px\"]\r\n\r\n[column type=\"one-half\" last=\"false\" fade=\"true\" fade_animation=\"in-from-left\" ][gap size=\"10%\"][image src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/01/comingatyou.png\"][/column][column type=\"one-half\" last=\"true\"] [custom_headline type=\"left\" level=\"h3\"]Starter Package ($500)* [/custom_headline] Hire us for 1-day. We set you up with one engineer dedicated for a full day, as well as support from 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\"]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 the code as is possible within the 1-day effort, applying our extensive GPU software libraries[/icon_list_item][icon_list_item type=\"angle-double-right\"]We produce a final report, along with 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&nbsp;\r\n\r\n[button type=\"flat\" shape=\"rounded\" size=\"regular\" href=\"http://sandbox.arrayfire.com/product/consulting-starter-package/\" title=\"Starter Package\"]Buy the Starter Package[/button]\r\n\r\n&nbsp;\r\n\r\n*Limit one (1) per customer.\r\n\r\n[/column]\r\n<div id=\"customcode\"></div>\r\n[/content_band] [content_band inner_container=\"true\" no_margin=\"true\" border=\"top\" padding_top=\"40px\" padding_bottom=\"40px\" ]\r\n\r\n[column type=\"one-half\"][custom_headline type=\"left\" level=\"h3\" ]Custom Coding Work[/custom_headline]\r\n\r\n[custom_headline type=\"left\" level=\"h6\" ]Why Choose Us?[/custom_headline] [icon_list] [icon_list_item type=\"angle-double-right\"]Deep experience, already servicing thousands of customers[/icon_list_item] [icon_list_item type=\"angle-double-right\"]Quality work, with leading GPU software [/icon_list_item] [icon_list_item type=\"angle-double-right\"]Efficient delivery, with ArrayFire\'s code base we can deliver results fast[/icon_list_item][icon_list_item type=\"angle-double-right\"]Proven, we make customers happy through faster code[/icon_list_item][/icon_list] [custom_headline type=\"left\" level=\"h6\" ]Our Strengths[/custom_headline] [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\" size=\"regular\" href=\"http://meetme.so/arrayfire\" title=\"Tech Consultation\"]Schedule a consultation[/button] [/column][column type=\"one-half\"  fade=\"true\" fade_animation=\"in-from-right\" last=\"true\" ][gap size=\"25%\"][image src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/02/Holoham.png\"][/column]\r\n<div id=\"training\"></div>\r\n[/content_band] [content_band inner_container=\"true\" no_margin=\"true\" border=\"top\" padding_top=\"40px\" padding_bottom=\"40px\" ]\r\n\r\n[column type=\"one-half\"][custom_headline type=\"left\" level=\"h3\" ]Training[/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. Please <a href=\"mailto:sales@arrayfire.com\">contact us</a> to learn more about our training offerings.\r\n\r\nWe recommend that attendees have a working knowledge of C/C++ in order to gain the most from the training courses. For more information about the content of our training lectures and hands-on practicums, please see the following training course syllabus.\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[column type=\"one-half\" class=\"center-text\"] [gap size=\"17%\"]\r\n<div>[button type=\"flat\" shape=\"rounded\" size=\"jumbo\" href=\"mailto:sales@arrayfire.com?Subject=Training%20Inquiry\"] Register for Training[/button]</div>\r\n[/column][column type=\"one-half\" last=\"true\"][custom_headline type=\"left\" level=\"h3\"]Included in Course[/custom_headline]\r\n\r\n[icon_list] [icon_list_item type=\"angle-double-right\"]Instruction by an excellent and interesting expert, with 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[/column]\r\n\r\n<span style=\"line-height: 1.5em;\">[gap size=\"5%\"]</span>\r\n\r\n[custom_headline type=\"left\" level=\"h3\"]Training Course 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:\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:\r\nReductions\r\nScan Algorithms\r\nSort\r\nConvolution\r\nCustomer-Specific Problem [/column][/content_band]','Home','','inherit','open','open','','245-revision-v1','','','2014-06-20 19:35:35','2014-06-20 19:35:35','',245,'http://sandbox.arrayfire.com/245-revision-v1/',0,'revision','',0),(5992,17794,'2014-06-20 19:39:27','2014-06-20 19:39:27','ArrayFire is a fantastic library when it comes to speed and performance. One of the things that people overlook when evaluating ArrayFire is the indexing options available to the user.\r\n\r\nThe ArrayFire library exposes the array data structure to the user. The array stores the data in a column major order. This means that the following code:\r\n\r\n<pre>\r\nfloat[] a = {1, 2, 3, 4, 5, 6, 7, 8, 9};\r\narray A(3, 3, a);\r\n</pre>\r\n\r\nWill produce the following matrix:\r\n\r\n<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/06/CodeCogsEqn.gif\"><img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/06/CodeCogsEqn.gif\" alt=\"3x3 Column Major Matrix\" width=\"72\" height=\"67\" class=\"alignnone size-full wp-image-5986\" /></a>\r\n\r\nNotice how the first three values make up the first column.\r\n\r\nYou can index into the elements of the matrix using the parenthesis notation. For example, you can access the middle element of the array by using:\r\n\r\n<pre>A(1, 1); // == 5</pre>\r\n\r\nT','Indexing with ArrayFire','','inherit','open','open','','5979-revision-v1','','','2014-06-20 19:39:27','2014-06-20 19:39:27','',5979,'http://sandbox.arrayfire.com/5979-revision-v1/',0,'revision','',0),(5993,17794,'2014-06-20 23:47:54','2014-06-20 23:47:54','ArrayFire is a fantastic library when it comes to speed and performance. One of the things that people overlook when evaluating ArrayFire is the indexing options available to the user.\r\n\r\nThe ArrayFire library exposes the array data structure to the user. The array stores the data in a column major order. This means that the following code:\r\n\r\n<pre>\r\nfloat[] a = {1, 2, 3, 4, 5, 6, 7, 8, 9};\r\narray A(3, 3, a);\r\n</pre>\r\n\r\nWill produce the following matrix:\r\n\r\n<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/06/CodeCogsEqn.gif\"><img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/06/CodeCogsEqn.gif\" alt=\"3x3 Column Major Matrix\" width=\"72\" height=\"67\" class=\"alignnone size-full wp-image-5986\" /></a>\r\n\r\nNotice how the first three values make up the first column.\r\n\r\nWhen you want to perform an operation on every element of the array you can just use the variable name with the operation. The following command performs adds 5 to each element of the array:\r\n\r\n<pre>\r\nA += 5;\r\n</pre>\r\n\r\nSometimes you only want to perform a calculation on a part of the data. In this case you can index into the elements of the matrix using the parenthesis notation. For example, you can access the middle element of the initial array by using:\r\n\r\n<pre>\r\nfloat[] a = {1, 2, 3, 4, 5, 6, 7, 8, 9};\r\narray A(3, 3, a);\r\nA(1, 1); // == 5\r\n</pre>\r\n\r\nThe first number in the parenthesis is the column index, and the second number is the row index. The ','Indexing with ArrayFire','','inherit','open','open','','5979-revision-v1','','','2014-06-20 23:47:54','2014-06-20 23:47:54','',5979,'http://sandbox.arrayfire.com/5979-revision-v1/',0,'revision','',0),(5994,17794,'2014-06-23 17:33:36','2014-06-23 17:33:36','This image displays the output of the following code:\nfloat a[] = {1, 2, 3, 4, 5, 6, 7, 8, 9}\narray A( 3, 3, a);','rows/colsExamples','','inherit','open','open','','codecogseqn-2','','','2014-06-23 17:33:36','2014-06-23 17:33:36','',5979,'http://sandbox.arrayfire.com/wp-content/uploads/2014/06/CodeCogsEqn.png',0,'attachment','image/png',0),(5995,17794,'2014-06-23 17:55:50','2014-06-23 17:55:50','This image displays the output of the following code:\nfloat[] a = {1, 2, 3, 4, 5, 6, 7, 8, 9};\narray A(3, 3, a);\narray B = A.row(2);\narray C = A.cols(1,2);','CodeCogsEqn-3','','inherit','open','open','','codecogseqn-3','','','2014-06-23 17:55:50','2014-06-23 17:55:50','',5979,'http://sandbox.arrayfire.com/wp-content/uploads/2014/06/CodeCogsEqn-3.png',0,'attachment','image/png',0),(5998,11,'2014-06-24 18:20:14','2014-06-24 18:20:14','ArrayFire is a fantastic library when it comes to speed and performance. One of the things that people overlook when evaluating ArrayFire is the indexing options available to the user.\r\n\r\nThe ArrayFire library exposes the array data structure to the user. The array stores the data in a column major order. This means that the following code:\r\n\r\n<pre>\r\nfloat[] a = {1, 2, 3, 4, 5, 6, 7, 8, 9};\r\narray A(3, 3, a);\r\n</pre>\r\n\r\nWill produce the following matrix:\r\n\r\n<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/06/CodeCogsEqn.png\"><img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/06/CodeCogsEqn.png\" alt=\"3x3 Column Major Matrix\" width=\"114\" height=\"67\" class=\"alignnone size-full wp-image-5994\" /></a>\r\n\r\nNotice how the first three values make up the first column.\r\n\r\nWhen you want to perform an operation on every element of the array you can just use the variable name with the operation. The following command performs adds 5 to each element of the array:\r\n\r\n<pre>\r\nA += 5;\r\n</pre>\r\n\r\nNote: If you do something like this\r\n<pre>\r\nA = 3;\r\n</pre>\r\nYou will resize A to size 1 and the single element will be given the value 3.\r\nTo assign a constant value throughout the array, use the <code>constant</code> function as shown below.\r\n<pre>\r\n// If A is already defined\r\nA = constant(3, A.dims());             // Will assign all elements to 3\r\n// If A is not defined\r\narray A = constant(3, n_rows, n_cols); // Creates array of n_rows x n_cols and assigns all elements to 3\r\n</pre>\r\n\r\nSometimes you only want to perform a calculation on a part of the data. In this case you can index into the elements of the matrix using the parenthesis notation. For example, you can access the middle element of the initial array by using:\r\n\r\n<pre>\r\nfloat[] a = {1, 2, 3, 4, 5, 6, 7, 8, 9};\r\narray A(3, 3, a);\r\narray B = A(1, 1);\r\n// B == 5\r\n</pre>\r\n\r\nThe first number in the parenthesis is the column index, and the second number is the row index. You can index in this way to up to 4 dimensions.\r\n\r\nArrayFire also comes with a host of helper functions which allow you to access whole rows and columns of a matrix. The <code>row</code> and <code>col</code> functions will return an array which is made up of elements in the row an column respectively. You can access a set of rows and columns using the <code>rows</code> and <code>cols</code> functions.\r\n\r\n<pre>\r\nfloat[] a = {1, 2, 3, 4, 5, 6, 7, 8, 9};\r\narray A(3, 3, a);\r\narray B = A.row(2);\r\narray C = A.cols(1,2);\r\n</pre>\r\n\r\n<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/06/CodeCogsEqn-3.png\"><img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/06/CodeCogsEqn-3-300x61.png\" alt=\"A.row(2); A.cols(1,2);\" width=\"300\" height=\"61\" class=\"alignnone size-medium wp-image-5995\" /></a>\r\n\r\nYou can also use parenthesis notation to extract rows and columns of a matrix or volume. In order to do this, we will use the span and seq objects to specify which rows and columns we need. \r\nA few definitions first.\r\n<code>seq</code> return a sequence of values. The simplest, seq(n) returns values from 0 to n-1. seq(m, n) returns values from m to n (both inclusive). Read more about seq <a href=\"http://www.sandbox.arrayfire.com/docs/classaf_1_1seq.htm\">here</a>.\r\n<code>span</code> denotes that the entire dimension be used. It would be the same as seq(dim_size).\r\n\r\nA few lines of sample code. The first creates the array A of 4 rows, 3 cols and 2 matrices. Using seq, we can generate a sequence of incremental elements.\r\nThe second line, we create B which contains the first 6 elements of A.\r\n<pre>\r\n// Creates A with dims [4, 3, 2] and values 0->24 incremented by 1. \r\narray A = array(seq(4*3*2), 4, 3, 2);\r\n// Gets the first 6 elements of A irrespective of dimensions. B will be of size [10, 1] (treats A as a 1-dimensional vector).\r\narray B = A(seq(6));\r\n</pre>\r\n<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/06/image0.png\"><img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/06/image0.png\" alt=\"image0\" width=\"235\" height=\"118\" class=\"alignnone size-full wp-image-6000\" /></a>\r\n\r\nThe next two lines show how we can use seq and span for each dimension. \r\n<pre>\r\n// Gets the first 3 rows and 2 columns of A. In this case, the arguments of seq cannot be greater than the size of the specific dimension of A\r\narray C = A(seq(3), seq(2));\r\n// Gets the first 3 rows and 2 columns of A from all matrices.\r\narray D = A(seq(3), seq(2), span);\r\n</pre>\r\n<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/06/image1.png\"><img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/06/image1-300x69.png\" alt=\"image1\" width=\"300\" height=\"69\" class=\"alignnone size-medium wp-image-6003\" /></a>\r\n\r\nA couple more examples show other use cases.\r\n<pre>\r\n// Gets the matrix with index 1. span specifies that all values be retrieved.\r\narray E = A(span, span, 1);\r\n// Gets the matrix with index 1 but only rows 1 through 3.\r\narray F = A(seq(1, 3), span, 1);\r\n</pre>\r\n<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/06/image2.png\"><img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/06/image2-300x87.png\" alt=\"image2\" width=\"300\" height=\"87\" class=\"alignnone size-medium wp-image-6004\" /></a>\r\n\r\nPreviously, I wrote that doing <code>A = 0</code> will make A single valued. However, doing <code>A(span) = 0</code> will assign all elements of A to 0.\r\n<code>A(span) = 0</code> is equivalent to <code>A = constant(0, A.dims())</code>. The difference is that while the former writes memory in-place, the latter creates a new array and A now point to the location of the new array and the previous memory is deleted.\r\n\r\nThe last indexing technique we will discuss in the blog is using relational operators. Arrays when used alongside relational operators can be very powerful. We can do something like this:\r\n<pre>\r\narray A = randu(3, 3);\r\narray B = (A > 0.5);     // B is a b8 array of size A.dims(). if(A(id)>0.5) B(id)=1; else B(id)=0\r\n</pre>\r\n<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/06/image3.png\"><img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/06/image3-300x62.png\" alt=\"image3\" width=\"300\" height=\"62\" class=\"alignnone size-medium wp-image-6007\" /></a>\r\n\r\nA few more examples of using relational operators in indexing:\r\n<pre>\r\narray C = B.as(f32);     // Storing B as f32 array\r\narray C(C == 0) = -1;    // All values of B1 which are 0 are assigned -1.\r\narray D = A(A > 0.5);    // C is a 1-dimensional array. It contains the elements from A that are greater than 0.5.\r\n</pre>\r\n<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/06/image4.png\"><img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/06/image4-300x44.png\" alt=\"image4\" width=\"400\" height=\"60\" class=\"alignnone size-medium wp-image-6009\" /></a>\r\n\r\nIn the next blog, we will cover various indexing opertations and their impact on performance. Also look for more tips and tricks for indexing in ArrayFire.','Indexing with ArrayFire','','inherit','open','open','','5979-autosave-v1','','','2014-06-24 18:20:14','2014-06-24 18:20:14','',5979,'http://sandbox.arrayfire.com/5979-autosave-v1/',0,'revision','',0),(5999,11,'2014-06-24 15:45:28','2014-06-24 15:45:28','ArrayFire is a fantastic library when it comes to speed and performance. One of the things that people overlook when evaluating ArrayFire is the indexing options available to the user.\r\n\r\nThe ArrayFire library exposes the array data structure to the user. The array stores the data in a column major order. This means that the following code:\r\n\r\n<pre>\r\nfloat[] a = {1, 2, 3, 4, 5, 6, 7, 8, 9};\r\narray A(3, 3, a);\r\n</pre>\r\n\r\nWill produce the following matrix:\r\n\r\n<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/06/CodeCogsEqn.png\"><img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/06/CodeCogsEqn.png\" alt=\"3x3 Column Major Matrix\" width=\"114\" height=\"67\" class=\"alignnone size-full wp-image-5994\" /></a>\r\n\r\nNotice how the first three values make up the first column.\r\n\r\nWhen you want to perform an operation on every element of the array you can just use the variable name with the operation. The following command performs adds 5 to each element of the array:\r\n\r\n<pre>\r\nA += 5;\r\n</pre>\r\n\r\nNote: If you do something like this\r\n<pre>\r\nA = 3;\r\n</pre>\r\nYou will resize A to size 1 and the single element will be given the value 3.\r\nTo assign a constant value throughout the array, use the <code>constant</code> function as shown below.\r\n<pre>\r\n// If A is already defined\r\nA = constant(3, A.dims());    // Will assign all elements to 3\r\n// If A is not defined\r\narray A = constant(3, n_rows, n_cols);\r\n</pre>\r\n\r\n\r\nSometimes you only want to perform a calculation on a part of the data. In this case you can index into the elements of the matrix using the parenthesis notation. For example, you can access the middle element of the initial array by using:\r\n\r\n<pre>\r\nfloat[] a = {1, 2, 3, 4, 5, 6, 7, 8, 9};\r\narray A(3, 3, a);\r\narray B = A(1, 1);\r\n// B == 5\r\n</pre>\r\n\r\nThe first number in the parenthesis is the column index, and the second number is the row index. You can index in this way to up to 4 dimensions.\r\n\r\nArrayFire also comes with a host of helper functions which allow you to access whole rows and columns of a matrix. The <code>row</code> and <code>col</code> functions will return an array which is made up of elements in the row an column respectively. You can access a set of rows and columns using the <code>rows</code> and <code>cols</code> functions.\r\n\r\n<pre>\r\nfloat[] a = {1, 2, 3, 4, 5, 6, 7, 8, 9};\r\narray A(3, 3, a);\r\narray B = A.row(2);\r\narray C = A.cols(1,2);\r\n</pre>\r\n\r\n<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/06/CodeCogsEqn-3.png\"><img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/06/CodeCogsEqn-3-300x61.png\" alt=\"A.row(2); A.cols(1,2);\" width=\"300\" height=\"61\" class=\"alignnone size-medium wp-image-5995\" /></a>\r\n\r\nYou can also use parenthesis notation to extract rows and columns of a matrix or volume. In order to do this, we will use the span and seq objects to specify which rows and columns we need. \r\n\r\nThe array object uses copy on write semantics for simple indexing like this will not result in additional memory allocation.\r\n\r\n\r\n\r\n','Indexing with ArrayFire','','inherit','open','open','','5979-revision-v1','','','2014-06-24 15:45:28','2014-06-24 15:45:28','',5979,'http://sandbox.arrayfire.com/5979-revision-v1/',0,'revision','',0),(6000,11,'2014-06-24 17:41:41','2014-06-24 17:41:41','','image0','','inherit','open','open','','image0','','','2014-06-24 17:41:41','2014-06-24 17:41:41','',5979,'http://sandbox.arrayfire.com/wp-content/uploads/2014/06/image0.png',0,'attachment','image/png',0),(6003,11,'2014-06-24 17:54:18','2014-06-24 17:54:18','','image1','','inherit','open','open','','image1','','','2014-06-24 17:54:18','2014-06-24 17:54:18','',5979,'http://sandbox.arrayfire.com/wp-content/uploads/2014/06/image1.png',0,'attachment','image/png',0),(6004,11,'2014-06-24 17:54:18','2014-06-24 17:54:18','','image2','','inherit','open','open','','image2','','','2014-06-24 17:54:18','2014-06-24 17:54:18','',5979,'http://sandbox.arrayfire.com/wp-content/uploads/2014/06/image2.png',0,'attachment','image/png',0),(6007,11,'2014-06-24 18:08:42','2014-06-24 18:08:42','','image3','','inherit','open','open','','image3','','','2014-06-24 18:08:42','2014-06-24 18:08:42','',5979,'http://sandbox.arrayfire.com/wp-content/uploads/2014/06/image3.png',0,'attachment','image/png',0),(6009,11,'2014-06-24 18:10:46','2014-06-24 18:10:46','','image4','','inherit','open','open','','image4','','','2014-06-24 18:10:46','2014-06-24 18:10:46','',5979,'http://sandbox.arrayfire.com/wp-content/uploads/2014/06/image4.png',0,'attachment','image/png',0),(6010,11,'2014-06-24 18:20:18','2014-06-24 18:20:18','ArrayFire is a fantastic library when it comes to speed and performance. One of the things that people overlook when evaluating ArrayFire is the indexing options available to the user.\r\n\r\nThe ArrayFire library exposes the array data structure to the user. The array stores the data in a column major order. This means that the following code:\r\n\r\n<pre>\r\nfloat[] a = {1, 2, 3, 4, 5, 6, 7, 8, 9};\r\narray A(3, 3, a);\r\n</pre>\r\n\r\nWill produce the following matrix:\r\n\r\n<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/06/CodeCogsEqn.png\"><img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/06/CodeCogsEqn.png\" alt=\"3x3 Column Major Matrix\" width=\"114\" height=\"67\" class=\"alignnone size-full wp-image-5994\" /></a>\r\n\r\nNotice how the first three values make up the first column.\r\n\r\nWhen you want to perform an operation on every element of the array you can just use the variable name with the operation. The following command performs adds 5 to each element of the array:\r\n\r\n<pre>\r\nA += 5;\r\n</pre>\r\n\r\nNote: If you do something like this\r\n<pre>\r\nA = 3;\r\n</pre>\r\nYou will resize A to size 1 and the single element will be given the value 3.\r\nTo assign a constant value throughout the array, use the <code>constant</code> function as shown below.\r\n<pre>\r\n// If A is already defined\r\nA = constant(3, A.dims());             // Will assign all elements to 3\r\n// If A is not defined\r\narray A = constant(3, n_rows, n_cols); // Creates array of n_rows x n_cols and assigns all elements to 3\r\n</pre>\r\n\r\nSometimes you only want to perform a calculation on a part of the data. In this case you can index into the elements of the matrix using the parenthesis notation. For example, you can access the middle element of the initial array by using:\r\n\r\n<pre>\r\nfloat[] a = {1, 2, 3, 4, 5, 6, 7, 8, 9};\r\narray A(3, 3, a);\r\narray B = A(1, 1);\r\n// B == 5\r\n</pre>\r\n\r\nThe first number in the parenthesis is the column index, and the second number is the row index. You can index in this way to up to 4 dimensions.\r\n\r\nArrayFire also comes with a host of helper functions which allow you to access whole rows and columns of a matrix. The <code>row</code> and <code>col</code> functions will return an array which is made up of elements in the row an column respectively. You can access a set of rows and columns using the <code>rows</code> and <code>cols</code> functions.\r\n\r\n<pre>\r\nfloat[] a = {1, 2, 3, 4, 5, 6, 7, 8, 9};\r\narray A(3, 3, a);\r\narray B = A.row(2);\r\narray C = A.cols(1,2);\r\n</pre>\r\n\r\n<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/06/CodeCogsEqn-3.png\"><img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/06/CodeCogsEqn-3-300x61.png\" alt=\"A.row(2); A.cols(1,2);\" width=\"300\" height=\"61\" class=\"alignnone size-medium wp-image-5995\" /></a>\r\n\r\nYou can also use parenthesis notation to extract rows and columns of a matrix or volume. In order to do this, we will use the span and seq objects to specify which rows and columns we need. \r\nA few definitions first.\r\n<code>seq</code> return a sequence of values. The simplest, seq(n) returns values from 0 to n-1. seq(m, n) returns values from m to n (both inclusive). Read more about seq <a href=\"http://www.sandbox.arrayfire.com/docs/classaf_1_1seq.htm\">here</a>.\r\n<code>span</code> denotes that the entire dimension be used. It would be the same as seq(dim_size).\r\n\r\nA few lines of sample code. The first creates the array A of 4 rows, 3 cols and 2 matrices. Using seq, we can generate a sequence of incremental elements.\r\nThe second line, we create B which contains the first 6 elements of A.\r\n<pre>\r\n// Creates A with dims [4, 3, 2] and values 0->24 incremented by 1. \r\narray A = array(seq(4*3*2), 4, 3, 2);\r\n// Gets the first 6 elements of A irrespective of dimensions. B will be of size [10, 1] (treats A as a 1-dimensional vector).\r\narray B = A(seq(6));\r\n</pre>\r\n<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/06/image0.png\"><img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/06/image0.png\" alt=\"image0\" width=\"235\" height=\"118\" class=\"alignnone size-full wp-image-6000\" /></a>\r\n\r\nThe next two lines show how we can use seq and span for each dimension. \r\n<pre>\r\n// Gets the first 3 rows and 2 columns of A. In this case, the arguments of seq cannot be greater than the size of the specific dimension of A\r\narray C = A(seq(3), seq(2));\r\n// Gets the first 3 rows and 2 columns of A from all matrices.\r\narray D = A(seq(3), seq(2), span);\r\n</pre>\r\n<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/06/image1.png\"><img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/06/image1-300x69.png\" alt=\"image1\" width=\"300\" height=\"69\" class=\"alignnone size-medium wp-image-6003\" /></a>\r\n\r\nA couple more examples show other use cases.\r\n<pre>\r\n// Gets the matrix with index 1. span specifies that all values be retrieved.\r\narray E = A(span, span, 1);\r\n// Gets the matrix with index 1 but only rows 1 through 3.\r\narray F = A(seq(1, 3), span, 1);\r\n</pre>\r\n<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/06/image2.png\"><img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/06/image2-300x87.png\" alt=\"image2\" width=\"300\" height=\"87\" class=\"alignnone size-medium wp-image-6004\" /></a>\r\n\r\nPreviously, I wrote that doing <code>A = 0</code> will make A single valued. However, doing <code>A(span) = 0</code> will assign all elements of A to 0.\r\n<code>A(span) = 0</code> is equivalent to <code>A = constant(0, A.dims())</code>. The difference is that while the former writes memory in-place, the latter creates a new array and A now point to the location of the new array and the previous memory is deleted.\r\n\r\nThe last indexing technique we will discuss in the blog is using relational operators. Arrays when used alongside relational operators can be very powerful. We can do something like this:\r\n<pre>\r\narray A = randu(3, 3);\r\narray B = (A > 0.5);     // B is a b8 array of size A.dims(). if(A(id)>0.5) B(id)=1; else B(id)=0\r\n</pre>\r\n<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/06/image3.png\"><img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/06/image3-300x62.png\" alt=\"image3\" width=\"300\" height=\"62\" class=\"alignnone size-medium wp-image-6007\" /></a>\r\n\r\nA few more examples of using relational operators in indexing:\r\n<pre>\r\narray C = B.as(f32);     // Storing B as f32 array\r\narray C(C == 0) = -1;    // All values of B1 which are 0 are assigned -1.\r\narray D = A(A > 0.5);    // C is a 1-dimensional array. It contains the elements from A that are greater than 0.5.\r\n</pre>\r\n<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/06/image4.png\"><img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/06/image4-300x44.png\" alt=\"image4\" width=\"400\" height=\"60\" class=\"alignnone size-medium wp-image-6009\" /></a>\r\n\r\nIn the next blog, we will cover various indexing opertations and their impact on performance. Also look for more tips and tricks for indexing in ArrayFire.','Indexing with ArrayFire','','inherit','open','open','','5979-revision-v1','','','2014-06-24 18:20:18','2014-06-24 18:20:18','',5979,'http://sandbox.arrayfire.com/5979-revision-v1/',0,'revision','',0),(6016,17794,'2014-06-25 22:42:43','2014-06-25 22:42:43','This image shows the output of the code:\nfloat a[] =  {9, 8, 7, 6, 5, 4, 3, 2, 1};\nbool  even[] =   {0, 1, 0, 1, 0, 1, 0, 1, 0};\narray A(9, a);\narray EVEN(9, even);\narray B = A(EVEN);\nprint(A);\nprint(B);','BoolIndexing','Boolean Indexing in ArrayFire','inherit','open','open','','codecogseqn-4','','','2014-06-25 22:42:43','2014-06-25 22:42:43','',5979,'http://sandbox.arrayfire.com/wp-content/uploads/2014/06/CodeCogsEqn-4.png',0,'attachment','image/png',0),(6017,17794,'2014-06-25 22:52:31','2014-06-25 22:52:31','','RelationalOperatorIndexing','','inherit','open','open','','codecogseqn-5','','','2014-06-25 22:52:31','2014-06-25 22:52:31','',5979,'http://sandbox.arrayfire.com/wp-content/uploads/2014/06/CodeCogsEqn-5.png',0,'attachment','image/png',0),(6018,17794,'2014-06-25 23:09:40','2014-06-25 23:09:40','ArrayFire is a fantastic library when it comes to performance. One of the things that people overlook when looking into ArrayFire is it\'s powerful indexing capabilities.\r\n\r\nThe main data structure in the ArrayFire library is the <a href=\"http://www.sandbox.arrayfire.com/docs/classaf_1_1array.htm\" title=\"array\" target=\"_blank\">array</a>. The array stores the data in a column major order. This means that the following code:\r\n\r\n<pre>\r\nfloat a[] = {1, 2, 3, 4, 5, 6, 7, 8, 9};\r\narray A(3, 3, a);\r\n</pre>\r\n\r\nWill produce the following matrix:\r\n\r\n<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/06/CodeCogsEqn.png\"><img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/06/CodeCogsEqn.png\" alt=\"3x3 Column Major Matrix\" width=\"114\" height=\"67\" class=\"alignnone size-full wp-image-5994\" /></a>\r\n\r\nNotice how the first three values of the <code>a</code> array make up the first column of <code>A</code>.\r\n\r\nWhen you want to perform an operation on every element of the array you can just use the variable name with the operation. The following command adds 5 to each element of the array:\r\n\r\n<pre>\r\nA += 5;\r\n</pre>\r\n\r\nIf you want to assign one value to each element of the array, you will be tempted to do something like this:\r\n\r\n<pre>\r\nA = 3; // Don\'t do this\r\n</pre>\r\n\r\nThis operation will actually create an array with a single element with the value of 3. In order to perform this operation you will need to use the use the <code>constant</code> function or the span object(more on this later).\r\n\r\n<pre>\r\nA = constant(3, A.dims()); // Okay\r\nA(span) = 3;               // Also works\r\n</pre>\r\n\r\n\r\nSometimes you only want to perform a calculation on a part of the data. In this case you can index into the elements of the matrix using the parenthesis notation. For example, you can access the middle element of the initial array by using:\r\n\r\n<pre>\r\nfloat a[] = {1, 2, 3, 4, 5, 6, 7, 8, 9};\r\narray A(3, 3, a);\r\narray B = A(1, 1);\r\n// B == 5\r\n</pre>\r\n\r\nThe first number in the parenthesis is the column index, and the second number is the row index. You can index in this way to up to 4 dimensions.\r\n\r\nArrayFire also comes with a host of helper functions which allow you to access whole rows and columns of a matrix. The <code>row</code> and <code>col</code> functions will return an array which is made up of elements in the row an column respectively. You can access a set of rows and columns using the <code>rows</code> and <code>cols</code> functions.\r\n\r\n<pre>\r\nfloat a[] = {1, 2, 3, 4, 5, 6, 7, 8, 9};\r\narray A(3, 3, a);\r\narray B = A.row(2);\r\narray C = A.cols(1,2);\r\n</pre>\r\n\r\n<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/06/CodeCogsEqn-3.png\"><img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/06/CodeCogsEqn-3-300x61.png\" alt=\"A.row(2); A.cols(1,2);\" width=\"300\" height=\"61\" class=\"alignnone size-medium wp-image-5995\" /></a>\r\n\r\nYou can also use parenthesis notation to extract rows and columns of a matrix or volume. In order to do this, we will use the <code>span</code> and <code>seq</code> objects to specify which rows and columns we need.\r\n\r\nThe <code>seq</code> object returns a sequence of values. For example, you can create a sequence of <code>{0, 1, 2, 3}</code> by calling <code>seq(4)</code>. The <code>span</code> object is a sequence which gives all the elements of an array. Using these objects you can do some pretty sophisticated indexing. The previous example can be rewritten as the following\r\n\r\n<pre>\r\nfloat[] a = {1, 2, 3, 4, 5, 6, 7, 8, 9};\r\narray A(3, 3, a);\r\narray B = A(2, span);\r\narray C = A(span, seq(1,2));\r\n</pre>\r\n\r\nThe values of B and C should be identical to the first example.\r\n\r\nYou can even index into an array using another array object. The values of the array object passed into the parenthesis will be used as indices. Here is an example:\r\n\r\n<pre>\r\nfloat a[] = {9, 8, 7, 6, 5, 4, 3, 2, 1};\r\nfloat idx[] = {1, 3, 5};\r\narray A(9, a);\r\narray IDX(3, idx);\r\narray B = A(IDX); //B == {8, 6, 4}\r\n</pre>\r\n\r\nWe first create two C-style arrays. The first array contains the values from 9 to 1 and the second array contains the indices we want to access. We create array objects from these values and pass the <code>IDX</code> as the index of array <code>A</code>. The resulting array B will contain the values <code>{8, 6, 4}</code> which corresponds to the indices <code>{1, 3, 5}</code>.\r\n\r\nIf the passed array object is a b8(boolean) type, then only the non-zero values will be returned.\r\n\r\n<pre>\r\nfloat a[] =  {9, 8, 7, 6, 5, 4, 3, 2, 1};\r\nbool  even[] =   {0, 1, 0, 1, 0, 1, 0, 1, 0};\r\narray A(9, a);\r\narray EVEN(9, even);\r\narray B = A(EVEN);\r\n</pre>\r\n\r\n<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/06/CodeCogsEqn-4.png\"><img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/06/CodeCogsEqn-4.png\" alt=\"Boolean Indexing\" width=\"260\" height=\"198\" class=\"size-full wp-image-6016\" /></a>\r\n\r\nThis technique allows you to input relation operators as indexes. For example if we can extract all values which are greater than 5 using the following code:\r\n\r\n<pre>\r\nfloat a[] =  {9, 8, 7, 6, 5, 4, 3, 2, 1};\r\narray A(9, a);\r\narray B = A(A > 5);\r\n</pre>\r\n\r\n<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/06/CodeCogsEqn-5.png\"><img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/06/CodeCogsEqn-5.png\" alt=\"Relational Operator Indexing\" width=\"141\" height=\"198\" class=\"alignnone size-full wp-image-6017\" /></a>\r\n\r\nI hope this blog was helpful for anyone who is interested in what ArrayFire has to offer. This is the first part of the indexing series. In a future post I will talk about more advanced topics including performance and memory accesses.','Indexing with ArrayFire','','inherit','open','open','','5979-revision-v1','','','2014-06-25 23:09:40','2014-06-25 23:09:40','',5979,'http://sandbox.arrayfire.com/5979-revision-v1/',0,'revision','',0),(6019,17794,'2014-06-25 23:22:35','2014-06-25 23:22:35','ArrayFire is a fantastic library when it comes to performance. One of the things that people overlook when looking into ArrayFire is it\'s powerful indexing capabilities.\n\nThe main data structure in the ArrayFire library is the <a href=\"http://www.sandbox.arrayfire.com/docs/classaf_1_1array.htm\" title=\"array\" target=\"_blank\">array</a>. The array stores the data in a column major order. This means that the following code:\n\n<pre>\nfloat a[] = {1, 2, 3, 4, 5, 6, 7, 8, 9};\narray A(3, 3, a);\n</pre>\n\nWill produce the following matrix:\n\n<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/06/CodeCogsEqn.png\"><img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/06/CodeCogsEqn.png\" alt=\"3x3 Column Major Matrix\" width=\"114\" height=\"67\" class=\"alignnone size-full wp-image-5994\" /></a>\n\nNotice how the first three values of the <code>a</code> array make up the first column of <code>A</code>.\n\nWhen you want to perform an operation on every element of the array you can just use the variable name with the operation. The following command adds 5 to each element of the array:\n\n<pre>\nA += 5;\n</pre>\n\nIf you want to assign one value to each element of the array, you will be tempted to do something like this:\n\n<pre>\nA = 3; // Don\'t do this\n</pre>\n\nThis operation will actually create an array with a single element with the value of 3. In order to perform this operation you will need to use the use the <code>constant</code> function or the span object(more on this later).\n\n<pre>\nA = constant(3, A.dims()); // Okay\nA(span) = 3;               // Also works\n</pre>\n\n\nSometimes you only want to perform a calculation on a part of the data. In this case you can index into the elements of the matrix using the parenthesis notation. For example, you can access the middle element of the initial array by using:\n\n<pre>\nfloat a[] = {1, 2, 3, 4, 5, 6, 7, 8, 9};\narray A(3, 3, a);\narray B = A(1, 1);\n// B == 5\n</pre>\n\nThe first number in the parenthesis is the column index, and the second number is the row index. You can index in this way to up to 4 dimensions.\n\nArrayFire also comes with a host of helper functions which allow you to access whole rows and columns of a matrix. The <code>row</code> and <code>col</code> functions will return an array which is made up of elements in the row an column respectively. You can access a set of rows and columns using the <code>rows</code> and <code>cols</code> functions.\n\n<pre>\nfloat a[] = {1, 2, 3, 4, 5, 6, 7, 8, 9};\narray A(3, 3, a);\narray B = A.row(2);\narray C = A.cols(1,2);\n</pre>\n\n<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/06/CodeCogsEqn-3.png\"><img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/06/CodeCogsEqn-3-300x61.png\" alt=\"A.row(2); A.cols(1,2);\" width=\"300\" height=\"61\" class=\"alignnone size-medium wp-image-5995\" /></a>\n\nYou can also use parenthesis notation to extract rows and columns of a matrix or volume. In order to do this, we will use the <code>span</code> and <code>seq</code> objects to specify which rows and columns we need.\n\nThe <code>seq</code> object returns a sequence of values. For example, you can create a sequence of <code>{0, 1, 2, 3}</code> by calling <code>seq(4)</code>. The <code>span</code> object is a sequence which gives all the elements of an array. Using these objects you can do some pretty sophisticated indexing. The previous example can be rewritten as the following\n\n<pre>\nfloat[] a = {1, 2, 3, 4, 5, 6, 7, 8, 9};\narray A(3, 3, a);\narray B = A(2, span);\narray C = A(span, seq(1,2));\n</pre>\n\nThe values of B and C should be identical to the first example.\n\nYou can even index into an array using another array object. The values of the array object passed into the parenthesis will be used as indices. Here is an example:\n\n<pre>\nfloat a[] = {9, 8, 7, 6, 5, 4, 3, 2, 1};\nfloat idx[] = {1, 3, 5};\narray A(9, a);\narray IDX(3, idx);\narray B = A(IDX); //B == {8, 6, 4}\n</pre>\n\nWe first create two C-style arrays. The first array contains the values from 9 to 1 and the second array contains the indices we want to access. We create array objects from these values and pass the <code>IDX</code> as the index of array <code>A</code>. The resulting array B will contain the values <code>{8, 6, 4}</code> which corresponds to the indices <code>{1, 3, 5}</code>.\n\nIf the passed array object is a b8(boolean) type, then only the non-zero values will be returned.\n\n<pre>\nfloat a[] =  {9, 8, 7, 6, 5, 4, 3, 2, 1};\nbool  even[] =   {0, 1, 0, 1, 0, 1, 0, 1, 0};\narray A(9, a);\narray EVEN(9, even);\narray B = A(EVEN);\n</pre>\n\n<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/06/CodeCogsEqn-4.png\"><img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/06/CodeCogsEqn-4.png\" alt=\"Boolean Indexing\" width=\"260\" height=\"198\" class=\"size-full wp-image-6016\" /></a>\n\nThis technique allows you to input relation operators as indexes. For example, we can extract all values which are greater than 5 using the following code:\n\n<pre>\nfloat a[] =  {9, 8, 7, 6, 5, 4, 3, 2, 1};\narray A(9, a);\narray B = A(A > 5);\n</pre>\n\n<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/06/CodeCogsEqn-5.png\"><img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/06/CodeCogsEqn-5.png\" alt=\"Relational Operator Indexing\" width=\"141\" height=\"198\" class=\"alignnone size-full wp-image-6017\" /></a>\n\nI hope this blog was helpful for anyone who is interested in what ArrayFire has to offer. This is the first part of the indexing series. In a future post I will talk about more advanced topics including performance and memory accesses.','Indexing with ArrayFire','','inherit','open','open','','5979-autosave-v1','','','2014-06-25 23:22:35','2014-06-25 23:22:35','',5979,'http://sandbox.arrayfire.com/5979-autosave-v1/',0,'revision','',0),(6020,17794,'2014-06-25 23:23:37','2014-06-25 23:23:37','ArrayFire is a fantastic library when it comes to performance. One of the things that people overlook when looking into ArrayFire is it\'s powerful indexing capabilities.\r\n\r\nThe main data structure in the ArrayFire library is the <a href=\"http://www.sandbox.arrayfire.com/docs/classaf_1_1array.htm\" title=\"array\" target=\"_blank\">array</a>. The array stores the data in a column major order. This means that the following code:\r\n\r\n<pre>\r\nfloat a[] = {1, 2, 3, 4, 5, 6, 7, 8, 9};\r\narray A(3, 3, a);\r\n</pre>\r\n\r\nWill produce the following matrix:\r\n\r\n<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/06/CodeCogsEqn.png\"><img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/06/CodeCogsEqn.png\" alt=\"3x3 Column Major Matrix\" width=\"114\" height=\"67\" class=\"alignnone size-full wp-image-5994\" /></a>\r\n\r\nNotice how the first three values of the <code>a</code> array make up the first column of <code>A</code>.\r\n\r\nWhen you want to perform an operation on every element of the array you can just use the variable name with the operation. The following command adds 5 to each element of the array:\r\n\r\n<pre>\r\nA += 5;\r\n</pre>\r\n\r\nIf you want to assign one value to each element of the array, you will be tempted to do something like this:\r\n\r\n<pre>\r\nA = 3; // Don\'t do this\r\n</pre>\r\n\r\nThis operation will actually create an array with a single element with the value of 3. In order to perform this operation you will need to use the use the <code>constant</code> function or the span object(more on this later).\r\n\r\n<pre>\r\nA = constant(3, A.dims()); // Okay\r\nA(span) = 3;               // Also works\r\n</pre>\r\n\r\n\r\nSometimes you only want to perform a calculation on a part of the data. In this case you can index into the elements of the matrix using the parenthesis notation. For example, you can access the middle element of the initial array by using:\r\n\r\n<pre>\r\nfloat a[] = {1, 2, 3, 4, 5, 6, 7, 8, 9};\r\narray A(3, 3, a);\r\narray B = A(1, 1);\r\n// B == 5\r\n</pre>\r\n\r\nThe first number in the parenthesis is the column index, and the second number is the row index. You can index in this way to up to 4 dimensions.\r\n\r\nArrayFire also comes with a host of helper functions which allow you to access whole rows and columns of a matrix. The <code>row</code> and <code>col</code> functions will return an array which is made up of elements in the row an column respectively. You can access a set of rows and columns using the <code>rows</code> and <code>cols</code> functions.\r\n\r\n<pre>\r\nfloat a[] = {1, 2, 3, 4, 5, 6, 7, 8, 9};\r\narray A(3, 3, a);\r\narray B = A.row(2);\r\narray C = A.cols(1,2);\r\n</pre>\r\n\r\n<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/06/CodeCogsEqn-3.png\"><img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/06/CodeCogsEqn-3-300x61.png\" alt=\"A.row(2); A.cols(1,2);\" width=\"300\" height=\"61\" class=\"alignnone size-medium wp-image-5995\" /></a>\r\n\r\nYou can also use parenthesis notation to extract rows and columns of a matrix or volume. In order to do this, we will use the <code>span</code> and <code>seq</code> objects to specify which rows and columns we need.\r\n\r\nThe <code>seq</code> object returns a sequence of values. For example, you can create a sequence of <code>{0, 1, 2, 3}</code> by calling <code>seq(4)</code>. The <code>span</code> object is a sequence which gives all the elements of an array. Using these objects you can do some pretty sophisticated indexing. The previous example can be rewritten as the following:\r\n\r\n<pre>\r\nfloat[] a = {1, 2, 3, 4, 5, 6, 7, 8, 9};\r\narray A(3, 3, a);\r\narray B = A(2, span);\r\narray C = A(span, seq(1,2));\r\n</pre>\r\n\r\nThe values of B and C should be identical to the first example.\r\n\r\nYou can even index into an array using another array object. The values of the array object passed into the parenthesis will be used as indices. Here is an example:\r\n\r\n<pre>\r\nfloat a[] = {9, 8, 7, 6, 5, 4, 3, 2, 1};\r\nfloat idx[] = {1, 3, 5};\r\narray A(9, a);\r\narray IDX(3, idx);\r\narray B = A(IDX); //B == {8, 6, 4}\r\n</pre>\r\n\r\nWe first create two C-style arrays. The first array contains the values from 9 to 1 and the second array contains the indices we want to access. We create array objects from these values and pass the <code>IDX</code> as the index of array <code>A</code>. The resulting array B will contain the values <code>{8, 6, 4}</code> which corresponds to the indices <code>{1, 3, 5}</code>.\r\n\r\nIf the passed array object is a b8(boolean) type, then only the non-zero values will be returned.\r\n\r\n<pre>\r\nfloat a[] =  {9, 8, 7, 6, 5, 4, 3, 2, 1};\r\nbool  even[] =   {0, 1, 0, 1, 0, 1, 0, 1, 0};\r\narray A(9, a);\r\narray EVEN(9, even);\r\narray B = A(EVEN);\r\n</pre>\r\n\r\n<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/06/CodeCogsEqn-4.png\"><img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/06/CodeCogsEqn-4.png\" alt=\"Boolean Indexing\" width=\"260\" height=\"198\" class=\"size-full wp-image-6016\" /></a>\r\n\r\nThis technique allows you to input relation operators as indexes. For example, we can extract all values which are greater than 5 using the following code:\r\n\r\n<pre>\r\nfloat a[] =  {9, 8, 7, 6, 5, 4, 3, 2, 1};\r\narray A(9, a);\r\narray B = A(A > 5);\r\n</pre>\r\n\r\n<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/06/CodeCogsEqn-5.png\"><img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/06/CodeCogsEqn-5.png\" alt=\"Relational Operator Indexing\" width=\"141\" height=\"198\" class=\"alignnone size-full wp-image-6017\" /></a>\r\n\r\nI hope this blog was helpful for anyone who is interested in what ArrayFire has to offer. This is the first part of the indexing series. In a future post I will talk about more advanced topics including performance and memory accesses.','Indexing with ArrayFire','','inherit','open','open','','5979-revision-v1','','','2014-06-25 23:23:37','2014-06-25 23:23:37','',5979,'http://sandbox.arrayfire.com/5979-revision-v1/',0,'revision','',0),(6021,7,'2014-06-26 20:33:45','2014-06-26 20:33:45','[content_band inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"40px\" padding_bottom=\"40px\"] [custom_headline type=\"center\" level=\"h3\"]Thanks. This is the part when you download ArrayFire.[/custom_headline][gap size=\"3%\"]\r\n\r\n<hr />\r\n\r\n&nbsp;\r\n\r\n[custom_headline type=\"left\" level=\"h3\"]Desktop Version[/custom_headline]\r\n\r\n[column type=\"one-third\"] [gap size=\"15%\"][button  type=\"flat\" shape=\"rounded\" href=\"http://go.sandbox.arrayfire.com/l/37882/2014-05-22/cznk\" size=\"x-large\" block=\"true\"]Windows, v2.1 (64-bit)[/button] [gap size=\"10%\"] [/column][column type=\"one-third\"][gap size=\"15%\"][button  type=\"flat\" block=\"true\" shape=\"rounded\" href=\"http://go.sandbox.arrayfire.com/l/37882/2014-05-22/cznt\" size=\"x-large\" ]Linux, v2.1 (32 &amp; 64-bit)[/button][/column] [column type=\"one-third\" last=\"true\"][gap size=\"15%\"][button  type=\"flat\" block=\"true\" shape=\"rounded\" href=\"http://go.sandbox.arrayfire.com/l/37882/2014-05-22/cznw\" size=\"x-large\" ]Mac OSX, v2.1 (64-bit)[/button][/column]\r\n\r\n[custom_headline type=\"left\" level=\"h3\"]Mobile/Embedded Version[/custom_headline]\r\n\r\n[column type=\"one-third\"] [gap size=\"15%\"][button  type=\"flat\" shape=\"rounded\" href=\"http://go.sandbox.arrayfire.com/l/37882/2014-06-26/mls1\" size=\"x-large\" block=\"true\"]Linux, v2.1 (CUDA)[/button] [gap size=\"10%\"] [/column][column type=\"one-third\"][gap size=\"15%\"][/column] [column type=\"one-third\" last=\"true\"][gap size=\"15%\"][/column]\r\n\r\nLooking for an old installer? <a href=\"http://sandbox.arrayfire.com/installer_archive\">Try here</a>.\r\n\r\nEach download contains both CUDA and OpenCL files. Your license file will determine your features, e.g. Free, Developer, Pro, or Enterprise.\r\n\r\n&nbsp;\r\n\r\n<hr />\r\n\r\n&nbsp;\r\n\r\n[custom_headline type=\"center\" level=\"h3\"]Awesome. Don\'t forget to check out our <span style=\"color: #ff6600;\"><a href=\"http://www.sandbox.arrayfire.com/docs/\"><span style=\"color: #ff6600;\">documentation</span></a></span> and <a href=\"http://forums.accelereyes.com/\"><span style=\"color: #ff6600;\">forums</span></a>![/custom_headline]\r\n<div id=\"arrayfire\">[gap size=\"3%\"]</div>\r\n[/content_band]','Download','','inherit','open','open','','5931-revision-v1','','','2014-06-26 20:33:45','2014-06-26 20:33:45','',5931,'http://sandbox.arrayfire.com/5931-revision-v1/',0,'revision','',0),(6022,7,'2014-06-26 20:46:09','2014-06-26 20:46:09','[content_band inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"40px\" padding_bottom=\"40px\"] [custom_headline type=\"center\" level=\"h3\"]Thanks. This is the part when you download ArrayFire.[/custom_headline][gap size=\"3%\"]\r\n\r\n<hr />\r\n\r\n&nbsp;\r\n\r\n[custom_headline type=\"left\" level=\"h3\"]Desktop Version[/custom_headline]\r\n\r\n[column type=\"one-third\"] [gap size=\"15%\"][button  type=\"flat\" shape=\"rounded\" href=\"http://go.sandbox.arrayfire.com/l/37882/2014-05-22/cznk\" size=\"x-large\" block=\"true\"]Windows, v2.1 (64-bit)[/button] [gap size=\"10%\"] [/column][column type=\"one-third\"][gap size=\"15%\"][button  type=\"flat\" block=\"true\" shape=\"rounded\" href=\"http://go.sandbox.arrayfire.com/l/37882/2014-05-22/cznt\" size=\"x-large\" ]Linux, v2.1 (32 &amp; 64-bit)[/button][/column] [column type=\"one-third\" last=\"true\"][gap size=\"15%\"][button  type=\"flat\" block=\"true\" shape=\"rounded\" href=\"http://go.sandbox.arrayfire.com/l/37882/2014-05-22/cznw\" size=\"x-large\" ]Mac OSX, v2.1 (64-bit)[/button][/column]\r\n\r\n[custom_headline type=\"left\" level=\"h3\"]Mobile/Embedded Version[/custom_headline]\r\n\r\n[column type=\"one-third\"] [gap size=\"15%\"][button  type=\"flat\" shape=\"rounded\" href=\"http://go.sandbox.arrayfire.com/l/37882/2014-06-26/mls1\" size=\"x-large\" block=\"true\"]Linux, v2.1 (CUDA on Tegra)[/button] [gap size=\"10%\"] [/column][column type=\"one-third\"][gap size=\"15%\"][/column] [column type=\"one-third\" last=\"true\"][gap size=\"15%\"][/column]\r\n\r\nLooking for an old installer? <a href=\"http://sandbox.arrayfire.com/installer_archive\">Try here</a>.\r\n\r\nEach download contains both CUDA and OpenCL files. Your license file will determine your features, e.g. Free, Developer, Pro, or Enterprise.\r\n\r\n&nbsp;\r\n\r\n<hr />\r\n\r\n&nbsp;\r\n\r\n[custom_headline type=\"center\" level=\"h3\"]Awesome. Don\'t forget to check out our <span style=\"color: #ff6600;\"><a href=\"http://www.sandbox.arrayfire.com/docs/\"><span style=\"color: #ff6600;\">documentation</span></a></span> and <a href=\"http://forums.accelereyes.com/\"><span style=\"color: #ff6600;\">forums</span></a>![/custom_headline]\r\n<div id=\"arrayfire\">[gap size=\"3%\"]</div>\r\n[/content_band]','Download','','inherit','open','open','','5931-revision-v1','','','2014-06-26 20:46:09','2014-06-26 20:46:09','',5931,'http://sandbox.arrayfire.com/5931-revision-v1/',0,'revision','',0),(6023,11,'2014-06-27 19:24:37','2014-06-27 19:24:37','We\'re pleased to announce the arrival of ArrayFire for NVIDIA Tegra K1!\r\n\r\nThis version of ArrayFire comes with all the capabilities and features of our standard version of ArrayFire. It includes all ArrayFire CUDA functionality—with the exception of linear algebra support—as well as fully operational graphics support. ArrayFire for Tegra currently works with Tegra K1 processors running <a href=\"https://developer.nvidia.com/linux-tegra\">Linux for Tegra</a>.\r\n\r\nWe invite and encourage you to test it out on your boards and give us feedback; any bug fixes or performance improvements will be promptly resolved, as this is a separate branch of ArrayFire.\r\n\r\nIf you\'d like to deploy ArrayFire on Android, feel free to <a href=\"http://sandbox.arrayfire.com/company/#contact\">contact us</a> for further support. We are open to partnering with anyone wishing to deploy ArrayFire in other production environments.\r\n\r\nWe\'re also working to release ArrayFire for other mobile and embedded platforms using OpenCL. Stay tuned for future developments.\r\n\r\nA couple weeks ago, we released a blog post on <a title=\"Image Processing Benchmarks on Tegra\" href=\"http://sandbox.arrayfire.com/arrayfire-on-nvidia-tegra-tk1/\" target=\"_blank\">Image processing on Tegra K1</a>—check it out for initial performance numbers.\r\n\r\n<strong><a title=\"Download\" href=\"http://sandbox.arrayfire.com/download/\" target=\"_blank\">Download ArrayFire for NVIDIA Tegra K1</a></strong>','ArrayFire on Tegra K1','','publish','open','open','','arrayfire-on-tegra-k1','','\nhttp://sandbox.arrayfire.com/company/#contact','2014-06-27 19:24:37','2014-06-27 19:24:37','',0,'http://sandbox.arrayfire.com/?p=6023',0,'post','',2),(6024,11,'2014-06-26 21:25:52','2014-06-26 21:25:52','@Aaron, introduce us to ArrayFire for Tegra K1.\r\n\r\nHere are some salient technical points you can highlight (other than features we already highlight in the standard version)\r\nIncludes all ArrayFire CUDA functionality except linear algebra support.\r\nFully working graphics support\r\n\r\nWe do not have any licensing for this version\r\n\r\nYou can also highlight that since this is a separate branch of ArrayFire, any bug fixes or performance improvements will be quick. So proactive user\'s can test it out on their boards and give us feedback.\r\n\r\nWe will be releasing the OpenCL version of ArrayFire for Tegra K1 as soon as the OpenCL support is available from NVIDIA.\r\n\r\nPreviously we released a blog post on <a href=\"http://sandbox.arrayfire.com/arrayfire-on-nvidia-tegra-tk1/\" title=\"Image Processing Benchmarks on Tegra\" target=\"_blank\">Image processing on Tegra K1</a>. Ask users to have a look for initial performance numbers.','ArrayFire on Tegra K1','','inherit','open','open','','6023-revision-v1','','','2014-06-26 21:25:52','2014-06-26 21:25:52','',6023,'http://sandbox.arrayfire.com/6023-revision-v1/',0,'revision','',0),(6025,7,'2014-06-27 19:24:26','2014-06-27 19:24:26','We\'re pleased to announce the arrival of ArrayFire for NVIDIA Tegra K1!\r\n\r\nThis version of ArrayFire comes with all the capabilities and features of our standard version of ArrayFire. It includes all ArrayFire CUDA functionality—with the exception of linear algebra support—as well as fully operational graphics support. ArrayFire for Tegra currently works with Tegra K1 processors running <a href=\"https://developer.nvidia.com/linux-tegra\">Linux for Tegra</a>.\r\n\r\nWe invite and encourage you to test it out on your boards and give us feedback; any bug fixes or performance improvements will be promptly resolved, as this is a separate branch of ArrayFire.\r\n\r\nIf you\'d like to deploy ArrayFire on Android, feel free to <a href=\"http://sandbox.arrayfire.com/company/#contact\">contact us</a> for further support. We are open to partnering with anyone wishing to deploy ArrayFire in other production environments.\r\n\r\nWe\'re also working to release ArrayFire for other mobile and embedded platforms using OpenCL. Stay tuned for future developments.\r\n\r\nA couple weeks ago, we released a blog post on <a title=\"Image Processing Benchmarks on Tegra\" href=\"http://sandbox.arrayfire.com/arrayfire-on-nvidia-tegra-tk1/\" target=\"_blank\">Image processing on Tegra K1</a>—check it out for initial performance numbers.\r\n\r\n<strong><a title=\"Download\" href=\"http://sandbox.arrayfire.com/download/\" target=\"_blank\">Download ArrayFire for NVIDIA Tegra K1</a></strong>','ArrayFire on Tegra K1','','inherit','open','open','','6023-autosave-v1','','','2014-06-27 19:24:26','2014-06-27 19:24:26','',6023,'http://sandbox.arrayfire.com/6023-autosave-v1/',0,'revision','',0),(6026,7,'2014-06-27 13:42:04','2014-06-27 13:42:04','We\'re pleased to announce the arrival of ArrayFire for NVIDIA Tegra K1!\r\n\r\nThis version of ArrayFire comes with all the capabilities and features of our standard version of ArrayFire. It includes all ArrayFire CUDA functionality—with the exception of linear algebra support—as well as fully operational graphics support.\r\n\r\nWe invite and encourage users to test it out on their boards and give us feedback; any bug fixes or performance improvements will be promptly resolved, as this is a separate branch of ArrayFire.\r\n\r\nBut wait—there\'s more!\r\n\r\nWe\'ll be releasing the OpenCL version of ArrayFire for Tegra K1 as soon as the OpenCL support is available from NVIDIA.\r\n\r\nA couple weeks ago, we released a blog post on <a title=\"Image Processing Benchmarks on Tegra\" href=\"http://sandbox.arrayfire.com/arrayfire-on-nvidia-tegra-tk1/\" target=\"_blank\">Image processing on Tegra K1</a>—check it out for initial performance numbers.\r\n\r\n<strong><a title=\"Download\" href=\"http://sandbox.arrayfire.com/download/\" target=\"_blank\">Download ArrayFire for NVIDIA Tegra K1</a></strong>','ArrayFire on Tegra K1','','inherit','open','open','','6023-revision-v1','','','2014-06-27 13:42:04','2014-06-27 13:42:04','',6023,'http://sandbox.arrayfire.com/6023-revision-v1/',0,'revision','',0),(6027,7,'2014-06-27 15:01:30','2014-06-27 15:01:30','We\'re pleased to announce the arrival of ArrayFire for NVIDIA Tegra K1!\r\n\r\nThis version of ArrayFire comes with all the capabilities and features of our standard version of ArrayFire. It includes all ArrayFire CUDA functionality—with the exception of linear algebra support—as well as fully operational graphics support. ArrayFire for Tegra currently works with Tegra K1 processors running <a href=\"https://developer.nvidia.com/linux-tegra\">Linux for Tegra</a>.\r\n\r\nWe invite and encourage you to test it out on your boards and give us feedback; any bug fixes or performance improvements will be promptly resolved, as this is a separate branch of ArrayFire.\r\n\r\nIf you\'d like to deploy ArrayFire in production environments not running Linux, feel free to <a href=\"http://sandbox.arrayfire.com/company/#contact\">contact us</a> for further support. We are open to partnering with any users wishing to deploy ArrayFire in production environments not running Linux.\r\n\r\nBut wait—there\'s more!\r\n\r\nWe\'ll be releasing the OpenCL version of ArrayFire for Tegra K1 as soon as the OpenCL support is available from NVIDIA.\r\n\r\nA couple weeks ago, we released a blog post on <a title=\"Image Processing Benchmarks on Tegra\" href=\"http://sandbox.arrayfire.com/arrayfire-on-nvidia-tegra-tk1/\" target=\"_blank\">Image processing on Tegra K1</a>—check it out for initial performance numbers.\r\n\r\n<strong><a title=\"Download\" href=\"http://sandbox.arrayfire.com/download/\" target=\"_blank\">Download ArrayFire for NVIDIA Tegra K1</a></strong>','ArrayFire on Tegra K1','','inherit','open','open','','6023-revision-v1','','','2014-06-27 15:01:30','2014-06-27 15:01:30','',6023,'http://sandbox.arrayfire.com/6023-revision-v1/',0,'revision','',0),(6028,7,'2014-06-27 16:02:48','2014-06-27 16:02:48','We\'re pleased to announce the arrival of ArrayFire for NVIDIA Tegra K1!\r\n\r\nThis version of ArrayFire comes with all the capabilities and features of our standard version of ArrayFire. It includes all ArrayFire CUDA functionality—with the exception of linear algebra support—as well as fully operational graphics support. ArrayFire for Tegra currently works with Tegra K1 processors running <a href=\"https://developer.nvidia.com/linux-tegra\">Linux for Tegra</a>.\r\n\r\nWe invite and encourage you to test it out on your boards and give us feedback; any bug fixes or performance improvements will be promptly resolved, as this is a separate branch of ArrayFire.\r\n\r\nIf you\'d like to deploy ArrayFire in production environments on Android, feel free to <a href=\"http://sandbox.arrayfire.com/company/#contact\">contact us</a> for further support. We are open to partnering with any users wishing to deploy ArrayFire in production environments not running Linux.\r\n\r\nBut wait—there\'s more!\r\n\r\nWe\'ll be releasing the OpenCL version of ArrayFire for Tegra K1 as soon as the OpenCL support is available from NVIDIA. We continue to support OpenCL on other embedded devices.\r\n\r\nA couple weeks ago, we released a blog post on <a title=\"Image Processing Benchmarks on Tegra\" href=\"http://sandbox.arrayfire.com/arrayfire-on-nvidia-tegra-tk1/\" target=\"_blank\">Image processing on Tegra K1</a>—check it out for initial performance numbers.\r\n\r\n<strong><a title=\"Download\" href=\"http://sandbox.arrayfire.com/download/\" target=\"_blank\">Download ArrayFire for NVIDIA Tegra K1</a></strong>','ArrayFire on Tegra K1','','inherit','open','open','','6023-revision-v1','','','2014-06-27 16:02:48','2014-06-27 16:02:48','',6023,'http://sandbox.arrayfire.com/6023-revision-v1/',0,'revision','',0),(6030,7,'2014-06-27 17:54:09','2014-06-27 17:54:09','We\'re pleased to announce the arrival of ArrayFire for NVIDIA Tegra K1!\r\n\r\nThis version of ArrayFire comes with all the capabilities and features of our standard version of ArrayFire. It includes all ArrayFire CUDA functionality—with the exception of linear algebra support—as well as fully operational graphics support. ArrayFire for Tegra currently works with Tegra K1 processors running <a href=\"https://developer.nvidia.com/linux-tegra\">Linux for Tegra</a>.\r\n\r\nWe invite and encourage you to test it out on your boards and give us feedback; any bug fixes or performance improvements will be promptly resolved, as this is a separate branch of ArrayFire.\r\n\r\nIf you\'d like to deploy ArrayFire in production environments on Android, feel free to <a href=\"http://sandbox.arrayfire.com/company/#contact\">contact us</a> for further support. We are open to partnering with any users wishing to deploy ArrayFire in other production environments.\r\n\r\nBut wait—there\'s more!\r\n\r\nWe\'re working to release ArrayFire for other mobile and embedded platforms using OpenCL. Stay tuned for future developments.\r\n\r\nA couple weeks ago, we released a blog post on <a title=\"Image Processing Benchmarks on Tegra\" href=\"http://sandbox.arrayfire.com/arrayfire-on-nvidia-tegra-tk1/\" target=\"_blank\">Image processing on Tegra K1</a>—check it out for initial performance numbers.\r\n\r\n<strong><a title=\"Download\" href=\"http://sandbox.arrayfire.com/download/\" target=\"_blank\">Download ArrayFire for NVIDIA Tegra K1</a></strong>','ArrayFire on Tegra K1','','inherit','open','open','','6023-revision-v1','','','2014-06-27 17:54:09','2014-06-27 17:54:09','',6023,'http://sandbox.arrayfire.com/6023-revision-v1/',0,'revision','',0),(6031,7,'2014-06-27 17:57:49','2014-06-27 17:57:49','We\'re pleased to announce the arrival of ArrayFire for NVIDIA Tegra K1!\r\n\r\nThis version of ArrayFire comes with all the capabilities and features of our standard version of ArrayFire. It includes all ArrayFire CUDA functionality—with the exception of linear algebra support—as well as fully operational graphics support. ArrayFire for Tegra currently works with Tegra K1 processors running <a href=\"https://developer.nvidia.com/linux-tegra\">Linux for Tegra</a>.\r\n\r\nWe invite and encourage you to test it out on your boards and give us feedback; any bug fixes or performance improvements will be promptly resolved, as this is a separate branch of ArrayFire.\r\n\r\nIf you\'d like to deploy ArrayFire on Android, feel free to <a href=\"http://sandbox.arrayfire.com/company/#contact\">contact us</a> for further support. We are open to partnering with anyone wishing to deploy ArrayFire in other production environments.\r\n\r\nBut wait—there\'s more!\r\n\r\nWe\'re working to release ArrayFire for other mobile and embedded platforms using OpenCL. Stay tuned for future developments.\r\n\r\nA couple weeks ago, we released a blog post on <a title=\"Image Processing Benchmarks on Tegra\" href=\"http://sandbox.arrayfire.com/arrayfire-on-nvidia-tegra-tk1/\" target=\"_blank\">Image processing on Tegra K1</a>—check it out for initial performance numbers.\r\n\r\n<strong><a title=\"Download\" href=\"http://sandbox.arrayfire.com/download/\" target=\"_blank\">Download ArrayFire for NVIDIA Tegra K1</a></strong>','ArrayFire on Tegra K1','','inherit','open','open','','6023-revision-v1','','','2014-06-27 17:57:49','2014-06-27 17:57:49','',6023,'http://sandbox.arrayfire.com/6023-revision-v1/',0,'revision','',0),(6032,7,'2014-06-27 19:21:44','2014-06-27 19:21:44','We\'re pleased to announce the arrival of ArrayFire for NVIDIA Tegra K1!\r\n\r\nThis version of ArrayFire comes with all the capabilities and features of our standard version of ArrayFire. It includes all ArrayFire CUDA functionality—with the exception of linear algebra support—as well as fully operational graphics support. ArrayFire for Tegra currently works with Tegra K1 processors running <a href=\"https://developer.nvidia.com/linux-tegra\">Linux for Tegra</a>.\r\n\r\nWe invite and encourage you to test it out on your boards and give us feedback; any bug fixes or performance improvements will be promptly resolved, as this is a separate branch of ArrayFire.\r\n\r\nIf you\'d like to deploy ArrayFire on Android, feel free to <a href=\"http://sandbox.arrayfire.com/company/#contact\">contact us</a> for further support. We are open to partnering with anyone wishing to deploy ArrayFire in other production environments.\r\n\r\nWe\'re also working to release ArrayFire for other mobile and embedded platforms using OpenCL. Stay tuned for future developments.\r\n\r\nA couple weeks ago, we released a blog post on <a title=\"Image Processing Benchmarks on Tegra\" href=\"http://sandbox.arrayfire.com/arrayfire-on-nvidia-tegra-tk1/\" target=\"_blank\">Image processing on Tegra K1</a>—check it out for initial performance numbers.\r\n\r\n<strong><a title=\"Download\" href=\"http://sandbox.arrayfire.com/download/\" target=\"_blank\">Download ArrayFire for NVIDIA Tegra K1</a></strong>','ArrayFire on Tegra K1','','inherit','open','open','','6023-revision-v1','','','2014-06-27 19:21:44','2014-06-27 19:21:44','',6023,'http://sandbox.arrayfire.com/6023-revision-v1/',0,'revision','',0),(6037,17728,'2014-06-30 15:51:30','2014-06-30 15:51:30','In this post we will be looking at benchmarks of the following ArrayFire image processing functions on an ARM device.\r\n<ul>\r\n	<li><a href=\"http://www.sandbox.arrayfire.com/docs/group__morph__mat.htm\">Erosion/Dilation</a></li>\r\n	<li><a href=\"http://www.sandbox.arrayfire.com/docs/group__image__func__cpp__medfilt.htm\">Median filter</a></li>\r\n	<li><a href=\"http://www.sandbox.arrayfire.com/docs/group__image__func__cpp__resize.htm\">Resize</a></li>\r\n	<li><a href=\"http://www.sandbox.arrayfire.com/docs/group__image__func__cpp__histogram.htm\">Histogram</a></li>\r\n	<li><a href=\"http://www.sandbox.arrayfire.com/docs/group__image__func__cpp__bilateral.htm\">Bilateral filter</a></li>\r\n	<li><a href=\"http://www.sandbox.arrayfire.com/docs/group__signal__func__cpp__convolve.htm\">Convolution</a></li>\r\n</ul>\r\nWe pitted the brand new compute 3.2 GPU on NVIDIA Jetson TK1 against a mobile NVIDIA GPU. The closest match to the GPU (from here on referred as TK1) on the Jetson board we have in our mobile card deck is a NVIDIA GT 650M. The GPU device properties that have critical effect on the function performance are listed below.\r\n<table>\r\n<thead>\r\n<tr class=\"header\">\r\n<th style=\"text-align: left;\">Property Name / Device Name</th>\r\n<th style=\"text-align: left;\">Jetson TK1 GK20A</th>\r\n<th style=\"text-align: left;\">GT 650M</th>\r\n</tr>\r\n</thead>\r\n<tbody>\r\n<tr class=\"odd\">\r\n<td style=\"text-align: left;\">Compute</td>\r\n<td style=\"text-align: left;\">3.2</td>\r\n<td style=\"text-align: left;\">3.0</td>\r\n</tr>\r\n<tr class=\"even\">\r\n<td style=\"text-align: left;\">Number of multiprocessors</td>\r\n<td style=\"text-align: left;\">1</td>\r\n<td style=\"text-align: left;\">2</td>\r\n</tr>\r\n<tr class=\"odd\">\r\n<td style=\"text-align: left;\">Cores</td>\r\n<td style=\"text-align: left;\">192</td>\r\n<td style=\"text-align: left;\">384</td>\r\n</tr>\r\n<tr class=\"even\">\r\n<td style=\"text-align: left;\">Base clock rate</td>\r\n<td style=\"text-align: left;\">852 MHz</td>\r\n<td style=\"text-align: left;\">950 MHz</td>\r\n</tr>\r\n<tr class=\"odd\">\r\n<td style=\"text-align: left;\">Total global memory</td>\r\n<td style=\"text-align: left;\">1746 MB</td>\r\n<td style=\"text-align: left;\">2048 MB</td>\r\n</tr>\r\n<tr class=\"even\">\r\n<td style=\"text-align: left;\">Total shared memory per block</td>\r\n<td style=\"text-align: left;\">48 KB</td>\r\n<td style=\"text-align: left;\">48 KB</td>\r\n</tr>\r\n<tr class=\"odd\">\r\n<td style=\"text-align: left;\">Total constant memory</td>\r\n<td style=\"text-align: left;\">64 KB</td>\r\n<td style=\"text-align: left;\">64KB</td>\r\n</tr>\r\n<tr class=\"even\">\r\n<td style=\"text-align: left;\">Memory clock rate</td>\r\n<td style=\"text-align: left;\">924 MHz</td>\r\n<td style=\"text-align: left;\">900 MHz</td>\r\n</tr>\r\n<tr class=\"odd\">\r\n<td style=\"text-align: left;\">Memory bus width</td>\r\n<td style=\"text-align: left;\">64-bit</td>\r\n<td style=\"text-align: left;\">128-bit</td>\r\n</tr>\r\n<tr class=\"even\">\r\n<td style=\"text-align: left;\">Total registers per block</td>\r\n<td style=\"text-align: left;\">32768</td>\r\n<td style=\"text-align: left;\">65536</td>\r\n</tr>\r\n<tr class=\"odd\">\r\n<td style=\"text-align: left;\">Warp size</td>\r\n<td style=\"text-align: left;\">32</td>\r\n<td style=\"text-align: left;\">32</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n<h3 id=\"benchmarks\">Benchmarks</h3>\r\nImages with the the following resolutions are used for benchmarks.\r\n<ul>\r\n	<li>480p (720x480)</li>\r\n	<li>720p and 1080p HD</li>\r\n	<li>4K and 8K UHD</li>\r\n</ul>\r\nNote that the vertical axis (Frames per second) in all of the plots is on log scale. The higher the value along the vertical axis, the better the run times are for that function on a given device.\r\n<h4 id=\"erosiondilation\">Erosion/Dilation</h4>\r\n<iframe src=\"//docs.google.com/a/sandbox.arrayfire.com/spreadsheets/d/1HMKSexMq_G8o8OKtVYq6lpuoezDVNJ2JwNfOS_h-5u8/gviz/chartiframe?oid=1799759820\" width=\"792\" height=\"563\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\nA 3x3 mask was used to benchmark <a href=\"http://www.sandbox.arrayfire.com/docs/group__morph__mat.htm\"><code>erode</code></a> function. Dilate results will be similar to erode because they use the same algorithm with a different local neighborhood operator.\r\n<h4 id=\"median-filter\">Median Filter</h4>\r\n<iframe src=\"//docs.google.com/a/sandbox.arrayfire.com/spreadsheets/d/1HMKSexMq_G8o8OKtVYq6lpuoezDVNJ2JwNfOS_h-5u8/gviz/chartiframe?oid=629321992\" width=\"794\" height=\"561\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\nA 3x3 mask was used to benchmark <a href=\"http://www.sandbox.arrayfire.com/docs/group__image__func__cpp__medfilt.htm\"><code>medfilt</code></a> function as well.\r\n<h4 id=\"resize\">Resize</h4>\r\n<iframe src=\"//docs.google.com/a/sandbox.arrayfire.com/spreadsheets/d/1HMKSexMq_G8o8OKtVYq6lpuoezDVNJ2JwNfOS_h-5u8/gviz/chartiframe?oid=1318972511\" width=\"793\" height=\"561\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\nWe benchmarked <a href=\"http://www.sandbox.arrayfire.com/docs/group__image__func__cpp__resize.htm\"><code>resize</code></a> for halving the image size.\r\n<h4 id=\"histogram\">Histogram</h4>\r\n<iframe src=\"//docs.google.com/a/sandbox.arrayfire.com/spreadsheets/d/1HMKSexMq_G8o8OKtVYq6lpuoezDVNJ2JwNfOS_h-5u8/gviz/chartiframe?oid=12968102\" width=\"794\" height=\"566\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\nStandard 256 bin <code><a href=\"http://www.sandbox.arrayfire.com/docs/group__image__func__cpp__histogram.htm\">histogram</a>.</code>\r\n<h4 id=\"bilateral-filter\">Bilateral filter</h4>\r\n<iframe src=\"//docs.google.com/a/sandbox.arrayfire.com/spreadsheets/d/1HMKSexMq_G8o8OKtVYq6lpuoezDVNJ2JwNfOS_h-5u8/gviz/chartiframe?oid=528280719\" width=\"792\" height=\"560\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\nWe used 3.5 (7x7 window) spatial variance and 50 chromatic variance to benchmark <a href=\"http://www.sandbox.arrayfire.com/docs/group__image__func__cpp__bilateral.htm\"><code>bilateral</code></a> function.\r\n<h4 id=\"convolution\">Convolution</h4>\r\n<iframe src=\"//docs.google.com/a/sandbox.arrayfire.com/spreadsheets/d/1HMKSexMq_G8o8OKtVYq6lpuoezDVNJ2JwNfOS_h-5u8/gviz/chartiframe?oid=905426513\" width=\"795\" height=\"563\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\nA 5x5 blur kernel was used to benchmark <a href=\"http://www.sandbox.arrayfire.com/docs/group__signal__func__cpp__convolve.htm\"><code>convolve</code></a> function.\r\n<h3>Conclusion</h3>\r\n<ul>\r\n	<li><code>erode</code>, <code>resize</code> and <code>conv</code> run in real time for all resolutions except 8K UHD.</li>\r\n	<li><code>medfilt</code> runs in real time until 1080p HD resolution and falls to interactive rates for 4K UHD.</li>\r\n	<li><code>bilateral</code> runs in real time until 1080p HD resolution and falls to 8 fps for 4k UHD.</li>\r\n	<li><code>histogram</code> run times are good enough for it to be used in any photo editing software without noticing any lag for generating image histograms.</li>\r\n</ul>\r\nThere are a plethora of other image processing functions available in ArrayFire. You can find the complete list of the functions available in our documentation <a href=\"http://www.sandbox.arrayfire.com/docs/group__image__mat.htm\">here</a>. The main take away point from this post is that we can easily do image processing in real time using Jetson TK1 for up to 4k UHD resolution.\r\n\r\nIf you want to try out ArrayFire on your Jetson TK1, please contact us at sales@arrayfire.com.\r\n\r\n<h4> Update </h4>\r\n\r\nWe\'ve released ArrayFire for Jetson TK1. You can now get access to the latest version from our <a href=\"http://sandbox.arrayfire.com/download\"> download  page</a>.','Image Processing Benchmarks on NVIDIA Jetson TK1','','inherit','open','open','','5799-revision-v1','','','2014-06-30 15:51:30','2014-06-30 15:51:30','',5799,'http://sandbox.arrayfire.com/5799-revision-v1/',0,'revision','',0),(6038,17728,'2014-06-30 15:52:45','2014-06-30 15:52:45','In this post we will be looking at benchmarks of the following ArrayFire image processing functions on an ARM device.\r\n<ul>\r\n	<li><a href=\"http://www.sandbox.arrayfire.com/docs/group__morph__mat.htm\">Erosion/Dilation</a></li>\r\n	<li><a href=\"http://www.sandbox.arrayfire.com/docs/group__image__func__cpp__medfilt.htm\">Median filter</a></li>\r\n	<li><a href=\"http://www.sandbox.arrayfire.com/docs/group__image__func__cpp__resize.htm\">Resize</a></li>\r\n	<li><a href=\"http://www.sandbox.arrayfire.com/docs/group__image__func__cpp__histogram.htm\">Histogram</a></li>\r\n	<li><a href=\"http://www.sandbox.arrayfire.com/docs/group__image__func__cpp__bilateral.htm\">Bilateral filter</a></li>\r\n	<li><a href=\"http://www.sandbox.arrayfire.com/docs/group__signal__func__cpp__convolve.htm\">Convolution</a></li>\r\n</ul>\r\nWe pitted the brand new compute 3.2 GPU on NVIDIA Jetson TK1 against a mobile NVIDIA GPU. The closest match to the GPU (from here on referred as TK1) on the Jetson board we have in our mobile card deck is a NVIDIA GT 650M. The GPU device properties that have critical effect on the function performance are listed below.\r\n<table>\r\n<thead>\r\n<tr class=\"header\">\r\n<th style=\"text-align: left;\">Property Name / Device Name</th>\r\n<th style=\"text-align: left;\">Jetson TK1 GK20A</th>\r\n<th style=\"text-align: left;\">GT 650M</th>\r\n</tr>\r\n</thead>\r\n<tbody>\r\n<tr class=\"odd\">\r\n<td style=\"text-align: left;\">Compute</td>\r\n<td style=\"text-align: left;\">3.2</td>\r\n<td style=\"text-align: left;\">3.0</td>\r\n</tr>\r\n<tr class=\"even\">\r\n<td style=\"text-align: left;\">Number of multiprocessors</td>\r\n<td style=\"text-align: left;\">1</td>\r\n<td style=\"text-align: left;\">2</td>\r\n</tr>\r\n<tr class=\"odd\">\r\n<td style=\"text-align: left;\">Cores</td>\r\n<td style=\"text-align: left;\">192</td>\r\n<td style=\"text-align: left;\">384</td>\r\n</tr>\r\n<tr class=\"even\">\r\n<td style=\"text-align: left;\">Base clock rate</td>\r\n<td style=\"text-align: left;\">852 MHz</td>\r\n<td style=\"text-align: left;\">950 MHz</td>\r\n</tr>\r\n<tr class=\"odd\">\r\n<td style=\"text-align: left;\">Total global memory</td>\r\n<td style=\"text-align: left;\">1746 MB</td>\r\n<td style=\"text-align: left;\">2048 MB</td>\r\n</tr>\r\n<tr class=\"even\">\r\n<td style=\"text-align: left;\">Total shared memory per block</td>\r\n<td style=\"text-align: left;\">48 KB</td>\r\n<td style=\"text-align: left;\">48 KB</td>\r\n</tr>\r\n<tr class=\"odd\">\r\n<td style=\"text-align: left;\">Total constant memory</td>\r\n<td style=\"text-align: left;\">64 KB</td>\r\n<td style=\"text-align: left;\">64KB</td>\r\n</tr>\r\n<tr class=\"even\">\r\n<td style=\"text-align: left;\">Memory clock rate</td>\r\n<td style=\"text-align: left;\">924 MHz</td>\r\n<td style=\"text-align: left;\">900 MHz</td>\r\n</tr>\r\n<tr class=\"odd\">\r\n<td style=\"text-align: left;\">Memory bus width</td>\r\n<td style=\"text-align: left;\">64-bit</td>\r\n<td style=\"text-align: left;\">128-bit</td>\r\n</tr>\r\n<tr class=\"even\">\r\n<td style=\"text-align: left;\">Total registers per block</td>\r\n<td style=\"text-align: left;\">32768</td>\r\n<td style=\"text-align: left;\">65536</td>\r\n</tr>\r\n<tr class=\"odd\">\r\n<td style=\"text-align: left;\">Warp size</td>\r\n<td style=\"text-align: left;\">32</td>\r\n<td style=\"text-align: left;\">32</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n<h3 id=\"benchmarks\">Benchmarks</h3>\r\nImages with the the following resolutions are used for benchmarks.\r\n<ul>\r\n	<li>480p (720x480)</li>\r\n	<li>720p and 1080p HD</li>\r\n	<li>4K and 8K UHD</li>\r\n</ul>\r\nNote that the vertical axis (Frames per second) in all of the plots is on log scale. The higher the value along the vertical axis, the better the run times are for that function on a given device.\r\n<h4 id=\"erosiondilation\">Erosion/Dilation</h4>\r\n<iframe src=\"//docs.google.com/a/sandbox.arrayfire.com/spreadsheets/d/1HMKSexMq_G8o8OKtVYq6lpuoezDVNJ2JwNfOS_h-5u8/gviz/chartiframe?oid=1799759820\" width=\"792\" height=\"563\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\nA 3x3 mask was used to benchmark <a href=\"http://www.sandbox.arrayfire.com/docs/group__morph__mat.htm\"><code>erode</code></a> function. Dilate results will be similar to erode because they use the same algorithm with a different local neighborhood operator.\r\n<h4 id=\"median-filter\">Median Filter</h4>\r\n<iframe src=\"//docs.google.com/a/sandbox.arrayfire.com/spreadsheets/d/1HMKSexMq_G8o8OKtVYq6lpuoezDVNJ2JwNfOS_h-5u8/gviz/chartiframe?oid=629321992\" width=\"794\" height=\"561\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\nA 3x3 mask was used to benchmark <a href=\"http://www.sandbox.arrayfire.com/docs/group__image__func__cpp__medfilt.htm\"><code>medfilt</code></a> function as well.\r\n<h4 id=\"resize\">Resize</h4>\r\n<iframe src=\"//docs.google.com/a/sandbox.arrayfire.com/spreadsheets/d/1HMKSexMq_G8o8OKtVYq6lpuoezDVNJ2JwNfOS_h-5u8/gviz/chartiframe?oid=1318972511\" width=\"793\" height=\"561\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\nWe benchmarked <a href=\"http://www.sandbox.arrayfire.com/docs/group__image__func__cpp__resize.htm\"><code>resize</code></a> for halving the image size.\r\n<h4 id=\"histogram\">Histogram</h4>\r\n<iframe src=\"//docs.google.com/a/sandbox.arrayfire.com/spreadsheets/d/1HMKSexMq_G8o8OKtVYq6lpuoezDVNJ2JwNfOS_h-5u8/gviz/chartiframe?oid=12968102\" width=\"794\" height=\"566\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\nStandard 256 bin <code><a href=\"http://www.sandbox.arrayfire.com/docs/group__image__func__cpp__histogram.htm\">histogram</a>.</code>\r\n<h4 id=\"bilateral-filter\">Bilateral filter</h4>\r\n<iframe src=\"//docs.google.com/a/sandbox.arrayfire.com/spreadsheets/d/1HMKSexMq_G8o8OKtVYq6lpuoezDVNJ2JwNfOS_h-5u8/gviz/chartiframe?oid=528280719\" width=\"792\" height=\"560\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\nWe used 3.5 (7x7 window) spatial variance and 50 chromatic variance to benchmark <a href=\"http://www.sandbox.arrayfire.com/docs/group__image__func__cpp__bilateral.htm\"><code>bilateral</code></a> function.\r\n<h4 id=\"convolution\">Convolution</h4>\r\n<iframe src=\"//docs.google.com/a/sandbox.arrayfire.com/spreadsheets/d/1HMKSexMq_G8o8OKtVYq6lpuoezDVNJ2JwNfOS_h-5u8/gviz/chartiframe?oid=905426513\" width=\"795\" height=\"563\" frameborder=\"0\" scrolling=\"no\" seamless=\"\"></iframe>\r\n\r\nA 5x5 blur kernel was used to benchmark <a href=\"http://www.sandbox.arrayfire.com/docs/group__signal__func__cpp__convolve.htm\"><code>convolve</code></a> function.\r\n<h3>Conclusion</h3>\r\n<ul>\r\n	<li><code>erode</code>, <code>resize</code> and <code>conv</code> run in real time for all resolutions except 8K UHD.</li>\r\n	<li><code>medfilt</code> runs in real time until 1080p HD resolution and falls to interactive rates for 4K UHD.</li>\r\n	<li><code>bilateral</code> runs in real time until 1080p HD resolution and falls to 8 fps for 4k UHD.</li>\r\n	<li><code>histogram</code> run times are good enough for it to be used in any photo editing software without noticing any lag for generating image histograms.</li>\r\n</ul>\r\nThere are a plethora of other image processing functions available in ArrayFire. You can find the complete list of the functions available in our documentation <a href=\"http://www.sandbox.arrayfire.com/docs/group__image__mat.htm\">here</a>. The main take away point from this post is that we can easily do image processing in real time using Jetson TK1 for up to 4k UHD resolution.\r\n\r\n<h4> Update </h4>\r\n\r\n<del> If you want to try out ArrayFire on your Jetson TK1, please contact us at sales@arrayfire.com. </del>\r\n\r\nWe\'ve released ArrayFire for Jetson TK1. You can now get access to the latest version from our <a href=\"http://sandbox.arrayfire.com/download\"> download  page</a>.','Image Processing Benchmarks on NVIDIA Jetson TK1','','inherit','open','open','','5799-revision-v1','','','2014-06-30 15:52:45','2014-06-30 15:52:45','',5799,'http://sandbox.arrayfire.com/5799-revision-v1/',0,'revision','',0),(6039,17728,'2014-06-30 18:08:25','2014-06-30 18:08:25','<p>While Google has <a href=\"http://stackoverflow.com/questions/14385843/why-did-google-choose-renderscript-instead-of-opencl\">openly</a> displayed its <a href=\"https://code.google.com/p/android/issues/detail?id=36361\">opposition to OpenCL</a>, many hardware manufacturers seem to be putting their weight behind OpenCL. Qualcomm, ARM, Imagination and Vivante support OpenCL on their GPUs. Android Phone manufacturers - Samsung, HTC, Sony and Amazon - ship OpenCL drivers and libraries on their latest generation of devices. Considering the prevalence of OpenCL on shipped devices, it is likely most Renderscript implementations have an OpenCL backend.</p>\r\n\r\n<p>To consolidate a list of OpenCL supported Android devices, we created a publicly accessable Google document seen below. If you have an Android phone that is not listed, we\'d appreciate it if you <a href=\"https://docs.google.com/spreadsheets/d/1Mpzfl2NmLUVSAjIph77-FOsJeuyD9Xjha89r5iHw1hI/edit#gid=0\">contributed to the list</a>. To test if OpenCL is supported on your phone, you can use <a href=\"https://play.google.com/store/apps/details?id=com.xh.openclinfo\">OpenCL Info</a> app on the Google Play. Alternatively, if you are an OpenCL / Android developer, you can <a href=\"http://sandbox.arrayfire.com/getting-started-with-opencl-on-android/\">write your own app</a> to test if OpenCL is supported on your device.</p>\r\n\r\n<h3>List of Android Device with OpenCL support</h3>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1Mpzfl2NmLUVSAjIph77-FOsJeuyD9Xjha89r5iHw1hI/pubhtml?widget=true&amp;headers=false\" width=600 height=450></iframe>\r\n\r\n<h3>OpenCL SDKs</h3>\r\n\r\n<p>Here is a list of OpenCL SDK\'s from various mobile / embedded manufacturers.</p>\r\n\r\n<ul>\r\n<li><a href=\"https://developer.qualcomm.com/mobile-development/maximize-hardware/mobile-gaming-graphics-adreno/tools-and-resources\">Qualcomm\'s Adreno SDK</a></li>\r\n<li><a href=\"http://malideveloper.arm.com/develop-for-mali/sdks/mali-opencl-sdk/\">ARM Mali\'s OpenCL SDK</a></li>\r\n<li><a href=\"http://www.vivantecorp.com/index.php/en/technology/gpgpu.html\">GPGPU on Vivante GPUs</a></li>\r\n<li><a href=\"http://community.imgtec.com/developers/powervr/\">Imagination\'s PowerVR SDK</a></li>\r\n</ul>\r\n\r\n<h3>The ArrayFire Library</h3>\r\n\r\n<p>We are working to bring our library to mobile / embedded platforms. We\'ve recently released <a href=\"http://sandbox.arrayfire.com/arrayfire-on-tegra-k1/\">ArrayFire for Tegra TK1</a>. Please contact <a href=\"mailto:technical@arrayfire.com\" >technical@arrayfire.com </a> if you are interested in using our library on other platforms.</p>','OpenCL on Mobile Devices','','publish','open','open','','opencl-on-mobile-devices','','\nhttp://sandbox.arrayfire.com/arrayfire-on-tegra-k1/','2014-06-30 18:34:13','2014-06-30 18:34:13','',0,'http://sandbox.arrayfire.com/?p=6039',0,'post','',5),(6040,17728,'2014-06-30 16:29:16','2014-06-30 16:29:16','<p>While Google has <a href=\"http://stackoverflow.com/questions/14385843/why-did-google-choose-renderscript-instead-of-opencl\">openly</a> displayed its <a href=\"https://code.google.com/p/android/issues/detail?id=36361\">opposition to OpenCL</a>, many hardware manufacturers seem to be putting their weight behind OpenCL. Qualcomm, ARM, Imagination and Vivante all support OpenCL on their GPUs. Android Phone manufacturers like Samsung, HTC, Sony and Amazon ship OpenCL drivers and libraries on their latest generation of devices. Considering the prelevance of OpenCL on shipped devices, it is likely most Renderscript implementations have an OpenCL backend.</p>\r\n\r\n<p>We have started compiling the list of OpenCL supported phones on Android. You can see the list below. If you have an android phone that is not listed, we\'d appreciate it if you contributed to the list. To test if OpenCL is supported on your phone, you can use <a href=\"https://play.google.com/store/apps/details?id=com.xh.openclinfo\">this app</a> on the playstore. Alternatively, if you are an OpenCL / android developer, you can <a href=\"http://sandbox.arrayfire.com/getting-started-with-opencl-on-android/\">write your own app</a> to test OpenCL is supported on your</p>\r\n\r\n<h3>List of Android Device with OpenCL support</h3>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1Mpzfl2NmLUVSAjIph77-FOsJeuyD9Xjha89r5iHw1hI/pubhtml?widget=true&amp;headers=false\"></iframe>\r\n\r\n<h3>OpenCL SDK\'s</h3>\r\n\r\n<p>Here is a list of OpenCL SDK\'s from various mobile / embedded manufacturers.</p>\r\n\r\n<ul>\r\n<li><a href=\"https://developer.qualcomm.com/mobile-development/maximize-hardware/mobile-gaming-graphics-adreno/tools-and-resources\">Qualcomm\'s Adreno SDK</a></li>\r\n<li><a href=\"http://malideveloper.arm.com/develop-for-mali/sdks/mali-opencl-sdk/\">ARM Mali\'s OpenCL SDK</a></li>\r\n<li><a href=\"http://www.vivantecorp.com/index.php/en/technology/gpgpu.html\">GPGPU on Vivante GPUs</a></li>\r\n<li><a href=\"http://community.imgtec.com/developers/powervr/\">Imagination\'s PowerVR SDK</a></li>\r\n</ul>','OpenCL on Mobile devices','','inherit','open','open','','6039-revision-v1','','','2014-06-30 16:29:16','2014-06-30 16:29:16','',6039,'http://sandbox.arrayfire.com/6039-revision-v1/',0,'revision','',0),(6041,17728,'2014-06-30 16:31:08','2014-06-30 16:31:08','<p>While Google has <a href=\"http://stackoverflow.com/questions/14385843/why-did-google-choose-renderscript-instead-of-opencl\">openly</a> displayed its <a href=\"https://code.google.com/p/android/issues/detail?id=36361\">opposition to OpenCL</a>, many hardware manufacturers seem to be putting their weight behind OpenCL. Qualcomm, ARM, Imagination and Vivante all support OpenCL on their GPUs. Android Phone manufacturers like Samsung, HTC, Sony and Amazon ship OpenCL drivers and libraries on their latest generation of devices. Considering the prelevance of OpenCL on shipped devices, it is likely most Renderscript implementations have an OpenCL backend.</p>\r\n\r\n<p>We have started compiling the list of OpenCL supported phones on Android. You can see the list below. If you have an android phone that is not listed, we\'d appreciate it if you contributed to the list. To test if OpenCL is supported on your phone, you can use <a href=\"https://play.google.com/store/apps/details?id=com.xh.openclinfo\">this app</a> on the playstore. Alternatively, if you are an OpenCL / android developer, you can <a href=\"http://sandbox.arrayfire.com/getting-started-with-opencl-on-android/\">write your own app</a> to test OpenCL is supported on your</p>\r\n\r\n<h3>List of Android Device with OpenCL support</h3>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1Mpzfl2NmLUVSAjIph77-FOsJeuyD9Xjha89r5iHw1hI/pubhtml?widget=true&amp;headers=false\" width=800 height=1000></iframe>\r\n\r\n<h3>OpenCL SDK\'s</h3>\r\n\r\n<p>Here is a list of OpenCL SDK\'s from various mobile / embedded manufacturers.</p>\r\n\r\n<ul>\r\n<li><a href=\"https://developer.qualcomm.com/mobile-development/maximize-hardware/mobile-gaming-graphics-adreno/tools-and-resources\">Qualcomm\'s Adreno SDK</a></li>\r\n<li><a href=\"http://malideveloper.arm.com/develop-for-mali/sdks/mali-opencl-sdk/\">ARM Mali\'s OpenCL SDK</a></li>\r\n<li><a href=\"http://www.vivantecorp.com/index.php/en/technology/gpgpu.html\">GPGPU on Vivante GPUs</a></li>\r\n<li><a href=\"http://community.imgtec.com/developers/powervr/\">Imagination\'s PowerVR SDK</a></li>\r\n</ul>','OpenCL on Mobile devices','','inherit','open','open','','6039-revision-v1','','','2014-06-30 16:31:08','2014-06-30 16:31:08','',6039,'http://sandbox.arrayfire.com/6039-revision-v1/',0,'revision','',0),(6042,17728,'2014-06-30 16:31:38','2014-06-30 16:31:38','<p>While Google has <a href=\"http://stackoverflow.com/questions/14385843/why-did-google-choose-renderscript-instead-of-opencl\">openly</a> displayed its <a href=\"https://code.google.com/p/android/issues/detail?id=36361\">opposition to OpenCL</a>, many hardware manufacturers seem to be putting their weight behind OpenCL. Qualcomm, ARM, Imagination and Vivante all support OpenCL on their GPUs. Android Phone manufacturers like Samsung, HTC, Sony and Amazon ship OpenCL drivers and libraries on their latest generation of devices. Considering the prelevance of OpenCL on shipped devices, it is likely most Renderscript implementations have an OpenCL backend.</p>\r\n\r\n<p>We have started compiling the list of OpenCL supported phones on Android. You can see the list below. If you have an android phone that is not listed, we\'d appreciate it if you contributed to the list. To test if OpenCL is supported on your phone, you can use <a href=\"https://play.google.com/store/apps/details?id=com.xh.openclinfo\">this app</a> on the playstore. Alternatively, if you are an OpenCL / android developer, you can <a href=\"http://sandbox.arrayfire.com/getting-started-with-opencl-on-android/\">write your own app</a> to test OpenCL is supported on your</p>\r\n\r\n<h3>List of Android Device with OpenCL support</h3>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1Mpzfl2NmLUVSAjIph77-FOsJeuyD9Xjha89r5iHw1hI/pubhtml?widget=true&amp;headers=false\" width=600 height=400></iframe>\r\n\r\n<h3>OpenCL SDK\'s</h3>\r\n\r\n<p>Here is a list of OpenCL SDK\'s from various mobile / embedded manufacturers.</p>\r\n\r\n<ul>\r\n<li><a href=\"https://developer.qualcomm.com/mobile-development/maximize-hardware/mobile-gaming-graphics-adreno/tools-and-resources\">Qualcomm\'s Adreno SDK</a></li>\r\n<li><a href=\"http://malideveloper.arm.com/develop-for-mali/sdks/mali-opencl-sdk/\">ARM Mali\'s OpenCL SDK</a></li>\r\n<li><a href=\"http://www.vivantecorp.com/index.php/en/technology/gpgpu.html\">GPGPU on Vivante GPUs</a></li>\r\n<li><a href=\"http://community.imgtec.com/developers/powervr/\">Imagination\'s PowerVR SDK</a></li>\r\n</ul>','OpenCL on Mobile devices','','inherit','open','open','','6039-revision-v1','','','2014-06-30 16:31:38','2014-06-30 16:31:38','',6039,'http://sandbox.arrayfire.com/6039-revision-v1/',0,'revision','',0),(6043,17728,'2014-06-30 16:35:34','2014-06-30 16:35:34','<p>While Google has <a href=\"http://stackoverflow.com/questions/14385843/why-did-google-choose-renderscript-instead-of-opencl\">openly</a> displayed its <a href=\"https://code.google.com/p/android/issues/detail?id=36361\">opposition to OpenCL</a>, many hardware manufacturers seem to be putting their weight behind OpenCL. Qualcomm, ARM, Imagination and Vivante all support OpenCL on their GPUs. Android Phone manufacturers like Samsung, HTC, Sony and Amazon ship OpenCL drivers and libraries on their latest generation of devices. Considering the prelevance of OpenCL on shipped devices, it is likely most Renderscript implementations have an OpenCL backend.</p>\r\n\r\n<p>We have started compiling the list of OpenCL supported phones on Android. You can see the list below. If you have an android phone that is not listed, we\'d appreciate it if you contributed to the list. To test if OpenCL is supported on your phone, you can use <a href=\"https://play.google.com/store/apps/details?id=com.xh.openclinfo\">this app</a> on the playstore. Alternatively, if you are an OpenCL / android developer, you can <a href=\"http://sandbox.arrayfire.com/getting-started-with-opencl-on-android/\">write your own app</a> to test OpenCL is supported on your</p>\r\n\r\n<h3>List of Android Device with OpenCL support</h3>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1Mpzfl2NmLUVSAjIph77-FOsJeuyD9Xjha89r5iHw1hI/pubhtml?widget=true&amp;headers=false\" height=400></iframe>\r\n\r\n<h3>OpenCL SDK\'s</h3>\r\n\r\n<p>Here is a list of OpenCL SDK\'s from various mobile / embedded manufacturers.</p>\r\n\r\n<ul>\r\n<li><a href=\"https://developer.qualcomm.com/mobile-development/maximize-hardware/mobile-gaming-graphics-adreno/tools-and-resources\">Qualcomm\'s Adreno SDK</a></li>\r\n<li><a href=\"http://malideveloper.arm.com/develop-for-mali/sdks/mali-opencl-sdk/\">ARM Mali\'s OpenCL SDK</a></li>\r\n<li><a href=\"http://www.vivantecorp.com/index.php/en/technology/gpgpu.html\">GPGPU on Vivante GPUs</a></li>\r\n<li><a href=\"http://community.imgtec.com/developers/powervr/\">Imagination\'s PowerVR SDK</a></li>\r\n</ul>','OpenCL on Mobile devices','','inherit','open','open','','6039-revision-v1','','','2014-06-30 16:35:34','2014-06-30 16:35:34','',6039,'http://sandbox.arrayfire.com/6039-revision-v1/',0,'revision','',0),(6044,17728,'2014-06-30 16:36:45','2014-06-30 16:36:45','<p>While Google has <a href=\"http://stackoverflow.com/questions/14385843/why-did-google-choose-renderscript-instead-of-opencl\">openly</a> displayed its <a href=\"https://code.google.com/p/android/issues/detail?id=36361\">opposition to OpenCL</a>, many hardware manufacturers seem to be putting their weight behind OpenCL. Qualcomm, ARM, Imagination and Vivante all support OpenCL on their GPUs. Android Phone manufacturers like Samsung, HTC, Sony and Amazon ship OpenCL drivers and libraries on their latest generation of devices. Considering the prelevance of OpenCL on shipped devices, it is likely most Renderscript implementations have an OpenCL backend.</p>\r\n\r\n<p>We have started compiling the list of OpenCL supported phones on Android. You can see the list below. If you have an android phone that is not listed, we\'d appreciate it if you contributed to the list. To test if OpenCL is supported on your phone, you can use <a href=\"https://play.google.com/store/apps/details?id=com.xh.openclinfo\">this app</a> on the playstore. Alternatively, if you are an OpenCL / android developer, you can <a href=\"http://sandbox.arrayfire.com/getting-started-with-opencl-on-android/\">write your own app</a> to test OpenCL is supported on your</p>\r\n\r\n<h3>List of Android Device with OpenCL support</h3>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1Mpzfl2NmLUVSAjIph77-FOsJeuyD9Xjha89r5iHw1hI/pubhtml?widget=true&amp;headers=false\" width=600 height=600></iframe>\r\n\r\n<h3>OpenCL SDK\'s</h3>\r\n\r\n<p>Here is a list of OpenCL SDK\'s from various mobile / embedded manufacturers.</p>\r\n\r\n<ul>\r\n<li><a href=\"https://developer.qualcomm.com/mobile-development/maximize-hardware/mobile-gaming-graphics-adreno/tools-and-resources\">Qualcomm\'s Adreno SDK</a></li>\r\n<li><a href=\"http://malideveloper.arm.com/develop-for-mali/sdks/mali-opencl-sdk/\">ARM Mali\'s OpenCL SDK</a></li>\r\n<li><a href=\"http://www.vivantecorp.com/index.php/en/technology/gpgpu.html\">GPGPU on Vivante GPUs</a></li>\r\n<li><a href=\"http://community.imgtec.com/developers/powervr/\">Imagination\'s PowerVR SDK</a></li>\r\n</ul>','OpenCL on Mobile devices','','inherit','open','open','','6039-revision-v1','','','2014-06-30 16:36:45','2014-06-30 16:36:45','',6039,'http://sandbox.arrayfire.com/6039-revision-v1/',0,'revision','',0),(6045,17728,'2014-06-30 16:37:28','2014-06-30 16:37:28','<p>While Google has <a href=\"http://stackoverflow.com/questions/14385843/why-did-google-choose-renderscript-instead-of-opencl\">openly</a> displayed its <a href=\"https://code.google.com/p/android/issues/detail?id=36361\">opposition to OpenCL</a>, many hardware manufacturers seem to be putting their weight behind OpenCL. Qualcomm, ARM, Imagination and Vivante all support OpenCL on their GPUs. Android Phone manufacturers like Samsung, HTC, Sony and Amazon ship OpenCL drivers and libraries on their latest generation of devices. Considering the prelevance of OpenCL on shipped devices, it is likely most Renderscript implementations have an OpenCL backend.</p>\r\n\r\n<p>We have started compiling the list of OpenCL supported phones on Android. You can see the list below. If you have an android phone that is not listed, we\'d appreciate it if you contributed to the list. To test if OpenCL is supported on your phone, you can use <a href=\"https://play.google.com/store/apps/details?id=com.xh.openclinfo\">this app</a> on the playstore. Alternatively, if you are an OpenCL / android developer, you can <a href=\"http://sandbox.arrayfire.com/getting-started-with-opencl-on-android/\">write your own app</a> to test OpenCL is supported on your</p>\r\n\r\n<h3>List of Android Device with OpenCL support</h3>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1Mpzfl2NmLUVSAjIph77-FOsJeuyD9Xjha89r5iHw1hI/pubhtml?widget=true&amp;headers=false\" width=600 height=450></iframe>\r\n\r\n<h3>OpenCL SDK\'s</h3>\r\n\r\n<p>Here is a list of OpenCL SDK\'s from various mobile / embedded manufacturers.</p>\r\n\r\n<ul>\r\n<li><a href=\"https://developer.qualcomm.com/mobile-development/maximize-hardware/mobile-gaming-graphics-adreno/tools-and-resources\">Qualcomm\'s Adreno SDK</a></li>\r\n<li><a href=\"http://malideveloper.arm.com/develop-for-mali/sdks/mali-opencl-sdk/\">ARM Mali\'s OpenCL SDK</a></li>\r\n<li><a href=\"http://www.vivantecorp.com/index.php/en/technology/gpgpu.html\">GPGPU on Vivante GPUs</a></li>\r\n<li><a href=\"http://community.imgtec.com/developers/powervr/\">Imagination\'s PowerVR SDK</a></li>\r\n</ul>','OpenCL on Mobile devices','','inherit','open','open','','6039-revision-v1','','','2014-06-30 16:37:28','2014-06-30 16:37:28','',6039,'http://sandbox.arrayfire.com/6039-revision-v1/',0,'revision','',0),(6046,17728,'2014-06-30 16:47:42','2014-06-30 16:47:42','<p>While Google has <a href=\"http://stackoverflow.com/questions/14385843/why-did-google-choose-renderscript-instead-of-opencl\">openly</a> displayed its <a href=\"https://code.google.com/p/android/issues/detail?id=36361\">opposition to OpenCL</a>, many hardware manufacturers seem to be putting their weight behind OpenCL. Qualcomm, ARM, Imagination and Vivante all support OpenCL on their GPUs. Android Phone manufacturers like Samsung, HTC, Sony and Amazon ship OpenCL drivers and libraries on their latest generation of devices. Considering the prelevance of OpenCL on shipped devices, it is likely most Renderscript implementations have an OpenCL backend.</p>\r\n\r\n<p>To consolidate a list of OpenCL supported Android devices, we created a publicly accessable Google document seen below. If you have an android phone that is not listed, we\'d appreciate it if you <a href=\"https://docs.google.com/spreadsheets/d/1Mpzfl2NmLUVSAjIph77-FOsJeuyD9Xjha89r5iHw1hI/edit#gid=0\">contributed to the list</a>. To test if OpenCL is supported on your phone, you can use <a href=\"https://play.google.com/store/apps/details?id=com.xh.openclinfo\">this app</a> on the playstore. Alternatively, if you are an OpenCL / android developer, you can <a href=\"http://sandbox.arrayfire.com/getting-started-with-opencl-on-android/\">write your own app</a> to test OpenCL is supported on your device.</p>\r\n\r\n<h3>List of Android Device with OpenCL support</h3>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1Mpzfl2NmLUVSAjIph77-FOsJeuyD9Xjha89r5iHw1hI/pubhtml?widget=true&amp;headers=false\" width=600 height=450></iframe>\r\n\r\n<h3>OpenCL SDK\'s</h3>\r\n\r\n<p>Here is a list of OpenCL SDK\'s from various mobile / embedded manufacturers.</p>\r\n\r\n<ul>\r\n<li><a href=\"https://developer.qualcomm.com/mobile-development/maximize-hardware/mobile-gaming-graphics-adreno/tools-and-resources\">Qualcomm\'s Adreno SDK</a></li>\r\n<li><a href=\"http://malideveloper.arm.com/develop-for-mali/sdks/mali-opencl-sdk/\">ARM Mali\'s OpenCL SDK</a></li>\r\n<li><a href=\"http://www.vivantecorp.com/index.php/en/technology/gpgpu.html\">GPGPU on Vivante GPUs</a></li>\r\n<li><a href=\"http://community.imgtec.com/developers/powervr/\">Imagination\'s PowerVR SDK</a></li>\r\n</ul>','OpenCL on Mobile devices','','inherit','open','open','','6039-revision-v1','','','2014-06-30 16:47:42','2014-06-30 16:47:42','',6039,'http://sandbox.arrayfire.com/6039-revision-v1/',0,'revision','',0),(6048,17728,'2014-06-30 18:04:50','2014-06-30 18:04:50','<p>While Google has <a href=\"http://stackoverflow.com/questions/14385843/why-did-google-choose-renderscript-instead-of-opencl\">openly</a> displayed its <a href=\"https://code.google.com/p/android/issues/detail?id=36361\">opposition to OpenCL</a>, many hardware manufacturers seem to be putting their weight behind OpenCL. Qualcomm, ARM, Imagination and Vivante support OpenCL on their GPUs. Android Phone manufacturers - Samsung, HTC, Sony and Amazon - ship OpenCL drivers and libraries on their latest generation of devices. Considering the prelavence of OpenCL on shipped devices, it is likely most Renderscript implementations have an OpenCL backend.</p>\r\n\r\n<p>To consolidate a list of OpenCL supported Android devices, we created a publicly accessable Google document seen below. If you have an Android phone that is not listed, we\'d appreciate it if you <a href=\"https://docs.google.com/spreadsheets/d/1Mpzfl2NmLUVSAjIph77-FOsJeuyD9Xjha89r5iHw1hI/edit#gid=0\">contributed to the list</a>. To test if OpenCL is supported on your phone, you can use <a href=\"https://play.google.com/store/apps/details?id=com.xh.openclinfo\">OpenCL Info</a> app on the Google Play. Alternatively, if you are an OpenCL / Android developer, you can <a href=\"http://sandbox.arrayfire.com/getting-started-with-opencl-on-android/\">write your own app</a> to test if OpenCL is supported on your device.</p>\r\n\r\n<h3>List of Android Device with OpenCL support</h3>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1Mpzfl2NmLUVSAjIph77-FOsJeuyD9Xjha89r5iHw1hI/pubhtml?widget=true&amp;headers=false\" width=600 height=450></iframe>\r\n\r\n<h3>OpenCL SDKs</h3>\r\n\r\n<p>Here is a list of OpenCL SDK\'s from various mobile / embedded manufacturers.</p>\r\n\r\n<ul>\r\n<li><a href=\"https://developer.qualcomm.com/mobile-development/maximize-hardware/mobile-gaming-graphics-adreno/tools-and-resources\">Qualcomm\'s Adreno SDK</a></li>\r\n<li><a href=\"http://malideveloper.arm.com/develop-for-mali/sdks/mali-opencl-sdk/\">ARM Mali\'s OpenCL SDK</a></li>\r\n<li><a href=\"http://www.vivantecorp.com/index.php/en/technology/gpgpu.html\">GPGPU on Vivante GPUs</a></li>\r\n<li><a href=\"http://community.imgtec.com/developers/powervr/\">Imagination\'s PowerVR SDK</a></li>\r\n</ul>\r\n\r\n<h3>The ArrayFire Library</h3>\r\n\r\n<p>We are working to bring our library to mobile / embedded platforms. We\'ve recently released <a href=\"http://sandbox.arrayfire.com/arrayfire-on-tegra-k1/\">ArrayFire for Tegra TK1</a>. Please contact sales@arrayfire.com if you are interested in using our library on other platforms.</p>','OpenCL on Mobile devices','','inherit','open','open','','6039-revision-v1','','','2014-06-30 18:04:50','2014-06-30 18:04:50','',6039,'http://sandbox.arrayfire.com/6039-revision-v1/',0,'revision','',0),(6050,17728,'2014-06-30 18:12:40','2014-06-30 18:12:40','<p>While Google has <a href=\"http://stackoverflow.com/questions/14385843/why-did-google-choose-renderscript-instead-of-opencl\">openly</a> displayed its <a href=\"https://code.google.com/p/android/issues/detail?id=36361\">opposition to OpenCL</a>, many hardware manufacturers seem to be putting their weight behind OpenCL. Qualcomm, ARM, Imagination and Vivante support OpenCL on their GPUs. Android Phone manufacturers - Samsung, HTC, Sony and Amazon - ship OpenCL drivers and libraries on their latest generation of devices. Considering the prevalence of OpenCL on shipped devices, it is likely most Renderscript implementations have an OpenCL backend.</p>\r\n\r\n<p>To consolidate a list of OpenCL supported Android devices, we created a publicly accessable Google document seen below. If you have an Android phone that is not listed, we\'d appreciate it if you <a href=\"https://docs.google.com/spreadsheets/d/1Mpzfl2NmLUVSAjIph77-FOsJeuyD9Xjha89r5iHw1hI/edit#gid=0\">contributed to the list</a>. To test if OpenCL is supported on your phone, you can use <a href=\"https://play.google.com/store/apps/details?id=com.xh.openclinfo\">OpenCL Info</a> app on the Google Play. Alternatively, if you are an OpenCL / Android developer, you can <a href=\"http://sandbox.arrayfire.com/getting-started-with-opencl-on-android/\">write your own app</a> to test if OpenCL is supported on your device.</p>\r\n\r\n<h3>List of Android Device with OpenCL support</h3>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1Mpzfl2NmLUVSAjIph77-FOsJeuyD9Xjha89r5iHw1hI/pubhtml?widget=true&amp;headers=false\" width=600 height=450></iframe>\r\n\r\n<h3>OpenCL SDKs</h3>\r\n\r\n<p>Here is a list of OpenCL SDK\'s from various mobile / embedded manufacturers.</p>\r\n\r\n<ul>\r\n<li><a href=\"https://developer.qualcomm.com/mobile-development/maximize-hardware/mobile-gaming-graphics-adreno/tools-and-resources\">Qualcomm\'s Adreno SDK</a></li>\r\n<li><a href=\"http://malideveloper.arm.com/develop-for-mali/sdks/mali-opencl-sdk/\">ARM Mali\'s OpenCL SDK</a></li>\r\n<li><a href=\"http://www.vivantecorp.com/index.php/en/technology/gpgpu.html\">GPGPU on Vivante GPUs</a></li>\r\n<li><a href=\"http://community.imgtec.com/developers/powervr/\">Imagination\'s PowerVR SDK</a></li>\r\n</ul>\r\n\r\n<h3>The ArrayFire Library</h3>\r\n\r\n<p>We are working to bring our library to mobile / embedded platforms. We\'ve recently released <a href=\"http://sandbox.arrayfire.com/arrayfire-on-tegra-k1/\">ArrayFire for Tegra TK1</a>. Please contact sales@arrayfire.com if you are interested in using our library on other platforms.</p>','OpenCL on Mobile devices','','inherit','open','open','','6039-revision-v1','','','2014-06-30 18:12:40','2014-06-30 18:12:40','',6039,'http://sandbox.arrayfire.com/6039-revision-v1/',0,'revision','',0),(6051,17728,'2014-06-30 18:13:36','2014-06-30 18:13:36','<p>While Google has <a href=\"http://stackoverflow.com/questions/14385843/why-did-google-choose-renderscript-instead-of-opencl\">openly</a> displayed its <a href=\"https://code.google.com/p/android/issues/detail?id=36361\">opposition to OpenCL</a>, many hardware manufacturers seem to be putting their weight behind OpenCL. Qualcomm, ARM, Imagination and Vivante support OpenCL on their GPUs. Android Phone manufacturers - Samsung, HTC, Sony and Amazon - ship OpenCL drivers and libraries on their latest generation of devices. Considering the prevalence of OpenCL on shipped devices, it is likely most Renderscript implementations have an OpenCL backend.</p>\r\n\r\n<p>To consolidate a list of OpenCL supported Android devices, we created a publicly accessable Google document seen below. If you have an Android phone that is not listed, we\'d appreciate it if you <a href=\"https://docs.google.com/spreadsheets/d/1Mpzfl2NmLUVSAjIph77-FOsJeuyD9Xjha89r5iHw1hI/edit#gid=0\">contributed to the list</a>. To test if OpenCL is supported on your phone, you can use <a href=\"https://play.google.com/store/apps/details?id=com.xh.openclinfo\">OpenCL Info</a> app on the Google Play. Alternatively, if you are an OpenCL / Android developer, you can <a href=\"http://sandbox.arrayfire.com/getting-started-with-opencl-on-android/\">write your own app</a> to test if OpenCL is supported on your device.</p>\r\n\r\n<h3>List of Android Device with OpenCL support</h3>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1Mpzfl2NmLUVSAjIph77-FOsJeuyD9Xjha89r5iHw1hI/pubhtml?widget=true&amp;headers=false\" width=600 height=450></iframe>\r\n\r\n<h3>OpenCL SDKs</h3>\r\n\r\n<p>Here is a list of OpenCL SDK\'s from various mobile / embedded manufacturers.</p>\r\n\r\n<ul>\r\n<li><a href=\"https://developer.qualcomm.com/mobile-development/maximize-hardware/mobile-gaming-graphics-adreno/tools-and-resources\">Qualcomm\'s Adreno SDK</a></li>\r\n<li><a href=\"http://malideveloper.arm.com/develop-for-mali/sdks/mali-opencl-sdk/\">ARM Mali\'s OpenCL SDK</a></li>\r\n<li><a href=\"http://www.vivantecorp.com/index.php/en/technology/gpgpu.html\">GPGPU on Vivante GPUs</a></li>\r\n<li><a href=\"http://community.imgtec.com/developers/powervr/\">Imagination\'s PowerVR SDK</a></li>\r\n</ul>\r\n\r\n<h3>The ArrayFire Library</h3>\r\n\r\n<p>We are working to bring our library to mobile / embedded platforms. We\'ve recently released <a href=\"http://sandbox.arrayfire.com/arrayfire-on-tegra-k1/\">ArrayFire for Tegra TK1</a>. Please contact sales@arrayfire.com if you are interested in using our library on other platforms.</p>','OpenCL on Mobile Devices','','inherit','open','open','','6039-revision-v1','','','2014-06-30 18:13:36','2014-06-30 18:13:36','',6039,'http://sandbox.arrayfire.com/6039-revision-v1/',0,'revision','',0),(6052,17728,'2014-06-30 18:34:13','2014-06-30 18:34:13','<p>While Google has <a href=\"http://stackoverflow.com/questions/14385843/why-did-google-choose-renderscript-instead-of-opencl\">openly</a> displayed its <a href=\"https://code.google.com/p/android/issues/detail?id=36361\">opposition to OpenCL</a>, many hardware manufacturers seem to be putting their weight behind OpenCL. Qualcomm, ARM, Imagination and Vivante support OpenCL on their GPUs. Android Phone manufacturers - Samsung, HTC, Sony and Amazon - ship OpenCL drivers and libraries on their latest generation of devices. Considering the prevalence of OpenCL on shipped devices, it is likely most Renderscript implementations have an OpenCL backend.</p>\r\n\r\n<p>To consolidate a list of OpenCL supported Android devices, we created a publicly accessable Google document seen below. If you have an Android phone that is not listed, we\'d appreciate it if you <a href=\"https://docs.google.com/spreadsheets/d/1Mpzfl2NmLUVSAjIph77-FOsJeuyD9Xjha89r5iHw1hI/edit#gid=0\">contributed to the list</a>. To test if OpenCL is supported on your phone, you can use <a href=\"https://play.google.com/store/apps/details?id=com.xh.openclinfo\">OpenCL Info</a> app on the Google Play. Alternatively, if you are an OpenCL / Android developer, you can <a href=\"http://sandbox.arrayfire.com/getting-started-with-opencl-on-android/\">write your own app</a> to test if OpenCL is supported on your device.</p>\r\n\r\n<h3>List of Android Device with OpenCL support</h3>\r\n\r\n<iframe src=\"https://docs.google.com/spreadsheets/d/1Mpzfl2NmLUVSAjIph77-FOsJeuyD9Xjha89r5iHw1hI/pubhtml?widget=true&amp;headers=false\" width=600 height=450></iframe>\r\n\r\n<h3>OpenCL SDKs</h3>\r\n\r\n<p>Here is a list of OpenCL SDK\'s from various mobile / embedded manufacturers.</p>\r\n\r\n<ul>\r\n<li><a href=\"https://developer.qualcomm.com/mobile-development/maximize-hardware/mobile-gaming-graphics-adreno/tools-and-resources\">Qualcomm\'s Adreno SDK</a></li>\r\n<li><a href=\"http://malideveloper.arm.com/develop-for-mali/sdks/mali-opencl-sdk/\">ARM Mali\'s OpenCL SDK</a></li>\r\n<li><a href=\"http://www.vivantecorp.com/index.php/en/technology/gpgpu.html\">GPGPU on Vivante GPUs</a></li>\r\n<li><a href=\"http://community.imgtec.com/developers/powervr/\">Imagination\'s PowerVR SDK</a></li>\r\n</ul>\r\n\r\n<h3>The ArrayFire Library</h3>\r\n\r\n<p>We are working to bring our library to mobile / embedded platforms. We\'ve recently released <a href=\"http://sandbox.arrayfire.com/arrayfire-on-tegra-k1/\">ArrayFire for Tegra TK1</a>. Please contact <a href=\"mailto:technical@arrayfire.com\" >technical@arrayfire.com </a> if you are interested in using our library on other platforms.</p>','OpenCL on Mobile Devices','','inherit','open','open','','6039-revision-v1','','','2014-06-30 18:34:13','2014-06-30 18:34:13','',6039,'http://sandbox.arrayfire.com/6039-revision-v1/',0,'revision','',0),(6053,7,'2014-06-30 18:45:00','2014-06-30 18:45:00','[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 inner_container=\"true\" no_margin=\"true\" border=\"none\" padding_top=\"40px\" padding_bottom=\"40px\" ][column type=\"one-half\"][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.[/column][column type=\"one-half\" last=\"true\"][/column]\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','','','2014-06-30 18:45:00','2014-06-30 18:45:00','',329,'http://sandbox.arrayfire.com/329-revision-v1/',0,'revision','',0),(6054,11,'2014-07-09 19:08:05','2014-07-09 19:08:05','At ArrayFire, we constantly encounter projects that require OpenGL and run on a remote server that does not have a display.\r\nIn this blog, we have compiled a list of steps that users can use to run full profile OpenGL applications over SSH on remote systems without a display.\r\n\r\nA few notes before we get started.\r\n<ul>\r\n        <li>This blog is limited to computers running distributions of Linux.\r\n	<li>The first part of the blog that shows the configuration of the xorg.conf file is limited to NVIDIA cards (with display).</li>\r\n	<li>AMD cards support this capability without the modification of xorg.conf file. However, we have not been able to get a comprehensive list of supported devices.</li>\r\n</ul>\r\n\r\n<h4>Requirements</h4>\r\nYou will need access to the remote system over SSH.\r\nTo run the tool, you will need <code>libGL.so<code> and </code>libX11.so</code>. Another tool I would recommend strongly is glewinfo. Most linux distributions ship this with the glew-utils package. An alternate to glewinfo is glxinfo which is present on all systems with X. You can substitute glewinfo with glxinfo in all the commands below if needed.\r\n\r\n<h4 id=\"ConfigX\">Configuring X (NVIDIA Only)</h4>\r\nTo get X to running on NVIDIA cards, we need to make changes to the xorg.conf file. Before making the change, make sure you create a back up of the current version on your system (name it xorg.conf.stable).\r\nYou can find a sample xorg.conf file <a href=\"https://github.com/arrayfire/glContext/blob/master/xorg.conf\" title=\"xorg.conf\" target=\"_blank\">here</a>. The sample file is for a NVIDIA GTX 690. The specific things to notice are the use of \"UseDisplayDevice\" option under \"Screen\" and the \"Virtual\" option under \"SubSection Display\". You can use parts of this file to configure your own config file. Make sure the options listed in the sample file get listed in your config file as well.\r\nSave and close the file.\r\n\r\nNow run this command: <code># nvidia-xconfig -a --use-display-device=None --virtual=1280x1024</code>\r\nRestart the system.\r\n\r\n<strong>Note:</strong> To abort trying this, just copy xorg.conf.stable back to xorg.conf and restart.\r\n\r\nThe following is only for GeForce cards. Quadro and Tesla cards can skip to <a href=\"#InitDiag\">Initial Diagnosis</a> section.\r\n\r\nOn restart, run the command <code># /usr/bin/X :0 &</code>. Ideally, this command should give an output similar to:\r\n<pre>\r\nX.Org X Server 1.13.0\r\nRelease Date: 2012-09-05\r\nX Protocol Version 11, Revision 0\r\n\r\n<Some more output here>\r\n\r\nLoading extension GLX\r\nLoading extension NV-GLX\r\nLoading extension NV-CONTROL\r\n</pre>\r\n\r\nThis means X has started successfully on the virtual display.\r\nIf it fails, restart the system and try again. You can also look at /var/log/Xorg.0.log for the log of the failure.\r\n\r\n<h5>Update: Known issue with Starting X</h5>\r\nIf the output is not similar to the one shown above, run the <a href=\"#InitDiag\">Initial Diagnosis</a> section below. If the output shows an error as follows:\r\n<pre>\r\n$ env DISPLAY=:0 glewinfo\r\nX Error of failed request:  BadWindow (invalid Window parameter)\r\n  Major opcode of failed request:  137 (NV-GLX)\r\n  Minor opcode of failed request:  4 ()\r\n  Resource id in failed request:  0x200004\r\n  Serial number of failed request:  39\r\n  Current serial number in output stream:  39\r\n</pre>\r\nrun the following commands:\r\n<pre>\r\nsudo mv /usr/lib/xorg/modules/extensions/libglx.so /usr/lib/xorg/modules/extensions/libglx.so.orig\r\nsudo ln -s /usr/lib/xorg/modules/extensions/libglx.so.XXX.YY /usr/lib/xorg/modules/extensions/libglx.so\r\n</pre>\r\nWhere XXX.YY is the NVIDIA driver version.\r\n\r\nNow try starting X again.\r\n\r\n<h4 id=\"InitDiag\">Initial Diagnosis</h4>\r\nOnce X has started successfully, run <code>echo $DISPLAY</code>. It is very likely that the output of this will be empty.\r\nIf you have glewinfo installed, run the following command <code>env DISPLAY=:0 glewinfo | less</code>.\r\nThe goal of this command is to run glewinfo having temporarily set DISPLAY to :0 (virtual display on remote system). If this command runs successfully, you should be able to see the graphics card on the remote system along with the full OpenGL profile. And now you are ready to deploy applications using X.\r\n\r\nIf you want to set DISPLAY for the entire session, run <code>export DISPLAY=:0</code>. To set DISPLAY permanently, add the same line to your bashrc file.\r\n\r\n<h4 id=\"Deploy\">Deploying Off-Screen Rendering Applications on Remote System</h4>\r\nThis is where X becomes crucial. Tools like GLFW may or may not work on remote systems because of their dependence on Xrandr and other software. The trick is use X to create an OpenGL context, and the run everything using off-screen rendering using framebuffers and renderbuffers. I took the source to create an OpenGL context using X from <a href=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" title=\"OpenGL Context Creation Page\" target=\"_blank\"></a> and modified it slighly. Thanks to the folks at OpenGL.org for providing this. The source code with the changes I made can be found here: <a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.hpp\" target=\"_blank\">glContext.hpp</a>.\r\n\r\nInclude this in your source code. To create context and delete contexts run createGLContext() and deleteGLContext() respectively.\r\n\r\nI have specified that the minimum OpenGL version should be 4.4 with forward context enabled. You can modify this version by changing the values at lines 26 and 27 of glContext.hpp.\r\nThe forward compatibility can be disabled at line 241 by changing line 241 to None.\r\nIf the application fails to create the specified version of the context, the application will exit.\r\n\r\nAt line 189, we create the window. The API description can be found <a href=\"http://tronche.com/gui/x/xlib/window/XCreateWindow.html\" title=\"link\" target=\"_blank\">here</a>. \"0, 0, 10, 10\" specifies the top-left corner (0,0) and the width and height of the window (10, 10). Since the goal of this is to be used for off-screen rendering, the size of the window has no effect on the rendering.\r\nLine 202 specifies the window title.\r\n\r\nIf everything goes successfully, you should see an output like this:\r\n<pre>\r\nglContext.hpp:297: GL Version  = 4.4.0 NVIDIA 331.79\r\nglContext.hpp:298: GL Vendor   = NVIDIA Corporation\r\nglContext.hpp:299: GL Renderer = GeForce GTX 690/PCIe/SSE2\r\nglContext.hpp:300: GL Shader   = 4.40 NVIDIA via Cg compiler\r\n</pre>\r\n\r\nIf you wish to use a lower minimum version, say 3.0, then the version provided by the output will reflect 3.0 since GL fetches version from the context.\r\n\r\nTo test the context creation as a stand alone, create a cpp file with the following contents (<a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.cpp\" title=\"glContext.cpp\" target=\"_blank\">glContext.cpp</a>):\r\n<pre>\r\n#include \"glContext.hpp\"\r\n\r\nint main(int argc, char* argv[])\r\n{\r\n    createGLContext();\r\n    deleteGLContext();\r\n    return 0;\r\n}\r\n</pre>\r\n\r\nCompile this with <code>g++ -o gl glContext.cpp -lGL -lX11</code> and run with <code>./gl</code> (make sure DISPLAY is :0). If this works successfully, any off-screen rendering code will work perfectly with this.\r\n<strong>Note:</strong> If you use GLEW, make sure you include glew.h before including gl.h.\r\n\r\nIf you wish to know about remote OpenGL further or work with us on remote rendering, contact us at <a href=\"mailto:technical@arrayfire.com\" >technical@arrayfire.com</a>.\r\n\r\nLinks:\r\n<a href=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" title=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" target=\"_blank\">OpenGL Context Creation Tutorial</a>\r\n<a href=\"https://github.com/arrayfire/glContext\" title=\"https://github.com/arrayfire/glContext\" target=\"_blank\">ArrayFire glContext repo on Github</a>','Remote Off-Screen Rendering with OpenGL','','publish','open','open','','remote-off-screen-rendering-with-opengl','','','2015-11-02 18:45:59','2015-11-02 18:45:59','',0,'http://sandbox.arrayfire.com/?p=6054',0,'post','',18),(6055,11,'2014-07-02 17:48:11','2014-07-02 17:48:11','At ArrayFire, we constantly encounter projects that require OpenGL and run on a remote server that does not have a display.\r\nIn this blog, we have compiled a list of steps that users can use to run OpenGL full profile applications over SSH on remote systems without a display.\r\n\r\nA few notes before we get started.\r\n<ul>\r\n	<li>The first part of the blog that shows the configuration of the xorg.conf file it limited to NVIDIA Quadro and Tesla cards (with display).</li>\r\n	<li>NVIDIA GeForce cards do not support this functionality.</li>\r\n	<li>AMD cards support this capability without the modification of xorg.conf file.</li>\r\n</ul>','OpenGL 4.4 over SSH','','inherit','open','open','','6054-revision-v1','','','2014-07-02 17:48:11','2014-07-02 17:48:11','',6054,'http://sandbox.arrayfire.com/6054-revision-v1/',0,'revision','',0),(6056,11,'2014-07-02 17:54:27','2014-07-02 17:54:27','At ArrayFire, we constantly encounter projects that require OpenGL and run on a remote server that does not have a display.\r\nIn this blog, we have compiled a list of steps that users can use to run OpenGL full profile applications over SSH on remote systems without a display.\r\n\r\nA few notes before we get started.\r\n<ul>\r\n	<li>The first part of the blog that shows the configuration of the xorg.conf file it limited to NVIDIA Quadro and Tesla cards (with display).</li>\r\n	<li>NVIDIA GeForce cards do not support this functionality.</li>\r\n	<li>AMD cards support this capability without the modification of xorg.conf file.</li>\r\n	<li>For now, we will show the working of this on Linux.</li>\r\n</ul>\r\n\r\nRequirements:\r\nTo run the tool, you will need libGL.so, libX11.so, and libGLEW.so (to us glGetString). Another tool I would recommend strongly is glewinfo. Most linux distributions ship this with the glew-utils package.','OpenGL 4.4 over SSH','','inherit','open','open','','6054-revision-v1','','','2014-07-02 17:54:27','2014-07-02 17:54:27','',6054,'http://sandbox.arrayfire.com/6054-revision-v1/',0,'revision','',0),(6057,11,'2014-07-02 17:59:08','2014-07-02 17:59:08','At ArrayFire, we constantly encounter projects that require OpenGL and run on a remote server that does not have a display.\r\nIn this blog, we have compiled a list of steps that users can use to run OpenGL full profile applications over SSH on remote systems without a display.\r\n\r\nA few notes before we get started.\r\n<ul>\r\n	<li>The first part of the blog that shows the configuration of the xorg.conf file it limited to NVIDIA Quadro and Tesla cards (with display).</li>\r\n	<li>NVIDIA GeForce cards do not support this functionality.</li>\r\n	<li>AMD cards support this capability without the modification of xorg.conf file.</li>\r\n	<li>For now, we will show the working of this on Linux.</li>\r\n</ul>\r\n\r\nRequirements:\r\nTo run the tool, you will need libGL.so, libX11.so, and libGLEW.so (to us glGetString). Another tool I would recommend strongly is glewinfo. Most linux distributions ship this with the glew-utils package.\r\n\r\nPart 1: Setting up X (NVIDIA Only)\r\nTo get X to run on NVIDIA cards, we need to make a small change to the xorg.conf file. Before making the change, make sure you create a back up of the current version on your system.\r\nOpen xorg.conf (located in /etc/X11/xorg.conf). Look for \"Section Device\". You NVIDIA card should be listed here. Add this line before the end of the section: <code>Option         \"UseDisplayDevice\" \"none\"</code>. If you have more than one NVIDIA card listed, add this line to all the cards. Save and close the file and restart the system.\r\n\r\nPart 2: Login and Initial Diagnosis\r\n','OpenGL 4.4 over SSH','','inherit','open','open','','6054-revision-v1','','','2014-07-02 17:59:08','2014-07-02 17:59:08','',6054,'http://sandbox.arrayfire.com/6054-revision-v1/',0,'revision','',0),(6058,11,'2014-07-02 18:50:50','2014-07-02 18:50:50','At ArrayFire, we constantly encounter projects that require OpenGL and run on a remote server that does not have a display.\r\nIn this blog, we have compiled a list of steps that users can use to run OpenGL full profile applications over SSH on remote systems without a display.\r\n\r\nA few notes before we get started.\r\n<ul>\r\n	<li>The first part of the blog that shows the configuration of the xorg.conf file it limited to NVIDIA Quadro and Tesla cards (with display).</li>\r\n	<li>NVIDIA GeForce cards do not support this functionality.</li>\r\n	<li>AMD cards support this capability without the modification of xorg.conf file.</li>\r\n	<li>For now, we will show the working of this on Linux.</li>\r\n</ul>\r\n\r\nRequirements:\r\nTo run the tool, you will need libGL.so, libX11.so. Another tool I would recommend strongly is glewinfo. Most linux distributions ship this with the glew-utils package.\r\n\r\nPart 1: Setting up X (NVIDIA Only)\r\nTo get X to run on NVIDIA cards, we need to make a small change to the xorg.conf file. Before making the change, make sure you create a back up of the current version on your system.\r\nOpen xorg.conf (located in /etc/X11/xorg.conf). Look for \"Section Device\". You NVIDIA card should be listed here. Add this line before the end of the section: <code>Option         \"UseDisplayDevice\" \"none\"</code>. If you have more than one NVIDIA card listed, add this line to all the cards. Save and close the file and restart the system.\r\n\r\nPart 2: Login and Initial Diagnosis\r\nLogin to the remote system using the -X flag. That is, <code>ssh -X user@remote</code>.\r\nOnce logged in, run <code>echo $DISPLAY</code>. It is very likely that the output of this will be <strong>localhost:10.0</strong>. This specifies the display device is the client computer. If you have glewinfo installed, run it using <code>glewinfo | less</code>. You should see the graphics card from you local machine listed there, and perhaps OpenGL 2.x.\r\n\r\nIf you have glewinfo installed, run the following command:\r\n<code>env DISPLAY=:0 glewinfo | less</code>.\r\nThe goal of this command is to run glewinfo having temporarily set DISPLAY to :0 (remote system). If this command run\'s successfully, you should be able to see the graphics card on the remote system along with the full OpenGL profile. And now you are ready to deploy applications using X.\r\nIf you want to set DISPLAY for the entire session, run <code>export DISPLAY=:0</code>\r\n\r\nPart 3: Deploying Off-Screen Rendering Applications on Remote System\r\nThis is where X becomes crucial. Tools like GLFW may or may not work on remote systems because of dependence on Xrandr and other software. The trick is use X to create an OpenGL context, and the run everything using off-screen rendering using framebuffers and renderbuffers. I took the source to create an OpenGL context using X from <a href=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" title=\"OpenGL Context Creation Page\" target=\"_blank\"></a> and modified it slighly. Thanks to the folks at OpenGL.org for providing this. The source code with the changes I made can be found here: <a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.hpp\" target=\"_blank\"></a>.\r\n\r\nInclude this in your source code. To create context run createGLContext() and to delete the context run deleteGLContext().\r\n\r\nI have specified that the minimum OpenGL version should be 4.4 with forward context enabled. You can modify this version by changing the values at lines 26 and 27.\r\nThe forward compatibility can be disabled at line 241 by changing line 241 to None.\r\nIf the application fails to create the specified version of the context, the application will exit.\r\n\r\nAt line 189, we create the window. The API description can be found <a href=\"http://tronche.com/gui/x/xlib/window/XCreateWindow.html\" title=\"link\" target=\"_blank\"></a>. \"0, 0, 10, 10\" specifies the top-left corner (0,0) and the width and height of the window (10, 10). Since the goal of this is to be used for off-screen rendering, the size of the window has no effect on the rendering.\r\nLine 202 specifies the window title.\r\n\r\nIf everything goes successfully, you should see an output like this: \r\nglContext.hpp:307: GL Version  = 4.4.0 NVIDIA 331.75\r\nglContext.hpp:308: GL Vendor   = NVIDIA Corporation\r\nglContext.hpp:309: GL Renderer = Quadro K5000/PCIe/SSE2\r\nglContext.hpp:310: GL Shader   = 4.40 NVIDIA via Cg compiler\r\n\r\nIf you wish to use a lower minimum version, say 3.0, then the version provided by the output will reflect 3.0 since GL fetches version from the context.\r\n\r\nTo test the context creation as a stand alone, create a cpp file with the following contents (glContext.cpp):\r\n<code>\r\n#include \"glContext.hpp\"\r\n\r\nint main(int argc, char* argv[])\r\n{\r\n    createGLContext();\r\n    deleteGLContext();\r\n    return 0;\r\n}\r\n</code>\r\n\r\nCompile this with <strong>g++ -o gl glContext.cpp -lGL -lX11</strong> and run with <strong>./gl</strong> (make sure DISPLAY is :0). If this works successfully, any off-screen rendering code will work perfectly with this.\r\n\r\nNote: If you use GLEW, make sure you include glew.h before including gl.h. Simple way to do this is to add #include <GL/glew.h> before #include <GL/gl.h> in the header.','OpenGL 4.4 over SSH','','inherit','open','open','','6054-revision-v1','','','2014-07-02 18:50:50','2014-07-02 18:50:50','',6054,'http://sandbox.arrayfire.com/6054-revision-v1/',0,'revision','',0),(6059,11,'2014-07-02 18:52:20','2014-07-02 18:52:20','At ArrayFire, we constantly encounter projects that require OpenGL and run on a remote server that does not have a display.\r\nIn this blog, we have compiled a list of steps that users can use to run OpenGL full profile applications over SSH on remote systems without a display.\r\n\r\nA few notes before we get started.\r\n<ul>\r\n	<li>The first part of the blog that shows the configuration of the xorg.conf file it limited to NVIDIA Quadro and Tesla cards (with display).</li>\r\n	<li>NVIDIA GeForce cards do not support this functionality.</li>\r\n	<li>AMD cards support this capability without the modification of xorg.conf file.</li>\r\n	<li>For now, we will show the working of this on Linux.</li>\r\n</ul>\r\n\r\n<strong>Requirements</strong>:\r\nTo run the tool, you will need libGL.so, libX11.so. Another tool I would recommend strongly is glewinfo. Most linux distributions ship this with the glew-utils package. An alternate to glewinfo is glxinfo which is present on all systems with X. You can substitute glewinfo with glxinfo in all the commands below if needed.\r\n\r\n<strong>Part 1: Setting up X (NVIDIA Only)</strong>\r\nTo get X to run on NVIDIA cards, we need to make a small change to the xorg.conf file. Before making the change, make sure you create a back up of the current version on your system.\r\nOpen xorg.conf (located in /etc/X11/xorg.conf). Look for \"Section Device\". You NVIDIA card should be listed here. Add this line before the end of the section: <code>Option         \"UseDisplayDevice\" \"none\"</code>. If you have more than one NVIDIA card listed, add this line to all the cards. Save and close the file and restart the system.\r\n\r\n<strong>Part 2: Login and Initial Diagnosis</strong>\r\nLogin to the remote system using the -X flag. That is, <code>ssh -X user@remote</code>.\r\nOnce logged in, run <code>echo $DISPLAY</code>. It is very likely that the output of this will be <strong>localhost:10.0</strong>. This specifies the display device is the client computer. If you have glewinfo installed, run it using <code>glewinfo | less</code>. You should see the graphics card from you local machine listed there, and perhaps OpenGL 2.x.\r\n\r\nIf you have glewinfo installed, run the following command:\r\n<code>env DISPLAY=:0 glewinfo | less</code>.\r\nThe goal of this command is to run glewinfo having temporarily set DISPLAY to :0 (remote system). If this command run\'s successfully, you should be able to see the graphics card on the remote system along with the full OpenGL profile. And now you are ready to deploy applications using X.\r\nIf you want to set DISPLAY for the entire session, run <code>export DISPLAY=:0</code>\r\n\r\n<strong>Part 3: Deploying Off-Screen Rendering Applications on Remote System</strong>\r\nThis is where X becomes crucial. Tools like GLFW may or may not work on remote systems because of dependence on Xrandr and other software. The trick is use X to create an OpenGL context, and the run everything using off-screen rendering using framebuffers and renderbuffers. I took the source to create an OpenGL context using X from <a href=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" title=\"OpenGL Context Creation Page\" target=\"_blank\"></a> and modified it slighly. Thanks to the folks at OpenGL.org for providing this. The source code with the changes I made can be found here: <a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.hpp\" target=\"_blank\"></a>.\r\n\r\nInclude this in your source code. To create context run createGLContext() and to delete the context run deleteGLContext().\r\n\r\nI have specified that the minimum OpenGL version should be 4.4 with forward context enabled. You can modify this version by changing the values at lines 26 and 27.\r\nThe forward compatibility can be disabled at line 241 by changing line 241 to None.\r\nIf the application fails to create the specified version of the context, the application will exit.\r\n\r\nAt line 189, we create the window. The API description can be found <a href=\"http://tronche.com/gui/x/xlib/window/XCreateWindow.html\" title=\"link\" target=\"_blank\"></a>. \"0, 0, 10, 10\" specifies the top-left corner (0,0) and the width and height of the window (10, 10). Since the goal of this is to be used for off-screen rendering, the size of the window has no effect on the rendering.\r\nLine 202 specifies the window title.\r\n\r\nIf everything goes successfully, you should see an output like this: \r\nglContext.hpp:307: GL Version  = 4.4.0 NVIDIA 331.75\r\nglContext.hpp:308: GL Vendor   = NVIDIA Corporation\r\nglContext.hpp:309: GL Renderer = Quadro K5000/PCIe/SSE2\r\nglContext.hpp:310: GL Shader   = 4.40 NVIDIA via Cg compiler\r\n\r\nIf you wish to use a lower minimum version, say 3.0, then the version provided by the output will reflect 3.0 since GL fetches version from the context.\r\n\r\nTo test the context creation as a stand alone, create a cpp file with the following contents (glContext.cpp):\r\n<code>\r\n#include \"glContext.hpp\"\r\n\r\nint main(int argc, char* argv[])\r\n{\r\n    createGLContext();\r\n    deleteGLContext();\r\n    return 0;\r\n}\r\n</code>\r\n\r\nCompile this with <strong>g++ -o gl glContext.cpp -lGL -lX11</strong> and run with <strong>./gl</strong> (make sure DISPLAY is :0). If this works successfully, any off-screen rendering code will work perfectly with this.\r\n\r\n<strong>Note:</strong> If you use GLEW, make sure you include glew.h before including gl.h. Simple way to do this is to add #include <GL/glew.h> before #include <GL/gl.h> in the header.','OpenGL 4.4 over SSH','','inherit','open','open','','6054-revision-v1','','','2014-07-02 18:52:20','2014-07-02 18:52:20','',6054,'http://sandbox.arrayfire.com/6054-revision-v1/',0,'revision','',0),(6060,11,'2014-07-02 18:53:28','2014-07-02 18:53:28','At ArrayFire, we constantly encounter projects that require OpenGL and run on a remote server that does not have a display.\r\nIn this blog, we have compiled a list of steps that users can use to run OpenGL full profile applications over SSH on remote systems without a display.\r\n\r\nA few notes before we get started.\r\n<ul>\r\n	<li>The first part of the blog that shows the configuration of the xorg.conf file it limited to NVIDIA Quadro and Tesla cards (with display).</li>\r\n	<li>NVIDIA GeForce cards do not support this functionality.</li>\r\n	<li>AMD cards support this capability without the modification of xorg.conf file.</li>\r\n	<li>For now, we will show the working of this on Linux.</li>\r\n</ul>\r\n\r\n<strong>Requirements</strong>:\r\nTo run the tool, you will need libGL.so, libX11.so. Another tool I would recommend strongly is glewinfo. Most linux distributions ship this with the glew-utils package. An alternate to glewinfo is glxinfo which is present on all systems with X. You can substitute glewinfo with glxinfo in all the commands below if needed.\r\n\r\n<strong>Part 1: Setting up X (NVIDIA Only)</strong>\r\nTo get X to run on NVIDIA cards, we need to make a small change to the xorg.conf file. Before making the change, make sure you create a back up of the current version on your system.\r\nOpen xorg.conf (located in /etc/X11/xorg.conf). Look for \"Section Device\". You NVIDIA card should be listed here. Add this line before the end of the section: <code>Option         \"UseDisplayDevice\" \"none\"</code>. If you have more than one NVIDIA card listed, add this line to all the cards. Save and close the file and restart the system.\r\n\r\n<strong>Part 2: Login and Initial Diagnosis</strong>\r\nLogin to the remote system using the -X flag. That is, <code>ssh -X user@remote</code>.\r\nOnce logged in, run <code>echo $DISPLAY</code>. It is very likely that the output of this will be <strong>localhost:10.0</strong>. This specifies the display device is the client computer. If you have glewinfo installed, run it using <code>glewinfo | less</code>. You should see the graphics card from you local machine listed there, and perhaps OpenGL 2.x.\r\n\r\nIf you have glewinfo installed, run the following command:\r\n<code>env DISPLAY=:0 glewinfo | less</code>.\r\nThe goal of this command is to run glewinfo having temporarily set DISPLAY to :0 (remote system). If this command run\'s successfully, you should be able to see the graphics card on the remote system along with the full OpenGL profile. And now you are ready to deploy applications using X.\r\nIf you want to set DISPLAY for the entire session, run <code>export DISPLAY=:0</code>\r\n\r\n<strong>Part 3: Deploying Off-Screen Rendering Applications on Remote System</strong>\r\nThis is where X becomes crucial. Tools like GLFW may or may not work on remote systems because of dependence on Xrandr and other software. The trick is use X to create an OpenGL context, and the run everything using off-screen rendering using framebuffers and renderbuffers. I took the source to create an OpenGL context using X from <a href=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" title=\"OpenGL Context Creation Page\" target=\"_blank\"></a> and modified it slighly. Thanks to the folks at OpenGL.org for providing this. The source code with the changes I made can be found here: <a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.hpp\" target=\"_blank\">ArrayFire Github glContext.hpp</a>.\r\n\r\nInclude this in your source code. To create context run createGLContext() and to delete the context run deleteGLContext().\r\n\r\nI have specified that the minimum OpenGL version should be 4.4 with forward context enabled. You can modify this version by changing the values at lines 26 and 27.\r\nThe forward compatibility can be disabled at line 241 by changing line 241 to None.\r\nIf the application fails to create the specified version of the context, the application will exit.\r\n\r\nAt line 189, we create the window. The API description can be found <a href=\"http://tronche.com/gui/x/xlib/window/XCreateWindow.html\" title=\"link\" target=\"_blank\"></a>. \"0, 0, 10, 10\" specifies the top-left corner (0,0) and the width and height of the window (10, 10). Since the goal of this is to be used for off-screen rendering, the size of the window has no effect on the rendering.\r\nLine 202 specifies the window title.\r\n\r\nIf everything goes successfully, you should see an output like this: \r\nglContext.hpp:307: GL Version  = 4.4.0 NVIDIA 331.75\r\nglContext.hpp:308: GL Vendor   = NVIDIA Corporation\r\nglContext.hpp:309: GL Renderer = Quadro K5000/PCIe/SSE2\r\nglContext.hpp:310: GL Shader   = 4.40 NVIDIA via Cg compiler\r\n\r\nIf you wish to use a lower minimum version, say 3.0, then the version provided by the output will reflect 3.0 since GL fetches version from the context.\r\n\r\nTo test the context creation as a stand alone, create a cpp file with the following contents (glContext.cpp):\r\n<code>\r\n#include \"glContext.hpp\"\r\n\r\nint main(int argc, char* argv[])\r\n{\r\n    createGLContext();\r\n    deleteGLContext();\r\n    return 0;\r\n}\r\n</code>\r\n\r\nCompile this with <strong>g++ -o gl glContext.cpp -lGL -lX11</strong> and run with <strong>./gl</strong> (make sure DISPLAY is :0). If this works successfully, any off-screen rendering code will work perfectly with this.\r\n\r\n<strong>Note:</strong> If you use GLEW, make sure you include glew.h before including gl.h. Simple way to do this is to add #include <GL/glew.h> before #include <GL/gl.h> in the header.','OpenGL 4.4 over SSH','','inherit','open','open','','6054-revision-v1','','','2014-07-02 18:53:28','2014-07-02 18:53:28','',6054,'http://sandbox.arrayfire.com/6054-revision-v1/',0,'revision','',0),(6061,11,'2014-07-02 18:54:47','2014-07-02 18:54:47','At ArrayFire, we constantly encounter projects that require OpenGL and run on a remote server that does not have a display.\r\nIn this blog, we have compiled a list of steps that users can use to run OpenGL full profile applications over SSH on remote systems without a display.\r\n\r\nA few notes before we get started.\r\n<ul>\r\n	<li>The first part of the blog that shows the configuration of the xorg.conf file it limited to NVIDIA Quadro and Tesla cards (with display).</li>\r\n	<li>NVIDIA GeForce cards do not support this functionality.</li>\r\n	<li>AMD cards support this capability without the modification of xorg.conf file.</li>\r\n	<li>For now, we will show the working of this on Linux.</li>\r\n</ul>\r\n\r\n<strong>Requirements</strong>:\r\nTo run the tool, you will need libGL.so, libX11.so. Another tool I would recommend strongly is glewinfo. Most linux distributions ship this with the glew-utils package. An alternate to glewinfo is glxinfo which is present on all systems with X. You can substitute glewinfo with glxinfo in all the commands below if needed.\r\n\r\n<strong>Part 1: Setting up X (NVIDIA Only)</strong>\r\nTo get X to run on NVIDIA cards, we need to make a small change to the xorg.conf file. Before making the change, make sure you create a back up of the current version on your system.\r\nOpen xorg.conf (located in /etc/X11/xorg.conf). Look for \"Section Device\". You NVIDIA card should be listed here. Add this line before the end of the section: <code>Option         \"UseDisplayDevice\" \"none\"</code>. If you have more than one NVIDIA card listed, add this line to all the cards. Save and close the file and restart the system.\r\n\r\n<strong>Part 2: Login and Initial Diagnosis</strong>\r\nLogin to the remote system using the -X flag. That is, <code>ssh -X user@remote</code>.\r\nOnce logged in, run <code>echo $DISPLAY</code>. It is very likely that the output of this will be <strong>localhost:10.0</strong>. This specifies the display device is the client computer. If you have glewinfo installed, run it using <code>glewinfo | less</code>. You should see the graphics card from you local machine listed there, and perhaps OpenGL 2.x.\r\n\r\nIf you have glewinfo installed, run the following command:\r\n<code>env DISPLAY=:0 glewinfo | less</code>.\r\nThe goal of this command is to run glewinfo having temporarily set DISPLAY to :0 (remote system). If this command run\'s successfully, you should be able to see the graphics card on the remote system along with the full OpenGL profile. And now you are ready to deploy applications using X.\r\nIf you want to set DISPLAY for the entire session, run <code>export DISPLAY=:0</code>\r\n\r\n<strong>Part 3: Deploying Off-Screen Rendering Applications on Remote System</strong>\r\nThis is where X becomes crucial. Tools like GLFW may or may not work on remote systems because of dependence on Xrandr and other software. The trick is use X to create an OpenGL context, and the run everything using off-screen rendering using framebuffers and renderbuffers. I took the source to create an OpenGL context using X from <a href=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" title=\"OpenGL Context Creation Page\" target=\"_blank\"></a> and modified it slighly. Thanks to the folks at OpenGL.org for providing this. The source code with the changes I made can be found here: <a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.hpp\" target=\"_blank\">glContext.hpp</a>.\r\n\r\nInclude this in your source code. To create context run createGLContext() and to delete the context run deleteGLContext().\r\n\r\nI have specified that the minimum OpenGL version should be 4.4 with forward context enabled. You can modify this version by changing the values at lines 26 and 27.\r\nThe forward compatibility can be disabled at line 241 by changing line 241 to None.\r\nIf the application fails to create the specified version of the context, the application will exit.\r\n\r\nAt line 189, we create the window. The API description can be found <a href=\"http://tronche.com/gui/x/xlib/window/XCreateWindow.html\" title=\"link\" target=\"_blank\"></a>. \"0, 0, 10, 10\" specifies the top-left corner (0,0) and the width and height of the window (10, 10). Since the goal of this is to be used for off-screen rendering, the size of the window has no effect on the rendering.\r\nLine 202 specifies the window title.\r\n\r\nIf everything goes successfully, you should see an output like this: \r\nglContext.hpp:307: GL Version  = 4.4.0 NVIDIA 331.75\r\nglContext.hpp:308: GL Vendor   = NVIDIA Corporation\r\nglContext.hpp:309: GL Renderer = Quadro K5000/PCIe/SSE2\r\nglContext.hpp:310: GL Shader   = 4.40 NVIDIA via Cg compiler\r\n\r\nIf you wish to use a lower minimum version, say 3.0, then the version provided by the output will reflect 3.0 since GL fetches version from the context.\r\n\r\nTo test the context creation as a stand alone, create a cpp file with the following contents (<a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.cpp\" title=\"glContext.cpp\" target=\"_blank\"></a>):\r\n<code>\r\n#include \"glContext.hpp\"\r\n\r\nint main(int argc, char* argv[])\r\n{\r\n    createGLContext();\r\n    deleteGLContext();\r\n    return 0;\r\n}\r\n</code>\r\n\r\nCompile this with <strong>g++ -o gl glContext.cpp -lGL -lX11</strong> and run with <strong>./gl</strong> (make sure DISPLAY is :0). If this works successfully, any off-screen rendering code will work perfectly with this.\r\n\r\n<strong>Note:</strong> If you use GLEW, make sure you include glew.h before including gl.h. Simple way to do this is to add #include <GL/glew.h> before #include <GL/gl.h> in the header.','OpenGL 4.4 over SSH','','inherit','open','open','','6054-revision-v1','','','2014-07-02 18:54:47','2014-07-02 18:54:47','',6054,'http://sandbox.arrayfire.com/6054-revision-v1/',0,'revision','',0),(6062,11,'2014-07-02 18:55:54','2014-07-02 18:55:54','At ArrayFire, we constantly encounter projects that require OpenGL and run on a remote server that does not have a display.\r\nIn this blog, we have compiled a list of steps that users can use to run OpenGL full profile applications over SSH on remote systems without a display.\r\n\r\nA few notes before we get started.\r\n<ul>\r\n	<li>The first part of the blog that shows the configuration of the xorg.conf file it limited to NVIDIA Quadro and Tesla cards (with display).</li>\r\n	<li>NVIDIA GeForce cards do not support this functionality.</li>\r\n	<li>AMD cards support this capability without the modification of xorg.conf file.</li>\r\n	<li>For now, we will show the working of this on Linux.</li>\r\n</ul>\r\n\r\n<strong>Requirements</strong>:\r\nTo run the tool, you will need libGL.so, libX11.so. Another tool I would recommend strongly is glewinfo. Most linux distributions ship this with the glew-utils package. An alternate to glewinfo is glxinfo which is present on all systems with X. You can substitute glewinfo with glxinfo in all the commands below if needed.\r\n\r\n<strong>Part 1: Setting up X (NVIDIA Only)</strong>\r\nTo get X to run on NVIDIA cards, we need to make a small change to the xorg.conf file. Before making the change, make sure you create a back up of the current version on your system.\r\nOpen xorg.conf (located in /etc/X11/xorg.conf). Look for \"Section Device\". You NVIDIA card should be listed here. Add this line before the end of the section: <code>Option         \"UseDisplayDevice\" \"none\"</code>. If you have more than one NVIDIA card listed, add this line to all the cards. Save and close the file and restart the system.\r\n\r\n<strong>Part 2: Login and Initial Diagnosis</strong>\r\nLogin to the remote system using the -X flag. That is, <code>ssh -X user@remote</code>.\r\nOnce logged in, run <code>echo $DISPLAY</code>. It is very likely that the output of this will be <strong>localhost:10.0</strong>. This specifies the display device is the client computer. If you have glewinfo installed, run it using <code>glewinfo | less</code>. You should see the graphics card from you local machine listed there, and perhaps OpenGL 2.x.\r\n\r\nIf you have glewinfo installed, run the following command:\r\n<code>env DISPLAY=:0 glewinfo | less</code>.\r\nThe goal of this command is to run glewinfo having temporarily set DISPLAY to :0 (remote system). If this command run\'s successfully, you should be able to see the graphics card on the remote system along with the full OpenGL profile. And now you are ready to deploy applications using X.\r\nIf you want to set DISPLAY for the entire session, run <code>export DISPLAY=:0</code>\r\n\r\n<strong>Part 3: Deploying Off-Screen Rendering Applications on Remote System</strong>\r\nThis is where X becomes crucial. Tools like GLFW may or may not work on remote systems because of dependence on Xrandr and other software. The trick is use X to create an OpenGL context, and the run everything using off-screen rendering using framebuffers and renderbuffers. I took the source to create an OpenGL context using X from <a href=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" title=\"OpenGL Context Creation Page\" target=\"_blank\"></a> and modified it slighly. Thanks to the folks at OpenGL.org for providing this. The source code with the changes I made can be found here: <a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.hpp\" target=\"_blank\">glContext.hpp</a>.\r\n\r\nInclude this in your source code. To create context run createGLContext() and to delete the context run deleteGLContext().\r\n\r\nI have specified that the minimum OpenGL version should be 4.4 with forward context enabled. You can modify this version by changing the values at lines 26 and 27.\r\nThe forward compatibility can be disabled at line 241 by changing line 241 to None.\r\nIf the application fails to create the specified version of the context, the application will exit.\r\n\r\nAt line 189, we create the window. The API description can be found <a href=\"http://tronche.com/gui/x/xlib/window/XCreateWindow.html\" title=\"link\" target=\"_blank\"></a>. \"0, 0, 10, 10\" specifies the top-left corner (0,0) and the width and height of the window (10, 10). Since the goal of this is to be used for off-screen rendering, the size of the window has no effect on the rendering.\r\nLine 202 specifies the window title.\r\n\r\nIf everything goes successfully, you should see an output like this:\r\n<code>\r\nglContext.hpp:307: GL Version  = 4.4.0 NVIDIA 331.75\r\nglContext.hpp:308: GL Vendor   = NVIDIA Corporation\r\nglContext.hpp:309: GL Renderer = Quadro K5000/PCIe/SSE2\r\nglContext.hpp:310: GL Shader   = 4.40 NVIDIA via Cg compiler\r\n</code>\r\n\r\nIf you wish to use a lower minimum version, say 3.0, then the version provided by the output will reflect 3.0 since GL fetches version from the context.\r\n\r\nTo test the context creation as a stand alone, create a cpp file with the following contents (<a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.cpp\" title=\"glContext.cpp\" target=\"_blank\"></a>):\r\n<code>\r\n#include \"glContext.hpp\"\r\n\r\nint main(int argc, char* argv[])\r\n{\r\n    createGLContext();\r\n    deleteGLContext();\r\n    return 0;\r\n}\r\n</code>\r\n\r\nCompile this with <strong>g++ -o gl glContext.cpp -lGL -lX11</strong> and run with <strong>./gl</strong> (make sure DISPLAY is :0). If this works successfully, any off-screen rendering code will work perfectly with this.\r\n\r\n<strong>Note:</strong> If you use GLEW, make sure you include glew.h before including gl.h. Simple way to do this is to add #include <GL/glew.h> before #include <GL/gl.h> in the header.','OpenGL 4.4 over SSH','','inherit','open','open','','6054-revision-v1','','','2014-07-02 18:55:54','2014-07-02 18:55:54','',6054,'http://sandbox.arrayfire.com/6054-revision-v1/',0,'revision','',0),(6063,11,'2014-07-02 18:56:35','2014-07-02 18:56:35','At ArrayFire, we constantly encounter projects that require OpenGL and run on a remote server that does not have a display.\r\nIn this blog, we have compiled a list of steps that users can use to run OpenGL full profile applications over SSH on remote systems without a display.\r\n\r\nA few notes before we get started.\r\n<ul>\r\n	<li>The first part of the blog that shows the configuration of the xorg.conf file it limited to NVIDIA Quadro and Tesla cards (with display).</li>\r\n	<li>NVIDIA GeForce cards do not support this functionality.</li>\r\n	<li>AMD cards support this capability without the modification of xorg.conf file.</li>\r\n	<li>For now, we will show the working of this on Linux.</li>\r\n</ul>\r\n\r\n<strong>Requirements</strong>:\r\nTo run the tool, you will need libGL.so, libX11.so. Another tool I would recommend strongly is glewinfo. Most linux distributions ship this with the glew-utils package. An alternate to glewinfo is glxinfo which is present on all systems with X. You can substitute glewinfo with glxinfo in all the commands below if needed.\r\n\r\n<strong>Part 1: Setting up X (NVIDIA Only)</strong>\r\nTo get X to run on NVIDIA cards, we need to make a small change to the xorg.conf file. Before making the change, make sure you create a back up of the current version on your system.\r\nOpen xorg.conf (located in /etc/X11/xorg.conf). Look for \"Section Device\". You NVIDIA card should be listed here. Add this line before the end of the section: <code>Option         \"UseDisplayDevice\" \"none\"</code>. If you have more than one NVIDIA card listed, add this line to all the cards. Save and close the file and restart the system.\r\n\r\n<strong>Part 2: Login and Initial Diagnosis</strong>\r\nLogin to the remote system using the -X flag. That is, <code>ssh -X user@remote</code>.\r\nOnce logged in, run <code>echo $DISPLAY</code>. It is very likely that the output of this will be <strong>localhost:10.0</strong>. This specifies the display device is the client computer. If you have glewinfo installed, run it using <code>glewinfo | less</code>. You should see the graphics card from you local machine listed there, and perhaps OpenGL 2.x.\r\n\r\nIf you have glewinfo installed, run the following command:\r\n<code>env DISPLAY=:0 glewinfo | less</code>.\r\nThe goal of this command is to run glewinfo having temporarily set DISPLAY to :0 (remote system). If this command run\'s successfully, you should be able to see the graphics card on the remote system along with the full OpenGL profile. And now you are ready to deploy applications using X.\r\nIf you want to set DISPLAY for the entire session, run <code>export DISPLAY=:0</code>\r\n\r\n<strong>Part 3: Deploying Off-Screen Rendering Applications on Remote System</strong>\r\nThis is where X becomes crucial. Tools like GLFW may or may not work on remote systems because of dependence on Xrandr and other software. The trick is use X to create an OpenGL context, and the run everything using off-screen rendering using framebuffers and renderbuffers. I took the source to create an OpenGL context using X from <a href=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" title=\"OpenGL Context Creation Page\" target=\"_blank\"></a> and modified it slighly. Thanks to the folks at OpenGL.org for providing this. The source code with the changes I made can be found here: <a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.hpp\" target=\"_blank\">glContext.hpp</a>.\r\n\r\nInclude this in your source code. To create context run createGLContext() and to delete the context run deleteGLContext().\r\n\r\nI have specified that the minimum OpenGL version should be 4.4 with forward context enabled. You can modify this version by changing the values at lines 26 and 27.\r\nThe forward compatibility can be disabled at line 241 by changing line 241 to None.\r\nIf the application fails to create the specified version of the context, the application will exit.\r\n\r\nAt line 189, we create the window. The API description can be found <a href=\"http://tronche.com/gui/x/xlib/window/XCreateWindow.html\" title=\"link\" target=\"_blank\"></a>. \"0, 0, 10, 10\" specifies the top-left corner (0,0) and the width and height of the window (10, 10). Since the goal of this is to be used for off-screen rendering, the size of the window has no effect on the rendering.\r\nLine 202 specifies the window title.\r\n\r\nIf everything goes successfully, you should see an output like this:\r\n<pre>\r\nglContext.hpp:307: GL Version  = 4.4.0 NVIDIA 331.75\r\nglContext.hpp:308: GL Vendor   = NVIDIA Corporation\r\nglContext.hpp:309: GL Renderer = Quadro K5000/PCIe/SSE2\r\nglContext.hpp:310: GL Shader   = 4.40 NVIDIA via Cg compiler\r\n</pre>\r\n\r\nIf you wish to use a lower minimum version, say 3.0, then the version provided by the output will reflect 3.0 since GL fetches version from the context.\r\n\r\nTo test the context creation as a stand alone, create a cpp file with the following contents (<a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.cpp\" title=\"glContext.cpp\" target=\"_blank\"></a>):\r\n<pre>\r\n#include \"glContext.hpp\"\r\n\r\nint main(int argc, char* argv[])\r\n{\r\n    createGLContext();\r\n    deleteGLContext();\r\n    return 0;\r\n}\r\n</pre>\r\n\r\nCompile this with <strong>g++ -o gl glContext.cpp -lGL -lX11</strong> and run with <strong>./gl</strong> (make sure DISPLAY is :0). If this works successfully, any off-screen rendering code will work perfectly with this.\r\n\r\n<strong>Note:</strong> If you use GLEW, make sure you include glew.h before including gl.h. Simple way to do this is to add #include <GL/glew.h> before #include <GL/gl.h> in the header.','OpenGL 4.4 over SSH','','inherit','open','open','','6054-revision-v1','','','2014-07-02 18:56:35','2014-07-02 18:56:35','',6054,'http://sandbox.arrayfire.com/6054-revision-v1/',0,'revision','',0),(6064,11,'2014-07-02 18:57:21','2014-07-02 18:57:21','At ArrayFire, we constantly encounter projects that require OpenGL and run on a remote server that does not have a display.\r\nIn this blog, we have compiled a list of steps that users can use to run OpenGL full profile applications over SSH on remote systems without a display.\r\n\r\nA few notes before we get started.\r\n<ul>\r\n	<li>The first part of the blog that shows the configuration of the xorg.conf file it limited to NVIDIA Quadro and Tesla cards (with display).</li>\r\n	<li>NVIDIA GeForce cards do not support this functionality.</li>\r\n	<li>AMD cards support this capability without the modification of xorg.conf file.</li>\r\n	<li>For now, we will show the working of this on Linux.</li>\r\n</ul>\r\n\r\n<strong>Requirements</strong>:\r\nTo run the tool, you will need libGL.so, libX11.so. Another tool I would recommend strongly is glewinfo. Most linux distributions ship this with the glew-utils package. An alternate to glewinfo is glxinfo which is present on all systems with X. You can substitute glewinfo with glxinfo in all the commands below if needed.\r\n\r\n<strong>Part 1: Setting up X (NVIDIA Only)</strong>\r\nTo get X to run on NVIDIA cards, we need to make a small change to the xorg.conf file. Before making the change, make sure you create a back up of the current version on your system.\r\nOpen xorg.conf (located in /etc/X11/xorg.conf). Look for \"Section Device\". You NVIDIA card should be listed here. Add this line before the end of the section: <code>Option         \"UseDisplayDevice\" \"none\"</code>. If you have more than one NVIDIA card listed, add this line to all the cards. Save and close the file and restart the system.\r\n\r\n<strong>Part 2: Login and Initial Diagnosis</strong>\r\nLogin to the remote system using the -X flag. That is, <code>ssh -X user@remote</code>.\r\nOnce logged in, run <code>echo $DISPLAY</code>. It is very likely that the output of this will be <strong>localhost:10.0</strong>. This specifies the display device is the client computer. If you have glewinfo installed, run it using <code>glewinfo | less</code>. You should see the graphics card from you local machine listed there, and perhaps OpenGL 2.x.\r\n\r\nIf you have glewinfo installed, run the following command:\r\n<code>env DISPLAY=:0 glewinfo | less</code>.\r\nThe goal of this command is to run glewinfo having temporarily set DISPLAY to :0 (remote system). If this command run\'s successfully, you should be able to see the graphics card on the remote system along with the full OpenGL profile. And now you are ready to deploy applications using X.\r\nIf you want to set DISPLAY for the entire session, run <code>export DISPLAY=:0</code>\r\n\r\n<strong>Part 3: Deploying Off-Screen Rendering Applications on Remote System</strong>\r\nThis is where X becomes crucial. Tools like GLFW may or may not work on remote systems because of dependence on Xrandr and other software. The trick is use X to create an OpenGL context, and the run everything using off-screen rendering using framebuffers and renderbuffers. I took the source to create an OpenGL context using X from <a href=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" title=\"OpenGL Context Creation Page\" target=\"_blank\"></a> and modified it slighly. Thanks to the folks at OpenGL.org for providing this. The source code with the changes I made can be found here: <a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.hpp\" target=\"_blank\">glContext.hpp</a>.\r\n\r\nInclude this in your source code. To create context run createGLContext() and to delete the context run deleteGLContext().\r\n\r\nI have specified that the minimum OpenGL version should be 4.4 with forward context enabled. You can modify this version by changing the values at lines 26 and 27.\r\nThe forward compatibility can be disabled at line 241 by changing line 241 to None.\r\nIf the application fails to create the specified version of the context, the application will exit.\r\n\r\nAt line 189, we create the window. The API description can be found <a href=\"http://tronche.com/gui/x/xlib/window/XCreateWindow.html\" title=\"link\" target=\"_blank\"></a>. \"0, 0, 10, 10\" specifies the top-left corner (0,0) and the width and height of the window (10, 10). Since the goal of this is to be used for off-screen rendering, the size of the window has no effect on the rendering.\r\nLine 202 specifies the window title.\r\n\r\nIf everything goes successfully, you should see an output like this:\r\n<pre>\r\nglContext.hpp:307: GL Version  = 4.4.0 NVIDIA 331.75\r\nglContext.hpp:308: GL Vendor   = NVIDIA Corporation\r\nglContext.hpp:309: GL Renderer = Quadro K5000/PCIe/SSE2\r\nglContext.hpp:310: GL Shader   = 4.40 NVIDIA via Cg compiler\r\n</pre>\r\n\r\nIf you wish to use a lower minimum version, say 3.0, then the version provided by the output will reflect 3.0 since GL fetches version from the context.\r\n\r\nTo test the context creation as a stand alone, create a cpp file with the following contents (<a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.cpp\" title=\"glContext.cpp\" target=\"_blank\"></a>):\r\n<pre>\r\n#include \"glContext.hpp\"\r\n\r\nint main(int argc, char* argv[])\r\n{\r\n    createGLContext();\r\n    deleteGLContext();\r\n    return 0;\r\n}\r\n</pre>\r\n\r\nCompile this with <strong>g++ -o gl glContext.cpp -lGL -lX11</strong> and run with <strong>./gl</strong> (make sure DISPLAY is :0). If this works successfully, any off-screen rendering code will work perfectly with this.\r\n\r\n<strong>Note:</strong> If you use GLEW, make sure you include glew.h before including gl.h. Simple way to do this is to add #include &gtGL/glew.h> before #include &gtGL/gl.h> in the header.','OpenGL 4.4 over SSH','','inherit','open','open','','6054-revision-v1','','','2014-07-02 18:57:21','2014-07-02 18:57:21','',6054,'http://sandbox.arrayfire.com/6054-revision-v1/',0,'revision','',0);
INSERT INTO `wp_posts` VALUES (6065,11,'2014-07-02 18:57:51','2014-07-02 18:57:51','At ArrayFire, we constantly encounter projects that require OpenGL and run on a remote server that does not have a display.\r\nIn this blog, we have compiled a list of steps that users can use to run OpenGL full profile applications over SSH on remote systems without a display.\r\n\r\nA few notes before we get started.\r\n<ul>\r\n	<li>The first part of the blog that shows the configuration of the xorg.conf file it limited to NVIDIA Quadro and Tesla cards (with display).</li>\r\n	<li>NVIDIA GeForce cards do not support this functionality.</li>\r\n	<li>AMD cards support this capability without the modification of xorg.conf file.</li>\r\n	<li>For now, we will show the working of this on Linux.</li>\r\n</ul>\r\n\r\n<strong>Requirements</strong>:\r\nTo run the tool, you will need libGL.so, libX11.so. Another tool I would recommend strongly is glewinfo. Most linux distributions ship this with the glew-utils package. An alternate to glewinfo is glxinfo which is present on all systems with X. You can substitute glewinfo with glxinfo in all the commands below if needed.\r\n\r\n<strong>Part 1: Setting up X (NVIDIA Only)</strong>\r\nTo get X to run on NVIDIA cards, we need to make a small change to the xorg.conf file. Before making the change, make sure you create a back up of the current version on your system.\r\nOpen xorg.conf (located in /etc/X11/xorg.conf). Look for \"Section Device\". You NVIDIA card should be listed here. Add this line before the end of the section: <code>Option         \"UseDisplayDevice\" \"none\"</code>. If you have more than one NVIDIA card listed, add this line to all the cards. Save and close the file and restart the system.\r\n\r\n<strong>Part 2: Login and Initial Diagnosis</strong>\r\nLogin to the remote system using the -X flag. That is, <code>ssh -X user@remote</code>.\r\nOnce logged in, run <code>echo $DISPLAY</code>. It is very likely that the output of this will be <strong>localhost:10.0</strong>. This specifies the display device is the client computer. If you have glewinfo installed, run it using <code>glewinfo | less</code>. You should see the graphics card from you local machine listed there, and perhaps OpenGL 2.x.\r\n\r\nIf you have glewinfo installed, run the following command:\r\n<code>env DISPLAY=:0 glewinfo | less</code>.\r\nThe goal of this command is to run glewinfo having temporarily set DISPLAY to :0 (remote system). If this command run\'s successfully, you should be able to see the graphics card on the remote system along with the full OpenGL profile. And now you are ready to deploy applications using X.\r\nIf you want to set DISPLAY for the entire session, run <code>export DISPLAY=:0</code>\r\n\r\n<strong>Part 3: Deploying Off-Screen Rendering Applications on Remote System</strong>\r\nThis is where X becomes crucial. Tools like GLFW may or may not work on remote systems because of dependence on Xrandr and other software. The trick is use X to create an OpenGL context, and the run everything using off-screen rendering using framebuffers and renderbuffers. I took the source to create an OpenGL context using X from <a href=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" title=\"OpenGL Context Creation Page\" target=\"_blank\"></a> and modified it slighly. Thanks to the folks at OpenGL.org for providing this. The source code with the changes I made can be found here: <a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.hpp\" target=\"_blank\">glContext.hpp</a>.\r\n\r\nInclude this in your source code. To create context run createGLContext() and to delete the context run deleteGLContext().\r\n\r\nI have specified that the minimum OpenGL version should be 4.4 with forward context enabled. You can modify this version by changing the values at lines 26 and 27.\r\nThe forward compatibility can be disabled at line 241 by changing line 241 to None.\r\nIf the application fails to create the specified version of the context, the application will exit.\r\n\r\nAt line 189, we create the window. The API description can be found <a href=\"http://tronche.com/gui/x/xlib/window/XCreateWindow.html\" title=\"link\" target=\"_blank\"></a>. \"0, 0, 10, 10\" specifies the top-left corner (0,0) and the width and height of the window (10, 10). Since the goal of this is to be used for off-screen rendering, the size of the window has no effect on the rendering.\r\nLine 202 specifies the window title.\r\n\r\nIf everything goes successfully, you should see an output like this:\r\n<pre>\r\nglContext.hpp:307: GL Version  = 4.4.0 NVIDIA 331.75\r\nglContext.hpp:308: GL Vendor   = NVIDIA Corporation\r\nglContext.hpp:309: GL Renderer = Quadro K5000/PCIe/SSE2\r\nglContext.hpp:310: GL Shader   = 4.40 NVIDIA via Cg compiler\r\n</pre>\r\n\r\nIf you wish to use a lower minimum version, say 3.0, then the version provided by the output will reflect 3.0 since GL fetches version from the context.\r\n\r\nTo test the context creation as a stand alone, create a cpp file with the following contents (<a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.cpp\" title=\"glContext.cpp\" target=\"_blank\"></a>):\r\n<pre>\r\n#include \"glContext.hpp\"\r\n\r\nint main(int argc, char* argv[])\r\n{\r\n    createGLContext();\r\n    deleteGLContext();\r\n    return 0;\r\n}\r\n</pre>\r\n\r\nCompile this with <strong>g++ -o gl glContext.cpp -lGL -lX11</strong> and run with <strong>./gl</strong> (make sure DISPLAY is :0). If this works successfully, any off-screen rendering code will work perfectly with this.\r\n\r\n<strong>Note:</strong> If you use GLEW, make sure you include glew.h before including gl.h. Simple way to do this is to add #include <GL/glew.h> before #include <GL/gl.h> in the header.','OpenGL 4.4 over SSH','','inherit','open','open','','6054-revision-v1','','','2014-07-02 18:57:51','2014-07-02 18:57:51','',6054,'http://sandbox.arrayfire.com/6054-revision-v1/',0,'revision','',0),(6066,11,'2014-07-02 18:58:45','2014-07-02 18:58:45','At ArrayFire, we constantly encounter projects that require OpenGL and run on a remote server that does not have a display.\r\nIn this blog, we have compiled a list of steps that users can use to run OpenGL full profile applications over SSH on remote systems without a display.\r\n\r\nA few notes before we get started.\r\n<ul>\r\n	<li>The first part of the blog that shows the configuration of the xorg.conf file it limited to NVIDIA Quadro and Tesla cards (with display).</li>\r\n	<li>NVIDIA GeForce cards do not support this functionality.</li>\r\n	<li>AMD cards support this capability without the modification of xorg.conf file.</li>\r\n	<li>For now, we will show the working of this on Linux.</li>\r\n</ul>\r\n\r\n<strong>Requirements</strong>:\r\nTo run the tool, you will need libGL.so, libX11.so. Another tool I would recommend strongly is glewinfo. Most linux distributions ship this with the glew-utils package. An alternate to glewinfo is glxinfo which is present on all systems with X. You can substitute glewinfo with glxinfo in all the commands below if needed.\r\n\r\n<strong>Part 1: Setting up X (NVIDIA Only)</strong>\r\nTo get X to run on NVIDIA cards, we need to make a small change to the xorg.conf file. Before making the change, make sure you create a back up of the current version on your system.\r\nOpen xorg.conf (located in /etc/X11/xorg.conf). Look for \"Section Device\". You NVIDIA card should be listed here. Add this line before the end of the section: <code>Option         \"UseDisplayDevice\" \"none\"</code>. If you have more than one NVIDIA card listed, add this line to all the cards. Save and close the file and restart the system.\r\n\r\n<strong>Part 2: Login and Initial Diagnosis</strong>\r\nLogin to the remote system using the -X flag. That is, <code>ssh -X user@remote</code>.\r\nOnce logged in, run <code>echo $DISPLAY</code>. It is very likely that the output of this will be <strong>localhost:10.0</strong>. This specifies the display device is the client computer. If you have glewinfo installed, run it using <code>glewinfo | less</code>. You should see the graphics card from you local machine listed there, and perhaps OpenGL 2.x.\r\n\r\nIf you have glewinfo installed, run the following command:\r\n<code>env DISPLAY=:0 glewinfo | less</code>.\r\nThe goal of this command is to run glewinfo having temporarily set DISPLAY to :0 (remote system). If this command run\'s successfully, you should be able to see the graphics card on the remote system along with the full OpenGL profile. And now you are ready to deploy applications using X.\r\nIf you want to set DISPLAY for the entire session, run <code>export DISPLAY=:0</code>\r\n\r\n<strong>Part 3: Deploying Off-Screen Rendering Applications on Remote System</strong>\r\nThis is where X becomes crucial. Tools like GLFW may or may not work on remote systems because of dependence on Xrandr and other software. The trick is use X to create an OpenGL context, and the run everything using off-screen rendering using framebuffers and renderbuffers. I took the source to create an OpenGL context using X from <a href=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" title=\"OpenGL Context Creation Page\" target=\"_blank\"></a> and modified it slighly. Thanks to the folks at OpenGL.org for providing this. The source code with the changes I made can be found here: <a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.hpp\" target=\"_blank\">glContext.hpp</a>.\r\n\r\nInclude this in your source code. To create context run createGLContext() and to delete the context run deleteGLContext().\r\n\r\nI have specified that the minimum OpenGL version should be 4.4 with forward context enabled. You can modify this version by changing the values at lines 26 and 27.\r\nThe forward compatibility can be disabled at line 241 by changing line 241 to None.\r\nIf the application fails to create the specified version of the context, the application will exit.\r\n\r\nAt line 189, we create the window. The API description can be found <a href=\"http://tronche.com/gui/x/xlib/window/XCreateWindow.html\" title=\"link\" target=\"_blank\"></a>. \"0, 0, 10, 10\" specifies the top-left corner (0,0) and the width and height of the window (10, 10). Since the goal of this is to be used for off-screen rendering, the size of the window has no effect on the rendering.\r\nLine 202 specifies the window title.\r\n\r\nIf everything goes successfully, you should see an output like this:\r\n<pre>\r\nglContext.hpp:307: GL Version  = 4.4.0 NVIDIA 331.75\r\nglContext.hpp:308: GL Vendor   = NVIDIA Corporation\r\nglContext.hpp:309: GL Renderer = Quadro K5000/PCIe/SSE2\r\nglContext.hpp:310: GL Shader   = 4.40 NVIDIA via Cg compiler\r\n</pre>\r\n\r\nIf you wish to use a lower minimum version, say 3.0, then the version provided by the output will reflect 3.0 since GL fetches version from the context.\r\n\r\nTo test the context creation as a stand alone, create a cpp file with the following contents (<a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.cpp\" title=\"glContext.cpp\" target=\"_blank\"></a>):\r\n<pre>\r\n#include \"glContext.hpp\"\r\n\r\nint main(int argc, char* argv[])\r\n{\r\n    createGLContext();\r\n    deleteGLContext();\r\n    return 0;\r\n}\r\n</pre>\r\n\r\nCompile this with <strong>g++ -o gl glContext.cpp -lGL -lX11</strong> and run with <strong>./gl</strong> (make sure DISPLAY is :0). If this works successfully, any off-screen rendering code will work perfectly with this.\r\n\r\n<strong>Note:</strong> If you use GLEW, make sure you include glew.h before including gl.h. Simple way to do this is to add <code>#include <GL/glew.h></code> before <code>#include <GL/gl.h></code> in the header.','OpenGL 4.4 over SSH','','inherit','open','open','','6054-revision-v1','','','2014-07-02 18:58:45','2014-07-02 18:58:45','',6054,'http://sandbox.arrayfire.com/6054-revision-v1/',0,'revision','',0),(6067,11,'2014-07-02 18:59:18','2014-07-02 18:59:18','At ArrayFire, we constantly encounter projects that require OpenGL and run on a remote server that does not have a display.\r\nIn this blog, we have compiled a list of steps that users can use to run OpenGL full profile applications over SSH on remote systems without a display.\r\n\r\nA few notes before we get started.\r\n<ul>\r\n	<li>The first part of the blog that shows the configuration of the xorg.conf file it limited to NVIDIA Quadro and Tesla cards (with display).</li>\r\n	<li>NVIDIA GeForce cards do not support this functionality.</li>\r\n	<li>AMD cards support this capability without the modification of xorg.conf file.</li>\r\n	<li>For now, we will show the working of this on Linux.</li>\r\n</ul>\r\n\r\n<strong>Requirements</strong>:\r\nTo run the tool, you will need libGL.so, libX11.so. Another tool I would recommend strongly is glewinfo. Most linux distributions ship this with the glew-utils package. An alternate to glewinfo is glxinfo which is present on all systems with X. You can substitute glewinfo with glxinfo in all the commands below if needed.\r\n\r\n<strong>Part 1: Setting up X (NVIDIA Only)</strong>\r\nTo get X to run on NVIDIA cards, we need to make a small change to the xorg.conf file. Before making the change, make sure you create a back up of the current version on your system.\r\nOpen xorg.conf (located in /etc/X11/xorg.conf). Look for \"Section Device\". You NVIDIA card should be listed here. Add this line before the end of the section: <code>Option         \"UseDisplayDevice\" \"none\"</code>. If you have more than one NVIDIA card listed, add this line to all the cards. Save and close the file and restart the system.\r\n\r\n<strong>Part 2: Login and Initial Diagnosis</strong>\r\nLogin to the remote system using the -X flag. That is, <code>ssh -X user@remote</code>.\r\nOnce logged in, run <code>echo $DISPLAY</code>. It is very likely that the output of this will be <strong>localhost:10.0</strong>. This specifies the display device is the client computer. If you have glewinfo installed, run it using <code>glewinfo | less</code>. You should see the graphics card from you local machine listed there, and perhaps OpenGL 2.x.\r\n\r\nIf you have glewinfo installed, run the following command:\r\n<code>env DISPLAY=:0 glewinfo | less</code>.\r\nThe goal of this command is to run glewinfo having temporarily set DISPLAY to :0 (remote system). If this command run\'s successfully, you should be able to see the graphics card on the remote system along with the full OpenGL profile. And now you are ready to deploy applications using X.\r\nIf you want to set DISPLAY for the entire session, run <code>export DISPLAY=:0</code>\r\n\r\n<strong>Part 3: Deploying Off-Screen Rendering Applications on Remote System</strong>\r\nThis is where X becomes crucial. Tools like GLFW may or may not work on remote systems because of dependence on Xrandr and other software. The trick is use X to create an OpenGL context, and the run everything using off-screen rendering using framebuffers and renderbuffers. I took the source to create an OpenGL context using X from <a href=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" title=\"OpenGL Context Creation Page\" target=\"_blank\"></a> and modified it slighly. Thanks to the folks at OpenGL.org for providing this. The source code with the changes I made can be found here: <a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.hpp\" target=\"_blank\">glContext.hpp</a>.\r\n\r\nInclude this in your source code. To create context run createGLContext() and to delete the context run deleteGLContext().\r\n\r\nI have specified that the minimum OpenGL version should be 4.4 with forward context enabled. You can modify this version by changing the values at lines 26 and 27.\r\nThe forward compatibility can be disabled at line 241 by changing line 241 to None.\r\nIf the application fails to create the specified version of the context, the application will exit.\r\n\r\nAt line 189, we create the window. The API description can be found <a href=\"http://tronche.com/gui/x/xlib/window/XCreateWindow.html\" title=\"link\" target=\"_blank\"></a>. \"0, 0, 10, 10\" specifies the top-left corner (0,0) and the width and height of the window (10, 10). Since the goal of this is to be used for off-screen rendering, the size of the window has no effect on the rendering.\r\nLine 202 specifies the window title.\r\n\r\nIf everything goes successfully, you should see an output like this:\r\n<pre>\r\nglContext.hpp:307: GL Version  = 4.4.0 NVIDIA 331.75\r\nglContext.hpp:308: GL Vendor   = NVIDIA Corporation\r\nglContext.hpp:309: GL Renderer = Quadro K5000/PCIe/SSE2\r\nglContext.hpp:310: GL Shader   = 4.40 NVIDIA via Cg compiler\r\n</pre>\r\n\r\nIf you wish to use a lower minimum version, say 3.0, then the version provided by the output will reflect 3.0 since GL fetches version from the context.\r\n\r\nTo test the context creation as a stand alone, create a cpp file with the following contents (<a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.cpp\" title=\"glContext.cpp\" target=\"_blank\"></a>):\r\n<pre>\r\n#include \"glContext.hpp\"\r\n\r\nint main(int argc, char* argv[])\r\n{\r\n    createGLContext();\r\n    deleteGLContext();\r\n    return 0;\r\n}\r\n</pre>\r\n\r\nCompile this with <strong>g++ -o gl glContext.cpp -lGL -lX11</strong> and run with <strong>./gl</strong> (make sure DISPLAY is :0). If this works successfully, any off-screen rendering code will work perfectly with this.\r\n\r\n<strong>Note:</strong> If you use GLEW, make sure you include glew.h before including gl.h. Simple way to do this is to add <pre>#include <GL/glew.h></pre> before <pre>#include <GL/gl.h></pre> in the header.','OpenGL 4.4 over SSH','','inherit','open','open','','6054-revision-v1','','','2014-07-02 18:59:18','2014-07-02 18:59:18','',6054,'http://sandbox.arrayfire.com/6054-revision-v1/',0,'revision','',0),(6068,11,'2014-07-02 18:59:49','2014-07-02 18:59:49','At ArrayFire, we constantly encounter projects that require OpenGL and run on a remote server that does not have a display.\r\nIn this blog, we have compiled a list of steps that users can use to run OpenGL full profile applications over SSH on remote systems without a display.\r\n\r\nA few notes before we get started.\r\n<ul>\r\n	<li>The first part of the blog that shows the configuration of the xorg.conf file it limited to NVIDIA Quadro and Tesla cards (with display).</li>\r\n	<li>NVIDIA GeForce cards do not support this functionality.</li>\r\n	<li>AMD cards support this capability without the modification of xorg.conf file.</li>\r\n	<li>For now, we will show the working of this on Linux.</li>\r\n</ul>\r\n\r\n<strong>Requirements</strong>:\r\nTo run the tool, you will need libGL.so, libX11.so. Another tool I would recommend strongly is glewinfo. Most linux distributions ship this with the glew-utils package. An alternate to glewinfo is glxinfo which is present on all systems with X. You can substitute glewinfo with glxinfo in all the commands below if needed.\r\n\r\n<strong>Part 1: Setting up X (NVIDIA Only)</strong>\r\nTo get X to run on NVIDIA cards, we need to make a small change to the xorg.conf file. Before making the change, make sure you create a back up of the current version on your system.\r\nOpen xorg.conf (located in /etc/X11/xorg.conf). Look for \"Section Device\". You NVIDIA card should be listed here. Add this line before the end of the section: <code>Option         \"UseDisplayDevice\" \"none\"</code>. If you have more than one NVIDIA card listed, add this line to all the cards. Save and close the file and restart the system.\r\n\r\n<strong>Part 2: Login and Initial Diagnosis</strong>\r\nLogin to the remote system using the -X flag. That is, <code>ssh -X user@remote</code>.\r\nOnce logged in, run <code>echo $DISPLAY</code>. It is very likely that the output of this will be <strong>localhost:10.0</strong>. This specifies the display device is the client computer. If you have glewinfo installed, run it using <code>glewinfo | less</code>. You should see the graphics card from you local machine listed there, and perhaps OpenGL 2.x.\r\n\r\nIf you have glewinfo installed, run the following command:\r\n<code>env DISPLAY=:0 glewinfo | less</code>.\r\nThe goal of this command is to run glewinfo having temporarily set DISPLAY to :0 (remote system). If this command run\'s successfully, you should be able to see the graphics card on the remote system along with the full OpenGL profile. And now you are ready to deploy applications using X.\r\nIf you want to set DISPLAY for the entire session, run <code>export DISPLAY=:0</code>\r\n\r\n<strong>Part 3: Deploying Off-Screen Rendering Applications on Remote System</strong>\r\nThis is where X becomes crucial. Tools like GLFW may or may not work on remote systems because of dependence on Xrandr and other software. The trick is use X to create an OpenGL context, and the run everything using off-screen rendering using framebuffers and renderbuffers. I took the source to create an OpenGL context using X from <a href=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" title=\"OpenGL Context Creation Page\" target=\"_blank\"></a> and modified it slighly. Thanks to the folks at OpenGL.org for providing this. The source code with the changes I made can be found here: <a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.hpp\" target=\"_blank\">glContext.hpp</a>.\r\n\r\nInclude this in your source code. To create context run createGLContext() and to delete the context run deleteGLContext().\r\n\r\nI have specified that the minimum OpenGL version should be 4.4 with forward context enabled. You can modify this version by changing the values at lines 26 and 27.\r\nThe forward compatibility can be disabled at line 241 by changing line 241 to None.\r\nIf the application fails to create the specified version of the context, the application will exit.\r\n\r\nAt line 189, we create the window. The API description can be found <a href=\"http://tronche.com/gui/x/xlib/window/XCreateWindow.html\" title=\"link\" target=\"_blank\"></a>. \"0, 0, 10, 10\" specifies the top-left corner (0,0) and the width and height of the window (10, 10). Since the goal of this is to be used for off-screen rendering, the size of the window has no effect on the rendering.\r\nLine 202 specifies the window title.\r\n\r\nIf everything goes successfully, you should see an output like this:\r\n<pre>\r\nglContext.hpp:307: GL Version  = 4.4.0 NVIDIA 331.75\r\nglContext.hpp:308: GL Vendor   = NVIDIA Corporation\r\nglContext.hpp:309: GL Renderer = Quadro K5000/PCIe/SSE2\r\nglContext.hpp:310: GL Shader   = 4.40 NVIDIA via Cg compiler\r\n</pre>\r\n\r\nIf you wish to use a lower minimum version, say 3.0, then the version provided by the output will reflect 3.0 since GL fetches version from the context.\r\n\r\nTo test the context creation as a stand alone, create a cpp file with the following contents (<a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.cpp\" title=\"glContext.cpp\" target=\"_blank\"></a>):\r\n<pre>\r\n#include \"glContext.hpp\"\r\n\r\nint main(int argc, char* argv[])\r\n{\r\n    createGLContext();\r\n    deleteGLContext();\r\n    return 0;\r\n}\r\n</pre>\r\n\r\nCompile this with <strong>g++ -o gl glContext.cpp -lGL -lX11</strong> and run with <strong>./gl</strong> (make sure DISPLAY is :0). If this works successfully, any off-screen rendering code will work perfectly with this.\r\n\r\n<strong>Note:</strong> If you use GLEW, make sure you include glew.h before including gl.h.','OpenGL 4.4 over SSH','','inherit','open','open','','6054-revision-v1','','','2014-07-02 18:59:49','2014-07-02 18:59:49','',6054,'http://sandbox.arrayfire.com/6054-revision-v1/',0,'revision','',0),(6069,11,'2014-07-02 19:03:41','2014-07-02 19:03:41','At ArrayFire, we constantly encounter projects that require OpenGL and run on a remote server that does not have a display.\r\nIn this blog, we have compiled a list of steps that users can use to run OpenGL full profile applications over SSH on remote systems without a display.\r\n\r\nA few notes before we get started.\r\n<ul>\r\n	<li>The first part of the blog that shows the configuration of the xorg.conf file it limited to NVIDIA Quadro and Tesla cards (with display).</li>\r\n	<li>NVIDIA GeForce cards do not support this functionality.</li>\r\n	<li>AMD cards support this capability without the modification of xorg.conf file.</li>\r\n</ul>\r\n\r\n<strong>Requirements</strong>:\r\nTo run the tool, you will need libGL.so, libX11.so. Another tool I would recommend strongly is glewinfo. Most linux distributions ship this with the glew-utils package. An alternate to glewinfo is glxinfo which is present on all systems with X. You can substitute glewinfo with glxinfo in all the commands below if needed.\r\n\r\n<strong>Part 1: Setting up X (NVIDIA Only)</strong>\r\nTo get X to run on NVIDIA cards, we need to make a small change to the xorg.conf file. Before making the change, make sure you create a back up of the current version on your system.\r\nOpen xorg.conf (located in /etc/X11/xorg.conf). Look for \"Section Device\". You NVIDIA card should be listed here. Add this line before the end of the section: <code>Option         \"UseDisplayDevice\" \"none\"</code>. If you have more than one NVIDIA card listed, add this line to all the cards. Save and close the file and restart the system.\r\n\r\n<strong>Part 2: Login and Initial Diagnosis</strong>\r\nLogin to the remote system using the -X flag. That is, <code>ssh -X user@remote</code>.\r\nOnce logged in, run <code>echo $DISPLAY</code>. It is very likely that the output of this will be <strong>localhost:10.0</strong>. This specifies the display device is the client computer. If you have glewinfo installed, run it using <code>glewinfo | less</code>. You should see the graphics card from you local machine listed there, and perhaps OpenGL 2.x.\r\n\r\nIf you have glewinfo installed, run the following command:\r\n<code>env DISPLAY=:0 glewinfo | less</code>.\r\nThe goal of this command is to run glewinfo having temporarily set DISPLAY to :0 (remote system). If this command run\'s successfully, you should be able to see the graphics card on the remote system along with the full OpenGL profile. And now you are ready to deploy applications using X.\r\nIf you want to set DISPLAY for the entire session, run <code>export DISPLAY=:0</code>\r\n\r\n<strong>Part 3: Deploying Off-Screen Rendering Applications on Remote System</strong>\r\nThis is where X becomes crucial. Tools like GLFW may or may not work on remote systems because of dependence on Xrandr and other software. The trick is use X to create an OpenGL context, and the run everything using off-screen rendering using framebuffers and renderbuffers. I took the source to create an OpenGL context using X from <a href=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" title=\"OpenGL Context Creation Page\" target=\"_blank\"></a> and modified it slighly. Thanks to the folks at OpenGL.org for providing this. The source code with the changes I made can be found here: <a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.hpp\" target=\"_blank\">glContext.hpp</a>.\r\n\r\nInclude this in your source code. To create context run createGLContext() and to delete the context run deleteGLContext().\r\n\r\nI have specified that the minimum OpenGL version should be 4.4 with forward context enabled. You can modify this version by changing the values at lines 26 and 27.\r\nThe forward compatibility can be disabled at line 241 by changing line 241 to None.\r\nIf the application fails to create the specified version of the context, the application will exit.\r\n\r\nAt line 189, we create the window. The API description can be found <a href=\"http://tronche.com/gui/x/xlib/window/XCreateWindow.html\" title=\"link\" target=\"_blank\"></a>. \"0, 0, 10, 10\" specifies the top-left corner (0,0) and the width and height of the window (10, 10). Since the goal of this is to be used for off-screen rendering, the size of the window has no effect on the rendering.\r\nLine 202 specifies the window title.\r\n\r\nIf everything goes successfully, you should see an output like this:\r\n<pre>\r\nglContext.hpp:307: GL Version  = 4.4.0 NVIDIA 331.75\r\nglContext.hpp:308: GL Vendor   = NVIDIA Corporation\r\nglContext.hpp:309: GL Renderer = Quadro K5000/PCIe/SSE2\r\nglContext.hpp:310: GL Shader   = 4.40 NVIDIA via Cg compiler\r\n</pre>\r\n\r\nIf you wish to use a lower minimum version, say 3.0, then the version provided by the output will reflect 3.0 since GL fetches version from the context.\r\n\r\nTo test the context creation as a stand alone, create a cpp file with the following contents (<a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.cpp\" title=\"glContext.cpp\" target=\"_blank\"></a>):\r\n<pre>\r\n#include \"glContext.hpp\"\r\n\r\nint main(int argc, char* argv[])\r\n{\r\n    createGLContext();\r\n    deleteGLContext();\r\n    return 0;\r\n}\r\n</pre>\r\n\r\nCompile this with <strong>g++ -o gl glContext.cpp -lGL -lX11</strong> and run with <strong>./gl</strong> (make sure DISPLAY is :0). If this works successfully, any off-screen rendering code will work perfectly with this.\r\n<strong>Note:</strong> If you use GLEW, make sure you include glew.h before including gl.h.\r\n\r\nIf you wish to further know about or work with us on remote rendering, contact us at technical@arrayfire.com.','Remote Off-Screen Rendering with OpenGL 4.4 over SSH','','inherit','open','open','','6054-revision-v1','','','2014-07-02 19:03:41','2014-07-02 19:03:41','',6054,'http://sandbox.arrayfire.com/6054-revision-v1/',0,'revision','',0),(6070,11,'2014-07-02 19:23:01','2014-07-02 19:23:01','At ArrayFire, we constantly encounter projects that require OpenGL and run on a remote server that does not have a display.\r\nIn this blog, we have compiled a list of steps that users can use to run OpenGL full profile applications over SSH on remote systems without a display.\r\n\r\nA few notes before we get started.\r\n<ul>\r\n	<li>The first part of the blog that shows the configuration of the xorg.conf file it limited to NVIDIA Quadro and Tesla cards (with display).</li>\r\n	<li>NVIDIA GeForce cards do not support this functionality.</li>\r\n	<li>AMD cards support this capability without the modification of xorg.conf file.</li>\r\n</ul>\r\n\r\n<strong>Requirements</strong>:\r\nTo run the tool, you will need libGL.so, libX11.so. Another tool I would recommend strongly is glewinfo. Most linux distributions ship this with the glew-utils package. An alternate to glewinfo is glxinfo which is present on all systems with X. You can substitute glewinfo with glxinfo in all the commands below if needed.\r\n\r\n<strong>Part 1: Setting up X (NVIDIA Only)</strong>\r\nTo get X to run on NVIDIA cards, we need to make a small change to the xorg.conf file. Before making the change, make sure you create a back up of the current version on your system.\r\nOpen xorg.conf (located in /etc/X11/xorg.conf). Look for \"Section Device\". You NVIDIA card should be listed here. Add this line before the end of the section: <code>Option         \"UseDisplayDevice\" \"none\"</code>. If you have more than one NVIDIA card listed, add this line to all the cards. Save and close the file and restart the system.\r\n\r\n<strong>Part 2: Login and Initial Diagnosis</strong>\r\nLogin to the remote system using the -X flag. That is, <code>ssh -X user@remote</code>.\r\nOnce logged in, run <code>echo $DISPLAY</code>. It is very likely that the output of this will be <strong>localhost:10.0</strong>. This specifies the display device is the client computer. If you have glewinfo installed, run it using <code>glewinfo | less</code>. You should see the graphics card from you local machine listed there, and perhaps OpenGL 2.x.\r\n\r\nIf you have glewinfo installed, run the following command:\r\n<code>env DISPLAY=:0 glewinfo | less</code>.\r\nThe goal of this command is to run glewinfo having temporarily set DISPLAY to :0 (remote system). If this command run\'s successfully, you should be able to see the graphics card on the remote system along with the full OpenGL profile. And now you are ready to deploy applications using X.\r\nIf you want to set DISPLAY for the entire session, run <code>export DISPLAY=:0</code>\r\n\r\n<strong>Part 3: Deploying Off-Screen Rendering Applications on Remote System</strong>\r\nThis is where X becomes crucial. Tools like GLFW may or may not work on remote systems because of dependence on Xrandr and other software. The trick is use X to create an OpenGL context, and the run everything using off-screen rendering using framebuffers and renderbuffers. I took the source to create an OpenGL context using X from <a href=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" title=\"OpenGL Context Creation Page\" target=\"_blank\"></a> and modified it slighly. Thanks to the folks at OpenGL.org for providing this. The source code with the changes I made can be found here: <a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.hpp\" target=\"_blank\">glContext.hpp</a>.\r\n\r\nInclude this in your source code. To create context run createGLContext() and to delete the context run deleteGLContext().\r\n\r\nI have specified that the minimum OpenGL version should be 4.4 with forward context enabled. You can modify this version by changing the values at lines 26 and 27.\r\nThe forward compatibility can be disabled at line 241 by changing line 241 to None.\r\nIf the application fails to create the specified version of the context, the application will exit.\r\n\r\nAt line 189, we create the window. The API description can be found <a href=\"http://tronche.com/gui/x/xlib/window/XCreateWindow.html\" title=\"link\" target=\"_blank\"></a>. \"0, 0, 10, 10\" specifies the top-left corner (0,0) and the width and height of the window (10, 10). Since the goal of this is to be used for off-screen rendering, the size of the window has no effect on the rendering.\r\nLine 202 specifies the window title.\r\n\r\nIf everything goes successfully, you should see an output like this:\r\n<pre>\r\nglContext.hpp:307: GL Version  = 4.4.0 NVIDIA 331.75\r\nglContext.hpp:308: GL Vendor   = NVIDIA Corporation\r\nglContext.hpp:309: GL Renderer = Quadro K5000/PCIe/SSE2\r\nglContext.hpp:310: GL Shader   = 4.40 NVIDIA via Cg compiler\r\n</pre>\r\n\r\nIf you wish to use a lower minimum version, say 3.0, then the version provided by the output will reflect 3.0 since GL fetches version from the context.\r\n\r\nTo test the context creation as a stand alone, create a cpp file with the following contents (<a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.cpp\" title=\"glContext.cpp\" target=\"_blank\"></a>):\r\n<pre>\r\n#include \"glContext.hpp\"\r\n\r\nint main(int argc, char* argv[])\r\n{\r\n    createGLContext();\r\n    deleteGLContext();\r\n    return 0;\r\n}\r\n</pre>\r\n\r\nCompile this with <strong>g++ -o gl glContext.cpp -lGL -lX11</strong> and run with <strong>./gl</strong> (make sure DISPLAY is :0). If this works successfully, any off-screen rendering code will work perfectly with this.\r\n<strong>Note:</strong> If you use GLEW, make sure you include glew.h before including gl.h.\r\n\r\nIf you wish to know about remote OpenGL further or work with us on remote rendering, contact us at technical@arrayfire.com.','Remote Off-Screen Rendering with OpenGL 4.4 over SSH','','inherit','open','open','','6054-revision-v1','','','2014-07-02 19:23:01','2014-07-02 19:23:01','',6054,'http://sandbox.arrayfire.com/6054-revision-v1/',0,'revision','',0),(6071,11,'2014-07-02 19:24:38','2014-07-02 19:24:38','At ArrayFire, we constantly encounter projects that require OpenGL and run on a remote server that does not have a display.\r\nIn this blog, we have compiled a list of steps that users can use to run OpenGL full profile applications over SSH on remote systems without a display.\r\n\r\nA few notes before we get started.\r\n<ul>\r\n	<li>The first part of the blog that shows the configuration of the xorg.conf file it limited to NVIDIA Quadro and Tesla cards (with display).</li>\r\n	<li>NVIDIA GeForce cards do not support this functionality.</li>\r\n	<li>AMD cards support this capability without the modification of xorg.conf file.</li>\r\n</ul>\r\n\r\n<strong>Requirements</strong>:\r\nTo run the tool, you will need libGL.so, libX11.so. Another tool I would recommend strongly is glewinfo. Most linux distributions ship this with the glew-utils package. An alternate to glewinfo is glxinfo which is present on all systems with X. You can substitute glewinfo with glxinfo in all the commands below if needed.\r\n\r\n<strong>Part 1: Setting up X (NVIDIA Only)</strong>\r\nTo get X to run on NVIDIA cards, we need to make a small change to the xorg.conf file. Before making the change, make sure you create a back up of the current version on your system.\r\nOpen xorg.conf (located in /etc/X11/xorg.conf). Look for \"Section Device\". You NVIDIA card should be listed here. Add this line before the end of the section: <code>Option         \"UseDisplayDevice\" \"none\"</code>. If you have more than one NVIDIA card listed, add this line to all the cards. Save and close the file and restart the system.\r\n\r\n<strong>Part 2: Login and Initial Diagnosis</strong>\r\nLogin to the remote system using the -X flag. That is, <code>ssh -X user@remote</code>.\r\nOnce logged in, run <code>echo $DISPLAY</code>. It is very likely that the output of this will be <strong>localhost:10.0</strong>. This specifies the display device is the client computer. If you have glewinfo installed, run it using <code>glewinfo | less</code>. You should see the graphics card from you local machine listed there, and perhaps OpenGL 2.x.\r\n\r\nIf you have glewinfo installed, run the following command:\r\n<code>env DISPLAY=:0 glewinfo | less</code>.\r\nThe goal of this command is to run glewinfo having temporarily set DISPLAY to :0 (remote system). If this command run\'s successfully, you should be able to see the graphics card on the remote system along with the full OpenGL profile. And now you are ready to deploy applications using X.\r\nIf you want to set DISPLAY for the entire session, run <code>export DISPLAY=:0</code>\r\n\r\n<strong>Part 3: Deploying Off-Screen Rendering Applications on Remote System</strong>\r\nThis is where X becomes crucial. Tools like GLFW may or may not work on remote systems because of dependence on Xrandr and other software. The trick is use X to create an OpenGL context, and the run everything using off-screen rendering using framebuffers and renderbuffers. I took the source to create an OpenGL context using X from <a href=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" title=\"OpenGL Context Creation Page\" target=\"_blank\"></a> and modified it slighly. Thanks to the folks at OpenGL.org for providing this. The source code with the changes I made can be found here: <a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.hpp\" target=\"_blank\">glContext.hpp</a>.\r\n\r\nInclude this in your source code. To create context run createGLContext() and to delete the context run deleteGLContext().\r\n\r\nI have specified that the minimum OpenGL version should be 4.4 with forward context enabled. You can modify this version by changing the values at lines 26 and 27.\r\nThe forward compatibility can be disabled at line 241 by changing line 241 to None.\r\nIf the application fails to create the specified version of the context, the application will exit.\r\n\r\nAt line 189, we create the window. The API description can be found <a href=\"http://tronche.com/gui/x/xlib/window/XCreateWindow.html\" title=\"link\" target=\"_blank\"></a>. \"0, 0, 10, 10\" specifies the top-left corner (0,0) and the width and height of the window (10, 10). Since the goal of this is to be used for off-screen rendering, the size of the window has no effect on the rendering.\r\nLine 202 specifies the window title.\r\n\r\nIf everything goes successfully, you should see an output like this:\r\n<pre>\r\nglContext.hpp:307: GL Version  = 4.4.0 NVIDIA 331.75\r\nglContext.hpp:308: GL Vendor   = NVIDIA Corporation\r\nglContext.hpp:309: GL Renderer = Quadro K5000/PCIe/SSE2\r\nglContext.hpp:310: GL Shader   = 4.40 NVIDIA via Cg compiler\r\n</pre>\r\n\r\nIf you wish to use a lower minimum version, say 3.0, then the version provided by the output will reflect 3.0 since GL fetches version from the context.\r\n\r\nTo test the context creation as a stand alone, create a cpp file with the following contents (<a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.cpp\" title=\"glContext.cpp\" target=\"_blank\">glContext.cpp</a>):\r\n<pre>\r\n#include \"glContext.hpp\"\r\n\r\nint main(int argc, char* argv[])\r\n{\r\n    createGLContext();\r\n    deleteGLContext();\r\n    return 0;\r\n}\r\n</pre>\r\n\r\nCompile this with <strong>g++ -o gl glContext.cpp -lGL -lX11</strong> and run with <strong>./gl</strong> (make sure DISPLAY is :0). If this works successfully, any off-screen rendering code will work perfectly with this.\r\n<strong>Note:</strong> If you use GLEW, make sure you include glew.h before including gl.h.\r\n\r\nIf you wish to know about remote OpenGL further or work with us on remote rendering, contact us at technical@arrayfire.com.','Remote Off-Screen Rendering with OpenGL 4.4 over SSH','','inherit','open','open','','6054-revision-v1','','','2014-07-02 19:24:38','2014-07-02 19:24:38','',6054,'http://sandbox.arrayfire.com/6054-revision-v1/',0,'revision','',0),(6072,11,'2014-07-02 19:28:17','2014-07-02 19:28:17','At ArrayFire, we constantly encounter projects that require OpenGL and run on a remote server that does not have a display.\r\nIn this blog, we have compiled a list of steps that users can use to run OpenGL full profile applications over SSH on remote systems without a display.\r\n\r\nA few notes before we get started.\r\n<ul>\r\n	<li>The first part of the blog that shows the configuration of the xorg.conf file it limited to NVIDIA Quadro and Tesla cards (with display).</li>\r\n	<li>NVIDIA GeForce cards do not support this functionality.</li>\r\n	<li>AMD cards support this capability without the modification of xorg.conf file.</li>\r\n</ul>\r\n\r\n<strong>Requirements</strong>:\r\nTo run the tool, you will need libGL.so, libX11.so. Another tool I would recommend strongly is glewinfo. Most linux distributions ship this with the glew-utils package. An alternate to glewinfo is glxinfo which is present on all systems with X. You can substitute glewinfo with glxinfo in all the commands below if needed.\r\n\r\n<strong>Part 1: Setting up X (NVIDIA Only)</strong>\r\nTo get X to run on NVIDIA cards, we need to make a small change to the xorg.conf file. Before making the change, make sure you create a back up of the current version on your system.\r\nOpen xorg.conf (located in /etc/X11/xorg.conf). Look for \"Section Device\". You NVIDIA card should be listed here. Add this line before the end of the section: <code>Option         \"UseDisplayDevice\" \"none\"</code>. If you have more than one NVIDIA card listed, add this line to all the cards. Save and close the file and restart the system.\r\n\r\n<strong>Part 2: Login and Initial Diagnosis</strong>\r\nLogin to the remote system using the -X flag. That is, <code>ssh -X user@remote</code>.\r\nOnce logged in, run <code>echo $DISPLAY</code>. It is very likely that the output of this will be <strong>localhost:10.0</strong>. This specifies the display device is the client computer. If you have glewinfo installed, run it using <code>glewinfo | less</code>. You should see the graphics card from you local machine listed there, and perhaps OpenGL 2.x.\r\n\r\nIf you have glewinfo installed, run the following command:\r\n<code>env DISPLAY=:0 glewinfo | less</code>.\r\nThe goal of this command is to run glewinfo having temporarily set DISPLAY to :0 (remote system). If this command run\'s successfully, you should be able to see the graphics card on the remote system along with the full OpenGL profile. And now you are ready to deploy applications using X.\r\nIf you want to set DISPLAY for the entire session, run <code>export DISPLAY=:0</code>\r\n\r\n<strong>Part 3: Deploying Off-Screen Rendering Applications on Remote System</strong>\r\nThis is where X becomes crucial. Tools like GLFW may or may not work on remote systems because of dependence on Xrandr and other software. The trick is use X to create an OpenGL context, and the run everything using off-screen rendering using framebuffers and renderbuffers. I took the source to create an OpenGL context using X from <a href=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" title=\"OpenGL Context Creation Page\" target=\"_blank\"></a> and modified it slighly. Thanks to the folks at OpenGL.org for providing this. The source code with the changes I made can be found here: <a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.hpp\" target=\"_blank\">glContext.hpp</a>.\r\n\r\nInclude this in your source code. To create context run createGLContext() and to delete the context run deleteGLContext().\r\n\r\nI have specified that the minimum OpenGL version should be 4.4 with forward context enabled. You can modify this version by changing the values at lines 26 and 27.\r\nThe forward compatibility can be disabled at line 241 by changing line 241 to None.\r\nIf the application fails to create the specified version of the context, the application will exit.\r\n\r\nAt line 189, we create the window. The API description can be found <a href=\"http://tronche.com/gui/x/xlib/window/XCreateWindow.html\" title=\"link\" target=\"_blank\">here</a>. \"0, 0, 10, 10\" specifies the top-left corner (0,0) and the width and height of the window (10, 10). Since the goal of this is to be used for off-screen rendering, the size of the window has no effect on the rendering.\r\nLine 202 specifies the window title.\r\n\r\nIf everything goes successfully, you should see an output like this:\r\n<pre>\r\nglContext.hpp:307: GL Version  = 4.4.0 NVIDIA 331.75\r\nglContext.hpp:308: GL Vendor   = NVIDIA Corporation\r\nglContext.hpp:309: GL Renderer = Quadro K5000/PCIe/SSE2\r\nglContext.hpp:310: GL Shader   = 4.40 NVIDIA via Cg compiler\r\n</pre>\r\n\r\nIf you wish to use a lower minimum version, say 3.0, then the version provided by the output will reflect 3.0 since GL fetches version from the context.\r\n\r\nTo test the context creation as a stand alone, create a cpp file with the following contents (<a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.cpp\" title=\"glContext.cpp\" target=\"_blank\">glContext.cpp</a>):\r\n<pre>\r\n#include \"glContext.hpp\"\r\n\r\nint main(int argc, char* argv[])\r\n{\r\n    createGLContext();\r\n    deleteGLContext();\r\n    return 0;\r\n}\r\n</pre>\r\n\r\nCompile this with <strong>g++ -o gl glContext.cpp -lGL -lX11</strong> and run with <strong>./gl</strong> (make sure DISPLAY is :0). If this works successfully, any off-screen rendering code will work perfectly with this.\r\n<strong>Note:</strong> If you use GLEW, make sure you include glew.h before including gl.h.\r\n\r\nIf you wish to know about remote OpenGL further or work with us on remote rendering, contact us at technical@arrayfire.com.','Remote Off-Screen Rendering with OpenGL 4.4 over SSH','','inherit','open','open','','6054-revision-v1','','','2014-07-02 19:28:17','2014-07-02 19:28:17','',6054,'http://sandbox.arrayfire.com/6054-revision-v1/',0,'revision','',0),(6073,11,'2014-07-02 19:29:51','2014-07-02 19:29:51','At ArrayFire, we constantly encounter projects that require OpenGL and run on a remote server that does not have a display.\r\nIn this blog, we have compiled a list of steps that users can use to run OpenGL full profile applications over SSH on remote systems without a display.\r\n\r\nA few notes before we get started.\r\n<ul>\r\n	<li>The first part of the blog that shows the configuration of the xorg.conf file it limited to NVIDIA Quadro and Tesla cards (with display).</li>\r\n	<li>NVIDIA GeForce cards do not support this functionality.</li>\r\n	<li>AMD cards support this capability without the modification of xorg.conf file.</li>\r\n</ul>\r\n\r\n<strong>Requirements</strong>:\r\nTo run the tool, you will need libGL.so, libX11.so. Another tool I would recommend strongly is glewinfo. Most linux distributions ship this with the glew-utils package. An alternate to glewinfo is glxinfo which is present on all systems with X. You can substitute glewinfo with glxinfo in all the commands below if needed.\r\n\r\n<strong>Part 1: Setting up X (NVIDIA Only)</strong>\r\nTo get X to run on NVIDIA cards, we need to make a small change to the xorg.conf file. Before making the change, make sure you create a back up of the current version on your system.\r\nOpen xorg.conf (located in /etc/X11/xorg.conf). Look for \"Section Device\". You NVIDIA card should be listed here. Add this line before the end of the section: <code>Option         \"UseDisplayDevice\" \"none\"</code>. If you have more than one NVIDIA card listed, add this line to all the cards. Save and close the file and restart the system.\r\n\r\n<strong>Part 2: Login and Initial Diagnosis</strong>\r\nLogin to the remote system using the -X flag. That is, <code>ssh -X user@remote</code>.\r\nOnce logged in, run <code>echo $DISPLAY</code>. It is very likely that the output of this will be <strong>localhost:10.0</strong>. This specifies the display device is the client computer. If you have glewinfo installed, run it using <code>glewinfo | less</code>. You should see the graphics card from you local machine listed there, and perhaps OpenGL 2.x.\r\n\r\nIf you have glewinfo installed, run the following command:\r\n<code>env DISPLAY=:0 glewinfo | less</code>.\r\nThe goal of this command is to run glewinfo having temporarily set DISPLAY to :0 (remote system). If this command run\'s successfully, you should be able to see the graphics card on the remote system along with the full OpenGL profile. And now you are ready to deploy applications using X.\r\nIf you want to set DISPLAY for the entire session, run <code>export DISPLAY=:0</code>\r\n\r\n<strong>Part 3: Deploying Off-Screen Rendering Applications on Remote System</strong>\r\nThis is where X becomes crucial. Tools like GLFW may or may not work on remote systems because of dependence on Xrandr and other software. The trick is use X to create an OpenGL context, and the run everything using off-screen rendering using framebuffers and renderbuffers. I took the source to create an OpenGL context using X from <a href=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" title=\"OpenGL Context Creation Page\" target=\"_blank\"></a> and modified it slighly. Thanks to the folks at OpenGL.org for providing this. The source code with the changes I made can be found here: <a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.hpp\" target=\"_blank\">glContext.hpp</a>.\r\n\r\nInclude this in your source code. To create context run createGLContext() and to delete the context run deleteGLContext().\r\n\r\nI have specified that the minimum OpenGL version should be 4.4 with forward context enabled. You can modify this version by changing the values at lines 26 and 27.\r\nThe forward compatibility can be disabled at line 241 by changing line 241 to None.\r\nIf the application fails to create the specified version of the context, the application will exit.\r\n\r\nAt line 189, we create the window. The API description can be found <a href=\"http://tronche.com/gui/x/xlib/window/XCreateWindow.html\" title=\"link\" target=\"_blank\">here</a>. \"0, 0, 10, 10\" specifies the top-left corner (0,0) and the width and height of the window (10, 10). Since the goal of this is to be used for off-screen rendering, the size of the window has no effect on the rendering.\r\nLine 202 specifies the window title.\r\n\r\nIf everything goes successfully, you should see an output like this:\r\n<pre>\r\nglContext.hpp:307: GL Version  = 4.4.0 NVIDIA 331.75\r\nglContext.hpp:308: GL Vendor   = NVIDIA Corporation\r\nglContext.hpp:309: GL Renderer = Quadro K5000/PCIe/SSE2\r\nglContext.hpp:310: GL Shader   = 4.40 NVIDIA via Cg compiler\r\n</pre>\r\n\r\nIf you wish to use a lower minimum version, say 3.0, then the version provided by the output will reflect 3.0 since GL fetches version from the context.\r\n\r\nTo test the context creation as a stand alone, create a cpp file with the following contents (<a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.cpp\" title=\"glContext.cpp\" target=\"_blank\">glContext.cpp</a>):\r\n<pre>\r\n#include \"glContext.hpp\"\r\n\r\nint main(int argc, char* argv[])\r\n{\r\n    createGLContext();\r\n    deleteGLContext();\r\n    return 0;\r\n}\r\n</pre>\r\n\r\nCompile this with <strong>g++ -o gl glContext.cpp -lGL -lX11</strong> and run with <strong>./gl</strong> (make sure DISPLAY is :0). If this works successfully, any off-screen rendering code will work perfectly with this.\r\n<strong>Note:</strong> If you use GLEW, make sure you include glew.h before including gl.h.\r\n\r\nIf you wish to know about remote OpenGL further or work with us on remote rendering, contact us at technical@arrayfire.com.\r\n\r\nLinks:\r\nOpenGL Context Creation Tutorial:<a href=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" title=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" target=\"_blank\"></a>\r\nArrayFire glContext repo on Github: <a href=\"https://github.com/arrayfire/glContext\" title=\"https://github.com/arrayfire/glContext\" target=\"_blank\"></a>','Remote Off-Screen Rendering with OpenGL 4.4 over SSH','','inherit','open','open','','6054-revision-v1','','','2014-07-02 19:29:51','2014-07-02 19:29:51','',6054,'http://sandbox.arrayfire.com/6054-revision-v1/',0,'revision','',0),(6074,11,'2014-07-02 19:31:08','2014-07-02 19:31:08','At ArrayFire, we constantly encounter projects that require OpenGL and run on a remote server that does not have a display.\r\nIn this blog, we have compiled a list of steps that users can use to run OpenGL full profile applications over SSH on remote systems without a display.\r\n\r\nA few notes before we get started.\r\n<ul>\r\n	<li>The first part of the blog that shows the configuration of the xorg.conf file it limited to NVIDIA Quadro and Tesla cards (with display).</li>\r\n	<li>NVIDIA GeForce cards do not support this functionality.</li>\r\n	<li>AMD cards support this capability without the modification of xorg.conf file.</li>\r\n</ul>\r\n\r\n<strong>Requirements</strong>:\r\nTo run the tool, you will need libGL.so, libX11.so. Another tool I would recommend strongly is glewinfo. Most linux distributions ship this with the glew-utils package. An alternate to glewinfo is glxinfo which is present on all systems with X. You can substitute glewinfo with glxinfo in all the commands below if needed.\r\n\r\n<strong>Part 1: Setting up X (NVIDIA Only)</strong>\r\nTo get X to run on NVIDIA cards, we need to make a small change to the xorg.conf file. Before making the change, make sure you create a back up of the current version on your system.\r\nOpen xorg.conf (located in /etc/X11/xorg.conf). Look for \"Section Device\". You NVIDIA card should be listed here. Add this line before the end of the section: <code>Option         \"UseDisplayDevice\" \"none\"</code>. If you have more than one NVIDIA card listed, add this line to all the cards. After adding the line, the section should look similar to\r\n<pre>\r\nSection \"Device\"\r\n    Identifier     \"Device0\"\r\n    Driver         \"nvidia\"\r\n    VendorName     \"NVIDIA Corporation\"\r\n    Option         \"UseDisplayDevice\" \"none\"\r\nEndSection\r\n</pre>\r\nSave and close the file and restart the system.\r\n\r\n<strong>Part 2: Login and Initial Diagnosis</strong>\r\nLogin to the remote system using the -X flag. That is, <code>ssh -X user@remote</code>.\r\nOnce logged in, run <code>echo $DISPLAY</code>. It is very likely that the output of this will be <strong>localhost:10.0</strong>. This specifies the display device is the client computer. If you have glewinfo installed, run it using <code>glewinfo | less</code>. You should see the graphics card from you local machine listed there, and perhaps OpenGL 2.x.\r\n\r\nIf you have glewinfo installed, run the following command:\r\n<code>env DISPLAY=:0 glewinfo | less</code>.\r\nThe goal of this command is to run glewinfo having temporarily set DISPLAY to :0 (remote system). If this command run\'s successfully, you should be able to see the graphics card on the remote system along with the full OpenGL profile. And now you are ready to deploy applications using X.\r\nIf you want to set DISPLAY for the entire session, run <code>export DISPLAY=:0</code>\r\n\r\n<strong>Part 3: Deploying Off-Screen Rendering Applications on Remote System</strong>\r\nThis is where X becomes crucial. Tools like GLFW may or may not work on remote systems because of dependence on Xrandr and other software. The trick is use X to create an OpenGL context, and the run everything using off-screen rendering using framebuffers and renderbuffers. I took the source to create an OpenGL context using X from <a href=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" title=\"OpenGL Context Creation Page\" target=\"_blank\"></a> and modified it slighly. Thanks to the folks at OpenGL.org for providing this. The source code with the changes I made can be found here: <a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.hpp\" target=\"_blank\">glContext.hpp</a>.\r\n\r\nInclude this in your source code. To create context run createGLContext() and to delete the context run deleteGLContext().\r\n\r\nI have specified that the minimum OpenGL version should be 4.4 with forward context enabled. You can modify this version by changing the values at lines 26 and 27.\r\nThe forward compatibility can be disabled at line 241 by changing line 241 to None.\r\nIf the application fails to create the specified version of the context, the application will exit.\r\n\r\nAt line 189, we create the window. The API description can be found <a href=\"http://tronche.com/gui/x/xlib/window/XCreateWindow.html\" title=\"link\" target=\"_blank\">here</a>. \"0, 0, 10, 10\" specifies the top-left corner (0,0) and the width and height of the window (10, 10). Since the goal of this is to be used for off-screen rendering, the size of the window has no effect on the rendering.\r\nLine 202 specifies the window title.\r\n\r\nIf everything goes successfully, you should see an output like this:\r\n<pre>\r\nglContext.hpp:307: GL Version  = 4.4.0 NVIDIA 331.75\r\nglContext.hpp:308: GL Vendor   = NVIDIA Corporation\r\nglContext.hpp:309: GL Renderer = Quadro K5000/PCIe/SSE2\r\nglContext.hpp:310: GL Shader   = 4.40 NVIDIA via Cg compiler\r\n</pre>\r\n\r\nIf you wish to use a lower minimum version, say 3.0, then the version provided by the output will reflect 3.0 since GL fetches version from the context.\r\n\r\nTo test the context creation as a stand alone, create a cpp file with the following contents (<a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.cpp\" title=\"glContext.cpp\" target=\"_blank\">glContext.cpp</a>):\r\n<pre>\r\n#include \"glContext.hpp\"\r\n\r\nint main(int argc, char* argv[])\r\n{\r\n    createGLContext();\r\n    deleteGLContext();\r\n    return 0;\r\n}\r\n</pre>\r\n\r\nCompile this with <strong>g++ -o gl glContext.cpp -lGL -lX11</strong> and run with <strong>./gl</strong> (make sure DISPLAY is :0). If this works successfully, any off-screen rendering code will work perfectly with this.\r\n<strong>Note:</strong> If you use GLEW, make sure you include glew.h before including gl.h.\r\n\r\nIf you wish to know about remote OpenGL further or work with us on remote rendering, contact us at technical@arrayfire.com.\r\n\r\nLinks:\r\nOpenGL Context Creation Tutorial:<a href=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" title=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" target=\"_blank\"></a>\r\nArrayFire glContext repo on Github: <a href=\"https://github.com/arrayfire/glContext\" title=\"https://github.com/arrayfire/glContext\" target=\"_blank\"></a>','Remote Off-Screen Rendering with OpenGL 4.4 over SSH','','inherit','open','open','','6054-revision-v1','','','2014-07-02 19:31:08','2014-07-02 19:31:08','',6054,'http://sandbox.arrayfire.com/6054-revision-v1/',0,'revision','',0),(6075,11,'2014-07-02 19:32:38','2014-07-02 19:32:38','At ArrayFire, we constantly encounter projects that require OpenGL and run on a remote server that does not have a display.\r\nIn this blog, we have compiled a list of steps that users can use to run OpenGL full profile applications over SSH on remote systems without a display.\r\n\r\nA few notes before we get started.\r\n<ul>\r\n	<li>The first part of the blog that shows the configuration of the xorg.conf file it limited to NVIDIA Quadro and Tesla cards (with display).</li>\r\n	<li>NVIDIA GeForce cards do not support this functionality.</li>\r\n	<li>AMD cards support this capability without the modification of xorg.conf file.</li>\r\n</ul>\r\n\r\n<strong>Requirements</strong>:\r\nTo run the tool, you will need libGL.so, libX11.so. Another tool I would recommend strongly is glewinfo. Most linux distributions ship this with the glew-utils package. An alternate to glewinfo is glxinfo which is present on all systems with X. You can substitute glewinfo with glxinfo in all the commands below if needed.\r\n\r\n<strong>Part 1: Setting up X (NVIDIA Only)</strong>\r\nTo get X to run on NVIDIA cards, we need to make a small change to the xorg.conf file. Before making the change, make sure you create a back up of the current version on your system.\r\nOpen xorg.conf (located in /etc/X11/xorg.conf). Look for \"Section Device\". You NVIDIA card should be listed here. Add this line before the end of the section: <code>Option         \"UseDisplayDevice\" \"none\"</code>. If you have more than one NVIDIA card listed, add this line to all the cards. After adding the line, the section should look similar to\r\n<pre>\r\nSection \"Device\"\r\n    Identifier     \"Device0\"\r\n    Driver         \"nvidia\"\r\n    VendorName     \"NVIDIA Corporation\"\r\n    Option         \"UseDisplayDevice\" \"none\"\r\nEndSection\r\n</pre>\r\nSave and close the file and restart the system.\r\n\r\n<strong>Part 2: Login and Initial Diagnosis</strong>\r\nLogin to the remote system using the -X flag. That is, <code>ssh -X user@remote</code>.\r\nOnce logged in, run <code>echo $DISPLAY</code>. It is very likely that the output of this will be <strong>localhost:10.0</strong>. This specifies the display device is the client computer. If you have glewinfo installed, run it using <code>glewinfo | less</code>. You should see the graphics card from you local machine listed there, and perhaps OpenGL 2.x.\r\n\r\nIf you have glewinfo installed, run the following command:\r\n<code>env DISPLAY=:0 glewinfo | less</code>.\r\nThe goal of this command is to run glewinfo having temporarily set DISPLAY to :0 (remote system). If this command run\'s successfully, you should be able to see the graphics card on the remote system along with the full OpenGL profile. And now you are ready to deploy applications using X.\r\nIf you want to set DISPLAY for the entire session, run <code>export DISPLAY=:0</code>\r\n\r\n<strong>Part 3: Deploying Off-Screen Rendering Applications on Remote System</strong>\r\nThis is where X becomes crucial. Tools like GLFW may or may not work on remote systems because of dependence on Xrandr and other software. The trick is use X to create an OpenGL context, and the run everything using off-screen rendering using framebuffers and renderbuffers. I took the source to create an OpenGL context using X from <a href=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" title=\"OpenGL Context Creation Page\" target=\"_blank\"></a> and modified it slighly. Thanks to the folks at OpenGL.org for providing this. The source code with the changes I made can be found here: <a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.hpp\" target=\"_blank\">glContext.hpp</a>.\r\n\r\nInclude this in your source code. To create context run createGLContext() and to delete the context run deleteGLContext().\r\n\r\nI have specified that the minimum OpenGL version should be 4.4 with forward context enabled. You can modify this version by changing the values at lines 26 and 27.\r\nThe forward compatibility can be disabled at line 241 by changing line 241 to None.\r\nIf the application fails to create the specified version of the context, the application will exit.\r\n\r\nAt line 189, we create the window. The API description can be found <a href=\"http://tronche.com/gui/x/xlib/window/XCreateWindow.html\" title=\"link\" target=\"_blank\">here</a>. \"0, 0, 10, 10\" specifies the top-left corner (0,0) and the width and height of the window (10, 10). Since the goal of this is to be used for off-screen rendering, the size of the window has no effect on the rendering.\r\nLine 202 specifies the window title.\r\n\r\nIf everything goes successfully, you should see an output like this:\r\n<pre>\r\nglContext.hpp:307: GL Version  = 4.4.0 NVIDIA 331.75\r\nglContext.hpp:308: GL Vendor   = NVIDIA Corporation\r\nglContext.hpp:309: GL Renderer = Quadro K5000/PCIe/SSE2\r\nglContext.hpp:310: GL Shader   = 4.40 NVIDIA via Cg compiler\r\n</pre>\r\n\r\nIf you wish to use a lower minimum version, say 3.0, then the version provided by the output will reflect 3.0 since GL fetches version from the context.\r\n\r\nTo test the context creation as a stand alone, create a cpp file with the following contents (<a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.cpp\" title=\"glContext.cpp\" target=\"_blank\">glContext.cpp</a>):\r\n<pre>\r\n#include \"glContext.hpp\"\r\n\r\nint main(int argc, char* argv[])\r\n{\r\n    createGLContext();\r\n    deleteGLContext();\r\n    return 0;\r\n}\r\n</pre>\r\n\r\nCompile this with <strong>g++ -o gl glContext.cpp -lGL -lX11</strong> and run with <strong>./gl</strong> (make sure DISPLAY is :0). If this works successfully, any off-screen rendering code will work perfectly with this.\r\n<strong>Note:</strong> If you use GLEW, make sure you include glew.h before including gl.h.\r\n\r\nIf you wish to know about remote OpenGL further or work with us on remote rendering, contact us at <a href=\"mailto:technical@arrayfire.com\" >technical@arrayfire.com</a>.\r\n\r\nLinks:\r\nOpenGL Context Creation Tutorial:<a href=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" title=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" target=\"_blank\"></a>\r\nArrayFire glContext repo on Github: <a href=\"https://github.com/arrayfire/glContext\" title=\"https://github.com/arrayfire/glContext\" target=\"_blank\"></a>','Remote Off-Screen Rendering with OpenGL 4.4 over SSH','','inherit','open','open','','6054-revision-v1','','','2014-07-02 19:32:38','2014-07-02 19:32:38','',6054,'http://sandbox.arrayfire.com/6054-revision-v1/',0,'revision','',0),(6076,11,'2014-07-02 19:37:38','2014-07-02 19:37:38','At ArrayFire, we constantly encounter projects that require OpenGL and run on a remote server that does not have a display.\r\nIn this blog, we have compiled a list of steps that users can use to run OpenGL full profile applications over SSH on remote systems without a display.\r\n\r\nA few notes before we get started.\r\n<ul>\r\n	<li>The first part of the blog that shows the configuration of the xorg.conf file it limited to NVIDIA Quadro and Tesla cards (with display).</li>\r\n	<li>NVIDIA GeForce cards do not support this functionality.</li>\r\n	<li>AMD cards support this capability without the modification of xorg.conf file.</li>\r\n</ul>\r\n\r\n<strong>Requirements</strong>:\r\nTo run the tool, you will need libGL.so, libX11.so. Another tool I would recommend strongly is glewinfo. Most linux distributions ship this with the glew-utils package. An alternate to glewinfo is glxinfo which is present on all systems with X. You can substitute glewinfo with glxinfo in all the commands below if needed.\r\n\r\n<strong>Part 1: Setting up X (NVIDIA Only)</strong>\r\nTo get X to run on NVIDIA cards, we need to make a small change to the xorg.conf file. Before making the change, make sure you create a back up of the current version on your system.\r\nOpen xorg.conf (located in /etc/X11/xorg.conf). Look for \"Section Device\". You NVIDIA card should be listed here. Add this line before the end of the section: <code>Option         \"UseDisplayDevice\" \"none\"</code>. If you have more than one NVIDIA card listed, add this line to all the cards. After adding the line, the section should look similar to\r\n<pre>\r\nSection \"Device\"\r\n    Identifier     \"Device0\"\r\n    Driver         \"nvidia\"\r\n    VendorName     \"NVIDIA Corporation\"\r\n    Option         \"UseDisplayDevice\" \"none\"\r\nEndSection\r\n</pre>\r\nSave and close the file and restart the system.\r\n\r\n<strong>Part 2: Login and Initial Diagnosis</strong>\r\nLogin to the remote system using the -X flag. That is, <code>ssh -X user@remote</code>.\r\nOnce logged in, run <code>echo $DISPLAY</code>. It is very likely that the output of this will be <strong>localhost:10.0</strong>. This specifies the display device is the client computer. If you have glewinfo installed, run it using <code>glewinfo | less</code>. You should see the graphics card from you local machine listed there, and perhaps OpenGL 2.x.\r\n\r\nIf you have glewinfo installed, run the following command:\r\n<code>env DISPLAY=:0 glewinfo | less</code>.\r\nThe goal of this command is to run glewinfo having temporarily set DISPLAY to :0 (remote system). If this command run\'s successfully, you should be able to see the graphics card on the remote system along with the full OpenGL profile. And now you are ready to deploy applications using X.\r\nIf you want to set DISPLAY for the entire session, run <code>export DISPLAY=:0</code>\r\n\r\n<strong>Part 3: Deploying Off-Screen Rendering Applications on Remote System</strong>\r\nThis is where X becomes crucial. Tools like GLFW may or may not work on remote systems because of dependence on Xrandr and other software. The trick is use X to create an OpenGL context, and the run everything using off-screen rendering using framebuffers and renderbuffers. I took the source to create an OpenGL context using X from <a href=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" title=\"OpenGL Context Creation Page\" target=\"_blank\"></a> and modified it slighly. Thanks to the folks at OpenGL.org for providing this. The source code with the changes I made can be found here: <a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.hpp\" target=\"_blank\">glContext.hpp</a>.\r\n\r\nInclude this in your source code. To create context run createGLContext() and to delete the context run deleteGLContext().\r\n\r\nI have specified that the minimum OpenGL version should be 4.4 with forward context enabled. You can modify this version by changing the values at lines 26 and 27.\r\nThe forward compatibility can be disabled at line 241 by changing line 241 to None.\r\nIf the application fails to create the specified version of the context, the application will exit.\r\n\r\nAt line 189, we create the window. The API description can be found <a href=\"http://tronche.com/gui/x/xlib/window/XCreateWindow.html\" title=\"link\" target=\"_blank\">here</a>. \"0, 0, 10, 10\" specifies the top-left corner (0,0) and the width and height of the window (10, 10). Since the goal of this is to be used for off-screen rendering, the size of the window has no effect on the rendering.\r\nLine 202 specifies the window title.\r\n\r\nIf everything goes successfully, you should see an output like this:\r\n<pre>\r\nglContext.hpp:307: GL Version  = 4.4.0 NVIDIA 331.75\r\nglContext.hpp:308: GL Vendor   = NVIDIA Corporation\r\nglContext.hpp:309: GL Renderer = Quadro K5000/PCIe/SSE2\r\nglContext.hpp:310: GL Shader   = 4.40 NVIDIA via Cg compiler\r\n</pre>\r\n\r\nIf you wish to use a lower minimum version, say 3.0, then the version provided by the output will reflect 3.0 since GL fetches version from the context.\r\n\r\nTo test the context creation as a stand alone, create a cpp file with the following contents (<a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.cpp\" title=\"glContext.cpp\" target=\"_blank\">glContext.cpp</a>):\r\n<pre>\r\n#include \"glContext.hpp\"\r\n\r\nint main(int argc, char* argv[])\r\n{\r\n    createGLContext();\r\n    deleteGLContext();\r\n    return 0;\r\n}\r\n</pre>\r\n\r\nCompile this with <strong>g++ -o gl glContext.cpp -lGL -lX11</strong> and run with <strong>./gl</strong> (make sure DISPLAY is :0). If this works successfully, any off-screen rendering code will work perfectly with this.\r\n<strong>Note:</strong> If you use GLEW, make sure you include glew.h before including gl.h.\r\n\r\nIf you wish to know about remote OpenGL further or work with us on remote rendering, contact us at <a href=\"mailto:technical@arrayfire.com\" >technical@arrayfire.com</a>.\r\n\r\nLinks:\r\nOpenGL Context Creation Tutorial:<a href=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" title=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" target=\"_blank\">http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)</a>\r\nArrayFire glContext repo on Github: <a href=\"https://github.com/arrayfire/glContext\" title=\"https://github.com/arrayfire/glContext\" target=\"_blank\">https://github.com/arrayfire/glContext</a>','Remote Off-Screen Rendering with OpenGL 4.4 over SSH','','inherit','open','open','','6054-revision-v1','','','2014-07-02 19:37:38','2014-07-02 19:37:38','',6054,'http://sandbox.arrayfire.com/6054-revision-v1/',0,'revision','',0),(6077,11,'2014-07-02 19:38:07','2014-07-02 19:38:07','At ArrayFire, we constantly encounter projects that require OpenGL and run on a remote server that does not have a display.\r\nIn this blog, we have compiled a list of steps that users can use to run OpenGL full profile applications over SSH on remote systems without a display.\r\n\r\nA few notes before we get started.\r\n<ul>\r\n	<li>The first part of the blog that shows the configuration of the xorg.conf file it limited to NVIDIA Quadro and Tesla cards (with display).</li>\r\n	<li>NVIDIA GeForce cards do not support this functionality.</li>\r\n	<li>AMD cards support this capability without the modification of xorg.conf file.</li>\r\n</ul>\r\n\r\n<strong>Requirements</strong>:\r\nTo run the tool, you will need libGL.so, libX11.so. Another tool I would recommend strongly is glewinfo. Most linux distributions ship this with the glew-utils package. An alternate to glewinfo is glxinfo which is present on all systems with X. You can substitute glewinfo with glxinfo in all the commands below if needed.\r\n\r\n<strong>Part 1: Setting up X (NVIDIA Only)</strong>\r\nTo get X to run on NVIDIA cards, we need to make a small change to the xorg.conf file. Before making the change, make sure you create a back up of the current version on your system.\r\nOpen xorg.conf (located in /etc/X11/xorg.conf). Look for \"Section Device\". You NVIDIA card should be listed here. Add this line before the end of the section: <code>Option         \"UseDisplayDevice\" \"none\"</code>. If you have more than one NVIDIA card listed, add this line to all the cards. After adding the line, the section should look similar to\r\n<pre>\r\nSection \"Device\"\r\n    Identifier     \"Device0\"\r\n    Driver         \"nvidia\"\r\n    VendorName     \"NVIDIA Corporation\"\r\n    Option         \"UseDisplayDevice\" \"none\"\r\nEndSection\r\n</pre>\r\nSave and close the file and restart the system.\r\n\r\n<strong>Part 2: Login and Initial Diagnosis</strong>\r\nLogin to the remote system using the -X flag. That is, <code>ssh -X user@remote</code>.\r\nOnce logged in, run <code>echo $DISPLAY</code>. It is very likely that the output of this will be <strong>localhost:10.0</strong>. This specifies the display device is the client computer. If you have glewinfo installed, run it using <code>glewinfo | less</code>. You should see the graphics card from you local machine listed there, and perhaps OpenGL 2.x.\r\n\r\nIf you have glewinfo installed, run the following command:\r\n<code>env DISPLAY=:0 glewinfo | less</code>.\r\nThe goal of this command is to run glewinfo having temporarily set DISPLAY to :0 (remote system). If this command run\'s successfully, you should be able to see the graphics card on the remote system along with the full OpenGL profile. And now you are ready to deploy applications using X.\r\nIf you want to set DISPLAY for the entire session, run <code>export DISPLAY=:0</code>\r\n\r\n<strong>Part 3: Deploying Off-Screen Rendering Applications on Remote System</strong>\r\nThis is where X becomes crucial. Tools like GLFW may or may not work on remote systems because of dependence on Xrandr and other software. The trick is use X to create an OpenGL context, and the run everything using off-screen rendering using framebuffers and renderbuffers. I took the source to create an OpenGL context using X from <a href=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" title=\"OpenGL Context Creation Page\" target=\"_blank\"></a> and modified it slighly. Thanks to the folks at OpenGL.org for providing this. The source code with the changes I made can be found here: <a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.hpp\" target=\"_blank\">glContext.hpp</a>.\r\n\r\nInclude this in your source code. To create context run createGLContext() and to delete the context run deleteGLContext().\r\n\r\nI have specified that the minimum OpenGL version should be 4.4 with forward context enabled. You can modify this version by changing the values at lines 26 and 27.\r\nThe forward compatibility can be disabled at line 241 by changing line 241 to None.\r\nIf the application fails to create the specified version of the context, the application will exit.\r\n\r\nAt line 189, we create the window. The API description can be found <a href=\"http://tronche.com/gui/x/xlib/window/XCreateWindow.html\" title=\"link\" target=\"_blank\">here</a>. \"0, 0, 10, 10\" specifies the top-left corner (0,0) and the width and height of the window (10, 10). Since the goal of this is to be used for off-screen rendering, the size of the window has no effect on the rendering.\r\nLine 202 specifies the window title.\r\n\r\nIf everything goes successfully, you should see an output like this:\r\n<pre>\r\nglContext.hpp:307: GL Version  = 4.4.0 NVIDIA 331.75\r\nglContext.hpp:308: GL Vendor   = NVIDIA Corporation\r\nglContext.hpp:309: GL Renderer = Quadro K5000/PCIe/SSE2\r\nglContext.hpp:310: GL Shader   = 4.40 NVIDIA via Cg compiler\r\n</pre>\r\n\r\nIf you wish to use a lower minimum version, say 3.0, then the version provided by the output will reflect 3.0 since GL fetches version from the context.\r\n\r\nTo test the context creation as a stand alone, create a cpp file with the following contents (<a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.cpp\" title=\"glContext.cpp\" target=\"_blank\">glContext.cpp</a>):\r\n<pre>\r\n#include \"glContext.hpp\"\r\n\r\nint main(int argc, char* argv[])\r\n{\r\n    createGLContext();\r\n    deleteGLContext();\r\n    return 0;\r\n}\r\n</pre>\r\n\r\nCompile this with <strong>g++ -o gl glContext.cpp -lGL -lX11</strong> and run with <strong>./gl</strong> (make sure DISPLAY is :0). If this works successfully, any off-screen rendering code will work perfectly with this.\r\n<strong>Note:</strong> If you use GLEW, make sure you include glew.h before including gl.h.\r\n\r\nIf you wish to know about remote OpenGL further or work with us on remote rendering, contact us at <a href=\"mailto:technical@arrayfire.com\" >technical@arrayfire.com</a>.\r\n\r\nLinks:\r\nOpenGL Context Creation Tutorial: <a href=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" title=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" target=\"_blank\">http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)</a>\r\nArrayFire glContext repo on Github: <a href=\"https://github.com/arrayfire/glContext\" title=\"https://github.com/arrayfire/glContext\" target=\"_blank\">https://github.com/arrayfire/glContext</a>','Remote Off-Screen Rendering with OpenGL 4.4 over SSH','','inherit','open','open','','6054-revision-v1','','','2014-07-02 19:38:07','2014-07-02 19:38:07','',6054,'http://sandbox.arrayfire.com/6054-revision-v1/',0,'revision','',0),(6080,11,'2014-07-09 17:25:12','2014-07-09 17:25:12','At ArrayFire, we constantly encounter projects that require OpenGL and run on a remote server that does not have a display.\r\nIn this blog, we have compiled a list of steps that users can use to run OpenGL full profile applications over SSH on remote systems without a display.\r\n\r\nA few notes before we get started.\r\n<ul>\r\n	<li>The first part of the blog that shows the configuration of the xorg.conf file it limited to NVIDIA cards (with display).</li>\r\n	<li>AMD cards support this capability without the modification of xorg.conf file. However, we have not been able to get a comprehensive list of supported devices.</li>\r\n</ul>\r\n\r\n<strong>Requirements</strong>:\r\nYou will need access to the remote system over SSH.\r\nTo run the tool, you will need libGL.so, libX11.so. Another tool I would recommend strongly is glewinfo. Most linux distributions ship this with the glew-utils package. An alternate to glewinfo is glxinfo which is present on all systems with X. You can substitute glewinfo with glxinfo in all the commands below if needed.\r\n\r\n<strong>Part 1: Setting up X (NVIDIA Only)</strong>\r\nTo get X to run on NVIDIA cards, we need to make a changes to the xorg.conf file. Before making the change, make sure you create a back up of the current version on your system (name it xorg.conf.stable).\r\nYou can find a sample xorg.conf file <a href=\"https://github.com/arrayfire/glContext/blob/master/xorg.conf\" title=\"xorg.conf\" target=\"_blank\">here</a>. The sample file is for a NVIDIA GTX 690. The specific thing to notice is the use of \"UseDisplayDevice\" option and the \"Virtual\" option under SubSection Display. You can use parts of this file to configure your own config file. Make sure the options listed in the sample file get listed in your config file as well.\r\nSave and close the file.\r\n\r\nNow run this command\" <code># nvidia-xconfig -a --use-display-device=None --virtual=1280x1024</code>\r\n\r\nRestart the system.\r\n\r\nOn restart, run the command <code># /usr/bin/X :0 &</code>. Ideally, this command should give an output similar to:\r\n<pre>\r\nX.Org X Server 1.13.0\r\nRelease Date: 2012-09-05\r\nX Protocol Version 11, Revision 0\r\n\r\n<Some more output here>\r\n\r\nLoading extension GLX                                                                                                                                                                                         Loading extension NV-GLX\r\nLoading extension NV-CONTROL\r\n</pre>\r\n\r\nThis means X has started successfully on the virtual display.\r\nIf it fails, restart the system and try a few more times. You can also look at /var/log/Xorg.0.log for the log of the failure.\r\nTo abort trying this, just copy xorg.conf.stable back to xorg.conf and restart.\r\n\r\n<strong>Part 2: Initial Diagnosis</strong>\r\nOnce X has started successfully, run <code>echo $DISPLAY</code>. It is very likely that the output of this will be empty.\r\n\r\nIf you have glewinfo installed, run the following command:\r\n<code>env DISPLAY=:0 glewinfo | less</code>.\r\nThe goal of this command is to run glewinfo having temporarily set DISPLAY to :0 (remote system). If this command run\'s successfully, you should be able to see the graphics card on the remote system along with the full OpenGL profile. And now you are ready to deploy applications using X.\r\nIf you want to set DISPLAY for the entire session, run <code>export DISPLAY=:0</code>\r\n\r\n<strong>Part 3: Deploying Off-Screen Rendering Applications on Remote System</strong>\r\nThis is where X becomes crucial. Tools like GLFW may or may not work on remote systems because of their dependence on Xrandr and other software. The trick is use X to create an OpenGL context, and the run everything using off-screen rendering using framebuffers and renderbuffers. I took the source to create an OpenGL context using X from <a href=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" title=\"OpenGL Context Creation Page\" target=\"_blank\"></a> and modified it slighly. Thanks to the folks at OpenGL.org for providing this. The source code with the changes I made can be found here: <a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.hpp\" target=\"_blank\">glContext.hpp</a>.\r\n\r\nInclude this in your source code. To create context run createGLContext() and to delete the context run deleteGLContext().\r\n\r\nI have specified that the minimum OpenGL version should be 4.4 with forward context enabled. You can modify this version by changing the values at lines 26 and 27.\r\nThe forward compatibility can be disabled at line 241 by changing line 241 to None.\r\nIf the application fails to create the specified version of the context, the application will exit.\r\n\r\nAt line 189, we create the window. The API description can be found <a href=\"http://tronche.com/gui/x/xlib/window/XCreateWindow.html\" title=\"link\" target=\"_blank\">here</a>. \"0, 0, 10, 10\" specifies the top-left corner (0,0) and the width and height of the window (10, 10). Since the goal of this is to be used for off-screen rendering, the size of the window has no effect on the rendering.\r\nLine 202 specifies the window title.\r\n\r\nIf everything goes successfully, you should see an output like this:\r\n<pre>\r\nglContext.hpp:297: GL Version  = 4.4.0 NVIDIA 331.79\r\nglContext.hpp:298: GL Vendor   = NVIDIA Corporation\r\nglContext.hpp:299: GL Renderer = GeForce GTX 690/PCIe/SSE2\r\nglContext.hpp:300: GL Shader   = 4.40 NVIDIA via Cg compiler\r\n</pre>\r\n\r\nIf you wish to use a lower minimum version, say 3.0, then the version provided by the output will reflect 3.0 since GL fetches version from the context.\r\n\r\nTo test the context creation as a stand alone, create a cpp file with the following contents (<a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.cpp\" title=\"glContext.cpp\" target=\"_blank\">glContext.cpp</a>):\r\n<pre>\r\n#include \"glContext.hpp\"\r\n\r\nint main(int argc, char* argv[])\r\n{\r\n    createGLContext();\r\n    deleteGLContext();\r\n    return 0;\r\n}\r\n</pre>\r\n\r\nCompile this with <strong>g++ -o gl glContext.cpp -lGL -lX11</strong> and run with <strong>./gl</strong> (make sure DISPLAY is :0). If this works successfully, any off-screen rendering code will work perfectly with this.\r\n<strong>Note:</strong> If you use GLEW, make sure you include glew.h before including gl.h.\r\n\r\nIf you wish to know about remote OpenGL further or work with us on remote rendering, contact us at <a href=\"mailto:technical@arrayfire.com\" >technical@arrayfire.com</a>.\r\n\r\nLinks:\r\nOpenGL Context Creation Tutorial: <a href=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" title=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" target=\"_blank\">http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)</a>\r\nArrayFire glContext repo on Github: <a href=\"https://github.com/arrayfire/glContext\" title=\"https://github.com/arrayfire/glContext\" target=\"_blank\">https://github.com/arrayfire/glContext</a>','Remote Off-Screen Rendering with OpenGL 4.4 over SSH','','inherit','open','open','','6054-revision-v1','','','2014-07-09 17:25:12','2014-07-09 17:25:12','',6054,'http://sandbox.arrayfire.com/6054-revision-v1/',0,'revision','',0),(6081,11,'2014-07-09 18:32:31','2014-07-09 18:32:31','At ArrayFire, we constantly encounter projects that require OpenGL and run on a remote server that does not have a display.\r\nIn this blog, we have compiled a list of steps that users can use to run OpenGL full profile applications over SSH on remote systems without a display.\r\n\r\nA few notes before we get started.\r\n<ul>\r\n	<li>The first part of the blog that shows the configuration of the xorg.conf file it limited to NVIDIA cards (with display).</li>\r\n	<li>AMD cards support this capability without the modification of xorg.conf file. However, we have not been able to get a comprehensive list of supported devices.</li>\r\n</ul>\r\n\r\n<strong>Requirements</strong>:\r\nYou will need access to the remote system over SSH.\r\nTo run the tool, you will need libGL.so, libX11.so. Another tool I would recommend strongly is glewinfo. Most linux distributions ship this with the glew-utils package. An alternate to glewinfo is glxinfo which is present on all systems with X. You can substitute glewinfo with glxinfo in all the commands below if needed.\r\n\r\n<strong>Part 1: Setting up X (NVIDIA Only)</strong>\r\nTo get X to run on NVIDIA cards, we need to make a changes to the xorg.conf file. Before making the change, make sure you create a back up of the current version on your system (name it xorg.conf.stable).\r\nYou can find a sample xorg.conf file <a href=\"https://github.com/arrayfire/glContext/blob/master/xorg.conf\" title=\"xorg.conf\" target=\"_blank\">here</a>. The sample file is for a NVIDIA GTX 690. The specific thing to notice is the use of \"UseDisplayDevice\" option and the \"Virtual\" option under SubSection Display. You can use parts of this file to configure your own config file. Make sure the options listed in the sample file get listed in your config file as well.\r\nSave and close the file.\r\n\r\nNow run this command\" <code># nvidia-xconfig -a --use-display-device=None --virtual=1280x1024</code>\r\nRestart the system.\r\n\r\n<strong>Note:</strong> To abort trying this, just copy xorg.conf.stable back to xorg.conf and restart.\r\n\r\n<strong>Part 2: Start X (NVIDIA GeForce Only)</strong>\r\n\r\nThe following is only for GeForce cards. Quadro and Tesla cards can skip to Part 3.\r\n\r\nOn restart, run the command <code># /usr/bin/X :0 &</code>. Ideally, this command should give an output similar to:\r\n<pre>\r\nX.Org X Server 1.13.0\r\nRelease Date: 2012-09-05\r\nX Protocol Version 11, Revision 0\r\n\r\n<Some more output here>\r\n\r\nLoading extension GLX                                                                                                                                                                                         Loading extension NV-GLX\r\nLoading extension NV-CONTROL\r\n</pre>\r\n\r\nThis means X has started successfully on the virtual display.\r\nIf it fails, restart the system and try a few more times. You can also look at /var/log/Xorg.0.log for the log of the failure.\r\n\r\n<strong>Part 3: Initial Diagnosis</strong>\r\nOnce X has started successfully, run <code>echo $DISPLAY</code>. It is very likely that the output of this will be empty.\r\n\r\nIf you have glewinfo installed, run the following command:\r\n<code>env DISPLAY=:0 glewinfo | less</code>.\r\nThe goal of this command is to run glewinfo having temporarily set DISPLAY to :0 (remote system). If this command run\'s successfully, you should be able to see the graphics card on the remote system along with the full OpenGL profile. And now you are ready to deploy applications using X.\r\nIf this command fails for Quadro and Tesla cards, run the section in Part 2.\r\n\r\nIf you want to set DISPLAY for the entire session, run <code>export DISPLAY=:0</code>\r\n\r\n<strong>Part 3: Deploying Off-Screen Rendering Applications on Remote System</strong>\r\nThis is where X becomes crucial. Tools like GLFW may or may not work on remote systems because of their dependence on Xrandr and other software. The trick is use X to create an OpenGL context, and the run everything using off-screen rendering using framebuffers and renderbuffers. I took the source to create an OpenGL context using X from <a href=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" title=\"OpenGL Context Creation Page\" target=\"_blank\"></a> and modified it slighly. Thanks to the folks at OpenGL.org for providing this. The source code with the changes I made can be found here: <a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.hpp\" target=\"_blank\">glContext.hpp</a>.\r\n\r\nInclude this in your source code. To create context run createGLContext() and to delete the context run deleteGLContext().\r\n\r\nI have specified that the minimum OpenGL version should be 4.4 with forward context enabled. You can modify this version by changing the values at lines 26 and 27.\r\nThe forward compatibility can be disabled at line 241 by changing line 241 to None.\r\nIf the application fails to create the specified version of the context, the application will exit.\r\n\r\nAt line 189, we create the window. The API description can be found <a href=\"http://tronche.com/gui/x/xlib/window/XCreateWindow.html\" title=\"link\" target=\"_blank\">here</a>. \"0, 0, 10, 10\" specifies the top-left corner (0,0) and the width and height of the window (10, 10). Since the goal of this is to be used for off-screen rendering, the size of the window has no effect on the rendering.\r\nLine 202 specifies the window title.\r\n\r\nIf everything goes successfully, you should see an output like this:\r\n<pre>\r\nglContext.hpp:297: GL Version  = 4.4.0 NVIDIA 331.79\r\nglContext.hpp:298: GL Vendor   = NVIDIA Corporation\r\nglContext.hpp:299: GL Renderer = GeForce GTX 690/PCIe/SSE2\r\nglContext.hpp:300: GL Shader   = 4.40 NVIDIA via Cg compiler\r\n</pre>\r\n\r\nIf you wish to use a lower minimum version, say 3.0, then the version provided by the output will reflect 3.0 since GL fetches version from the context.\r\n\r\nTo test the context creation as a stand alone, create a cpp file with the following contents (<a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.cpp\" title=\"glContext.cpp\" target=\"_blank\">glContext.cpp</a>):\r\n<pre>\r\n#include \"glContext.hpp\"\r\n\r\nint main(int argc, char* argv[])\r\n{\r\n    createGLContext();\r\n    deleteGLContext();\r\n    return 0;\r\n}\r\n</pre>\r\n\r\nCompile this with <strong>g++ -o gl glContext.cpp -lGL -lX11</strong> and run with <strong>./gl</strong> (make sure DISPLAY is :0). If this works successfully, any off-screen rendering code will work perfectly with this.\r\n<strong>Note:</strong> If you use GLEW, make sure you include glew.h before including gl.h.\r\n\r\nIf you wish to know about remote OpenGL further or work with us on remote rendering, contact us at <a href=\"mailto:technical@arrayfire.com\" >technical@arrayfire.com</a>.\r\n\r\nLinks:\r\nOpenGL Context Creation Tutorial: <a href=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" title=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" target=\"_blank\">http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)</a>\r\nArrayFire glContext repo on Github: <a href=\"https://github.com/arrayfire/glContext\" title=\"https://github.com/arrayfire/glContext\" target=\"_blank\">https://github.com/arrayfire/glContext</a>','Remote Off-Screen Rendering with OpenGL 4.4 over SSH','','inherit','open','open','','6054-revision-v1','','','2014-07-09 18:32:31','2014-07-09 18:32:31','',6054,'http://sandbox.arrayfire.com/6054-revision-v1/',0,'revision','',0),(6082,11,'2014-07-09 18:33:12','2014-07-09 18:33:12','At ArrayFire, we constantly encounter projects that require OpenGL and run on a remote server that does not have a display.\r\nIn this blog, we have compiled a list of steps that users can use to run OpenGL full profile applications over SSH on remote systems without a display.\r\n\r\nA few notes before we get started.\r\n<ul>\r\n	<li>The first part of the blog that shows the configuration of the xorg.conf file it limited to NVIDIA cards (with display).</li>\r\n	<li>AMD cards support this capability without the modification of xorg.conf file. However, we have not been able to get a comprehensive list of supported devices.</li>\r\n</ul>\r\n\r\n<strong>Requirements</strong>:\r\nYou will need access to the remote system over SSH.\r\nTo run the tool, you will need libGL.so, libX11.so. Another tool I would recommend strongly is glewinfo. Most linux distributions ship this with the glew-utils package. An alternate to glewinfo is glxinfo which is present on all systems with X. You can substitute glewinfo with glxinfo in all the commands below if needed.\r\n\r\n<strong>Part 1: Setting up X (NVIDIA Only)</strong>\r\nTo get X to run on NVIDIA cards, we need to make a changes to the xorg.conf file. Before making the change, make sure you create a back up of the current version on your system (name it xorg.conf.stable).\r\nYou can find a sample xorg.conf file <a href=\"https://github.com/arrayfire/glContext/blob/master/xorg.conf\" title=\"xorg.conf\" target=\"_blank\">here</a>. The sample file is for a NVIDIA GTX 690. The specific thing to notice is the use of \"UseDisplayDevice\" option and the \"Virtual\" option under SubSection Display. You can use parts of this file to configure your own config file. Make sure the options listed in the sample file get listed in your config file as well.\r\nSave and close the file.\r\n\r\nNow run this command\" <code># nvidia-xconfig -a --use-display-device=None --virtual=1280x1024</code>\r\nRestart the system.\r\n\r\n<strong>Note:</strong> To abort trying this, just copy xorg.conf.stable back to xorg.conf and restart.\r\n\r\n<strong>Part 2: Start X (NVIDIA GeForce Only)</strong>\r\n\r\nThe following is only for GeForce cards. Quadro and Tesla cards can skip to Part 3.\r\n\r\nOn restart, run the command <code># /usr/bin/X :0 &</code>. Ideally, this command should give an output similar to:\r\n<pre>\r\nX.Org X Server 1.13.0\r\nRelease Date: 2012-09-05\r\nX Protocol Version 11, Revision 0\r\n\r\n<Some more output here>\r\n\r\nLoading extension GLX\r\nLoading extension NV-GLX\r\nLoading extension NV-CONTROL\r\n</pre>\r\n\r\nThis means X has started successfully on the virtual display.\r\nIf it fails, restart the system and try a few more times. You can also look at /var/log/Xorg.0.log for the log of the failure.\r\n\r\n<strong>Part 3: Initial Diagnosis</strong>\r\nOnce X has started successfully, run <code>echo $DISPLAY</code>. It is very likely that the output of this will be empty.\r\n\r\nIf you have glewinfo installed, run the following command:\r\n<code>env DISPLAY=:0 glewinfo | less</code>.\r\nThe goal of this command is to run glewinfo having temporarily set DISPLAY to :0 (remote system). If this command run\'s successfully, you should be able to see the graphics card on the remote system along with the full OpenGL profile. And now you are ready to deploy applications using X.\r\nIf this command fails for Quadro and Tesla cards, run the section in Part 2.\r\n\r\nIf you want to set DISPLAY for the entire session, run <code>export DISPLAY=:0</code>\r\n\r\n<strong>Part 3: Deploying Off-Screen Rendering Applications on Remote System</strong>\r\nThis is where X becomes crucial. Tools like GLFW may or may not work on remote systems because of their dependence on Xrandr and other software. The trick is use X to create an OpenGL context, and the run everything using off-screen rendering using framebuffers and renderbuffers. I took the source to create an OpenGL context using X from <a href=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" title=\"OpenGL Context Creation Page\" target=\"_blank\"></a> and modified it slighly. Thanks to the folks at OpenGL.org for providing this. The source code with the changes I made can be found here: <a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.hpp\" target=\"_blank\">glContext.hpp</a>.\r\n\r\nInclude this in your source code. To create context run createGLContext() and to delete the context run deleteGLContext().\r\n\r\nI have specified that the minimum OpenGL version should be 4.4 with forward context enabled. You can modify this version by changing the values at lines 26 and 27.\r\nThe forward compatibility can be disabled at line 241 by changing line 241 to None.\r\nIf the application fails to create the specified version of the context, the application will exit.\r\n\r\nAt line 189, we create the window. The API description can be found <a href=\"http://tronche.com/gui/x/xlib/window/XCreateWindow.html\" title=\"link\" target=\"_blank\">here</a>. \"0, 0, 10, 10\" specifies the top-left corner (0,0) and the width and height of the window (10, 10). Since the goal of this is to be used for off-screen rendering, the size of the window has no effect on the rendering.\r\nLine 202 specifies the window title.\r\n\r\nIf everything goes successfully, you should see an output like this:\r\n<pre>\r\nglContext.hpp:297: GL Version  = 4.4.0 NVIDIA 331.79\r\nglContext.hpp:298: GL Vendor   = NVIDIA Corporation\r\nglContext.hpp:299: GL Renderer = GeForce GTX 690/PCIe/SSE2\r\nglContext.hpp:300: GL Shader   = 4.40 NVIDIA via Cg compiler\r\n</pre>\r\n\r\nIf you wish to use a lower minimum version, say 3.0, then the version provided by the output will reflect 3.0 since GL fetches version from the context.\r\n\r\nTo test the context creation as a stand alone, create a cpp file with the following contents (<a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.cpp\" title=\"glContext.cpp\" target=\"_blank\">glContext.cpp</a>):\r\n<pre>\r\n#include \"glContext.hpp\"\r\n\r\nint main(int argc, char* argv[])\r\n{\r\n    createGLContext();\r\n    deleteGLContext();\r\n    return 0;\r\n}\r\n</pre>\r\n\r\nCompile this with <strong>g++ -o gl glContext.cpp -lGL -lX11</strong> and run with <strong>./gl</strong> (make sure DISPLAY is :0). If this works successfully, any off-screen rendering code will work perfectly with this.\r\n<strong>Note:</strong> If you use GLEW, make sure you include glew.h before including gl.h.\r\n\r\nIf you wish to know about remote OpenGL further or work with us on remote rendering, contact us at <a href=\"mailto:technical@arrayfire.com\" >technical@arrayfire.com</a>.\r\n\r\nLinks:\r\nOpenGL Context Creation Tutorial: <a href=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" title=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" target=\"_blank\">http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)</a>\r\nArrayFire glContext repo on Github: <a href=\"https://github.com/arrayfire/glContext\" title=\"https://github.com/arrayfire/glContext\" target=\"_blank\">https://github.com/arrayfire/glContext</a>','Remote Off-Screen Rendering with OpenGL 4.4 over SSH','','inherit','open','open','','6054-revision-v1','','','2014-07-09 18:33:12','2014-07-09 18:33:12','',6054,'http://sandbox.arrayfire.com/6054-revision-v1/',0,'revision','',0),(6083,11,'2014-07-09 18:37:06','2014-07-09 18:37:06','At ArrayFire, we constantly encounter projects that require OpenGL and run on a remote server that does not have a display.\r\nIn this blog, we have compiled a list of steps that users can use to run OpenGL full profile applications over SSH on remote systems without a display.\r\n\r\nA few notes before we get started.\r\n<ul>\r\n	<li>The first part of the blog that shows the configuration of the xorg.conf file it limited to NVIDIA cards (with display).</li>\r\n	<li>AMD cards support this capability without the modification of xorg.conf file. However, we have not been able to get a comprehensive list of supported devices.</li>\r\n</ul>\r\n\r\n<strong>Requirements</strong>:\r\nYou will need access to the remote system over SSH.\r\nTo run the tool, you will need libGL.so, libX11.so. Another tool I would recommend strongly is glewinfo. Most linux distributions ship this with the glew-utils package. An alternate to glewinfo is glxinfo which is present on all systems with X. You can substitute glewinfo with glxinfo in all the commands below if needed.\r\n\r\n<strong>Part 1: Setting up X (NVIDIA Only)</strong>\r\nTo get X to run on NVIDIA cards, we need to make a changes to the xorg.conf file. Before making the change, make sure you create a back up of the current version on your system (name it xorg.conf.stable).\r\nYou can find a sample xorg.conf file <a href=\"https://github.com/arrayfire/glContext/blob/master/xorg.conf\" title=\"xorg.conf\" target=\"_blank\">here</a>. The sample file is for a NVIDIA GTX 690. The specific thing to notice is the use of \"UseDisplayDevice\" option and the \"Virtual\" option under SubSection Display. You can use parts of this file to configure your own config file. Make sure the options listed in the sample file get listed in your config file as well.\r\nSave and close the file.\r\n\r\nNow run this command: <code># nvidia-xconfig -a --use-display-device=None --virtual=1280x1024</code>\r\nRestart the system.\r\n\r\n<strong>Note:</strong> To abort trying this, just copy xorg.conf.stable back to xorg.conf and restart.\r\n\r\n<strong>Part 2: Start X (NVIDIA GeForce Only)</strong>\r\n\r\nThe following is only for GeForce cards. Quadro and Tesla cards can skip to Part 3.\r\n\r\nOn restart, run the command <code># /usr/bin/X :0 &</code>. Ideally, this command should give an output similar to:\r\n<pre>\r\nX.Org X Server 1.13.0\r\nRelease Date: 2012-09-05\r\nX Protocol Version 11, Revision 0\r\n\r\n<Some more output here>\r\n\r\nLoading extension GLX\r\nLoading extension NV-GLX\r\nLoading extension NV-CONTROL\r\n</pre>\r\n\r\nThis means X has started successfully on the virtual display.\r\nIf it fails, restart the system and try again. You can also look at /var/log/Xorg.0.log for the log of the failure.\r\n\r\n<strong>Part 3: Initial Diagnosis</strong>\r\nOnce X has started successfully, run <code>echo $DISPLAY</code>. It is very likely that the output of this will be empty.\r\nIf you have glewinfo installed, run the following command <code>env DISPLAY=:0 glewinfo | less</code>.\r\nThe goal of this command is to run glewinfo having temporarily set DISPLAY to :0 (virtual display on remote system). If this command run\'s successfully, you should be able to see the graphics card on the remote system along with the full OpenGL profile. And now you are ready to deploy applications using X.\r\nIf this command fails for Quadro and Tesla cards, run the section in Part 2.\r\n\r\nIf you want to set DISPLAY for the entire session, run <code>export DISPLAY=:0</code>\r\n\r\n<strong>Part 4: Deploying Off-Screen Rendering Applications on Remote System</strong>\r\nThis is where X becomes crucial. Tools like GLFW may or may not work on remote systems because of their dependence on Xrandr and other software. The trick is use X to create an OpenGL context, and the run everything using off-screen rendering using framebuffers and renderbuffers. I took the source to create an OpenGL context using X from <a href=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" title=\"OpenGL Context Creation Page\" target=\"_blank\"></a> and modified it slighly. Thanks to the folks at OpenGL.org for providing this. The source code with the changes I made can be found here: <a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.hpp\" target=\"_blank\">glContext.hpp</a>.\r\n\r\nInclude this in your source code. To create context run createGLContext() and to delete the context run deleteGLContext().\r\n\r\nI have specified that the minimum OpenGL version should be 4.4 with forward context enabled. You can modify this version by changing the values at lines 26 and 27.\r\nThe forward compatibility can be disabled at line 241 by changing line 241 to None.\r\nIf the application fails to create the specified version of the context, the application will exit.\r\n\r\nAt line 189, we create the window. The API description can be found <a href=\"http://tronche.com/gui/x/xlib/window/XCreateWindow.html\" title=\"link\" target=\"_blank\">here</a>. \"0, 0, 10, 10\" specifies the top-left corner (0,0) and the width and height of the window (10, 10). Since the goal of this is to be used for off-screen rendering, the size of the window has no effect on the rendering.\r\nLine 202 specifies the window title.\r\n\r\nIf everything goes successfully, you should see an output like this:\r\n<pre>\r\nglContext.hpp:297: GL Version  = 4.4.0 NVIDIA 331.79\r\nglContext.hpp:298: GL Vendor   = NVIDIA Corporation\r\nglContext.hpp:299: GL Renderer = GeForce GTX 690/PCIe/SSE2\r\nglContext.hpp:300: GL Shader   = 4.40 NVIDIA via Cg compiler\r\n</pre>\r\n\r\nIf you wish to use a lower minimum version, say 3.0, then the version provided by the output will reflect 3.0 since GL fetches version from the context.\r\n\r\nTo test the context creation as a stand alone, create a cpp file with the following contents (<a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.cpp\" title=\"glContext.cpp\" target=\"_blank\">glContext.cpp</a>):\r\n<pre>\r\n#include \"glContext.hpp\"\r\n\r\nint main(int argc, char* argv[])\r\n{\r\n    createGLContext();\r\n    deleteGLContext();\r\n    return 0;\r\n}\r\n</pre>\r\n\r\nCompile this with <strong>g++ -o gl glContext.cpp -lGL -lX11</strong> and run with <strong>./gl</strong> (make sure DISPLAY is :0). If this works successfully, any off-screen rendering code will work perfectly with this.\r\n<strong>Note:</strong> If you use GLEW, make sure you include glew.h before including gl.h.\r\n\r\nIf you wish to know about remote OpenGL further or work with us on remote rendering, contact us at <a href=\"mailto:technical@arrayfire.com\" >technical@arrayfire.com</a>.\r\n\r\nLinks:\r\nOpenGL Context Creation Tutorial: <a href=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" title=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" target=\"_blank\">http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)</a>\r\nArrayFire glContext repo on Github: <a href=\"https://github.com/arrayfire/glContext\" title=\"https://github.com/arrayfire/glContext\" target=\"_blank\">https://github.com/arrayfire/glContext</a>','Remote Off-Screen Rendering with OpenGL 4.4 over SSH','','inherit','open','open','','6054-revision-v1','','','2014-07-09 18:37:06','2014-07-09 18:37:06','',6054,'http://sandbox.arrayfire.com/6054-revision-v1/',0,'revision','',0),(6087,11,'2014-07-09 18:40:59','2014-07-09 18:40:59','At ArrayFire, we constantly encounter projects that require OpenGL and run on a remote server that does not have a display.\r\nIn this blog, we have compiled a list of steps that users can use to run OpenGL full profile applications over SSH on remote systems without a display.\r\n\r\nA few notes before we get started.\r\n<ul>\r\n	<li>The first part of the blog that shows the configuration of the xorg.conf file it limited to NVIDIA cards (with display).</li>\r\n	<li>AMD cards support this capability without the modification of xorg.conf file. However, we have not been able to get a comprehensive list of supported devices.</li>\r\n</ul>\r\n\r\n<strong>Requirements</strong>:\r\nYou will need access to the remote system over SSH.\r\nTo run the tool, you will need libGL.so, libX11.so. Another tool I would recommend strongly is glewinfo. Most linux distributions ship this with the glew-utils package. An alternate to glewinfo is glxinfo which is present on all systems with X. You can substitute glewinfo with glxinfo in all the commands below if needed.\r\n\r\n<strong>Part 1: Setting up X (NVIDIA Only)</strong>\r\nTo get X to run on NVIDIA cards, we need to make a changes to the xorg.conf file. Before making the change, make sure you create a back up of the current version on your system (name it xorg.conf.stable).\r\nYou can find a sample xorg.conf file <a href=\"https://github.com/arrayfire/glContext/blob/master/xorg.conf\" title=\"xorg.conf\" target=\"_blank\">here</a>. The sample file is for a NVIDIA GTX 690. The specific thing to notice is the use of \"UseDisplayDevice\" option and the \"Virtual\" option under SubSection Display. You can use parts of this file to configure your own config file. Make sure the options listed in the sample file get listed in your config file as well.\r\nSave and close the file.\r\n\r\nNow run this command: <code># nvidia-xconfig -a --use-display-device=None --virtual=1280x1024</code>\r\nRestart the system.\r\n\r\n<strong>Note:</strong> To abort trying this, just copy xorg.conf.stable back to xorg.conf and restart.\r\n\r\n<strong>Part 2: Start X (NVIDIA GeForce Only)</strong>\r\n\r\nThe following is only for GeForce cards. Quadro and Tesla cards can skip to Part 3.\r\n\r\nOn restart, run the command <code># /usr/bin/X :0 &</code>. Ideally, this command should give an output similar to:\r\n<pre>\r\nX.Org X Server 1.13.0\r\nRelease Date: 2012-09-05\r\nX Protocol Version 11, Revision 0\r\n\r\n<Some more output here>\r\n\r\nLoading extension GLX\r\nLoading extension NV-GLX\r\nLoading extension NV-CONTROL\r\n</pre>\r\n\r\nThis means X has started successfully on the virtual display.\r\nIf it fails, restart the system and try again. You can also look at /var/log/Xorg.0.log for the log of the failure.\r\n\r\n<strong>Part 3: Initial Diagnosis</strong>\r\nOnce X has started successfully, run <code>echo $DISPLAY</code>. It is very likely that the output of this will be empty.\r\nIf you have glewinfo installed, run the following command <code>env DISPLAY=:0 glewinfo | less</code>.\r\nThe goal of this command is to run glewinfo having temporarily set DISPLAY to :0 (virtual display on remote system). If this command run\'s successfully, you should be able to see the graphics card on the remote system along with the full OpenGL profile. And now you are ready to deploy applications using X.\r\nIf this command fails for Quadro and Tesla cards, run the section in Part 2.\r\n\r\nIf you want to set DISPLAY for the entire session, run <code>export DISPLAY=:0</code>\r\n\r\n<strong>Part 4: Deploying Off-Screen Rendering Applications on Remote System</strong>\r\nThis is where X becomes crucial. Tools like GLFW may or may not work on remote systems because of their dependence on Xrandr and other software. The trick is use X to create an OpenGL context, and the run everything using off-screen rendering using framebuffers and renderbuffers. I took the source to create an OpenGL context using X from <a href=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" title=\"OpenGL Context Creation Page\" target=\"_blank\"></a> and modified it slighly. Thanks to the folks at OpenGL.org for providing this. The source code with the changes I made can be found here: <a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.hpp\" target=\"_blank\">glContext.hpp</a>.\r\n\r\nInclude this in your source code. To create context run createGLContext() and to delete the context run deleteGLContext().\r\n\r\nI have specified that the minimum OpenGL version should be 4.4 with forward context enabled. You can modify this version by changing the values at lines 26 and 27.\r\nThe forward compatibility can be disabled at line 241 by changing line 241 to None.\r\nIf the application fails to create the specified version of the context, the application will exit.\r\n\r\nAt line 189, we create the window. The API description can be found <a href=\"http://tronche.com/gui/x/xlib/window/XCreateWindow.html\" title=\"link\" target=\"_blank\">here</a>. \"0, 0, 10, 10\" specifies the top-left corner (0,0) and the width and height of the window (10, 10). Since the goal of this is to be used for off-screen rendering, the size of the window has no effect on the rendering.\r\nLine 202 specifies the window title.\r\n\r\nIf everything goes successfully, you should see an output like this:\r\n<pre>\r\nglContext.hpp:297: GL Version  = 4.4.0 NVIDIA 331.79\r\nglContext.hpp:298: GL Vendor   = NVIDIA Corporation\r\nglContext.hpp:299: GL Renderer = GeForce GTX 690/PCIe/SSE2\r\nglContext.hpp:300: GL Shader   = 4.40 NVIDIA via Cg compiler\r\n</pre>\r\n\r\nIf you wish to use a lower minimum version, say 3.0, then the version provided by the output will reflect 3.0 since GL fetches version from the context.\r\n\r\nTo test the context creation as a stand alone, create a cpp file with the following contents (<a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.cpp\" title=\"glContext.cpp\" target=\"_blank\">glContext.cpp</a>):\r\n<pre>\r\n#include \"glContext.hpp\"\r\n\r\nint main(int argc, char* argv[])\r\n{\r\n    createGLContext();\r\n    deleteGLContext();\r\n    return 0;\r\n}\r\n</pre>\r\n\r\nCompile this with <strong>g++ -o gl glContext.cpp -lGL -lX11</strong> and run with <strong>./gl</strong> (make sure DISPLAY is :0). If this works successfully, any off-screen rendering code will work perfectly with this.\r\n<strong>Note:</strong> If you use GLEW, make sure you include glew.h before including gl.h.\r\n\r\nIf you wish to know about remote OpenGL further or work with us on remote rendering, contact us at <a href=\"mailto:technical@arrayfire.com\" >technical@arrayfire.com</a>.\r\n\r\nLinks:\r\nOpenGL Context Creation Tutorial: <a href=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" title=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" target=\"_blank\">http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)</a>\r\nArrayFire glContext repo on Github: <a href=\"https://github.com/arrayfire/glContext\" title=\"https://github.com/arrayfire/glContext\" target=\"_blank\">https://github.com/arrayfire/glContext</a>','Remote Off-Screen Rendering with OpenGL','','inherit','open','open','','6054-revision-v1','','','2014-07-09 18:40:59','2014-07-09 18:40:59','',6054,'http://sandbox.arrayfire.com/6054-revision-v1/',0,'revision','',0),(6088,11,'2014-07-09 18:55:27','2014-07-09 18:55:27','At ArrayFire, we constantly encounter projects that require OpenGL and run on a remote server that does not have a display.\r\nIn this blog, we have compiled a list of steps that users can use to run full profile OpenGL applications over SSH on remote systems without a display.\r\n\r\nA few notes before we get started.\r\n<ul>\r\n	<li>The first part of the blog that shows the configuration of the xorg.conf file is limited to NVIDIA cards (with display).</li>\r\n	<li>AMD cards support this capability without the modification of xorg.conf file. However, we have not been able to get a comprehensive list of supported devices.</li>\r\n</ul>\r\n\r\n<strong>Requirements</strong>:\r\nYou will need access to the remote system over SSH.\r\nTo run the tool, you will need libGL.so, libX11.so. Another tool I would recommend strongly is glewinfo. Most linux distributions ship this with the glew-utils package. An alternate to glewinfo is glxinfo which is present on all systems with X. You can substitute glewinfo with glxinfo in all the commands below if needed.\r\n\r\n<strong>Part 1: Setting up X (NVIDIA Only)</strong>\r\nTo get X to running on NVIDIA cards, we need to make a changes to the xorg.conf file. Before making the change, make sure you create a back up of the current version on your system (name it xorg.conf.stable).\r\nYou can find a sample xorg.conf file <a href=\"https://github.com/arrayfire/glContext/blob/master/xorg.conf\" title=\"xorg.conf\" target=\"_blank\">here</a>. The sample file is for a NVIDIA GTX 690. The specific things to notice are the use of \"UseDisplayDevice\" option under \"Screen\" and the \"Virtual\" option under \"SubSection Display\". You can use parts of this file to configure your own config file. Make sure the options listed in the sample file get listed in your config file as well.\r\nSave and close the file.\r\n\r\nNow run this command: <code># nvidia-xconfig -a --use-display-device=None --virtual=1280x1024</code>\r\nRestart the system.\r\n\r\n<strong>Note:</strong> To abort trying this, just copy xorg.conf.stable back to xorg.conf and restart.\r\n\r\n<strong>Part 2: Start X (NVIDIA GeForce Only)</strong>\r\n\r\nThe following is only for GeForce cards. Quadro and Tesla cards can skip to Part 3.\r\n\r\nOn restart, run the command <code># /usr/bin/X :0 &</code>. Ideally, this command should give an output similar to:\r\n<pre>\r\nX.Org X Server 1.13.0\r\nRelease Date: 2012-09-05\r\nX Protocol Version 11, Revision 0\r\n\r\n<Some more output here>\r\n\r\nLoading extension GLX\r\nLoading extension NV-GLX\r\nLoading extension NV-CONTROL\r\n</pre>\r\n\r\nThis means X has started successfully on the virtual display.\r\nIf it fails, restart the system and try again. You can also look at /var/log/Xorg.0.log for the log of the failure.\r\n\r\n<strong>Part 3: Initial Diagnosis</strong>\r\nOnce X has started successfully, run <code>echo $DISPLAY</code>. It is very likely that the output of this will be empty.\r\nIf you have glewinfo installed, run the following command <code>env DISPLAY=:0 glewinfo | less</code>.\r\nThe goal of this command is to run glewinfo having temporarily set DISPLAY to :0 (virtual display on remote system). If this command run\'s successfully, you should be able to see the graphics card on the remote system along with the full OpenGL profile. And now you are ready to deploy applications using X.\r\nIf this command fails for Quadro and Tesla cards, run the section in Part 2.\r\n\r\nIf you want to set DISPLAY for the entire session, run <code>export DISPLAY=:0</code>\r\n\r\n<strong>Part 4: Deploying Off-Screen Rendering Applications on Remote System</strong>\r\nThis is where X becomes crucial. Tools like GLFW may or may not work on remote systems because of their dependence on Xrandr and other software. The trick is use X to create an OpenGL context, and the run everything using off-screen rendering using framebuffers and renderbuffers. I took the source to create an OpenGL context using X from <a href=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" title=\"OpenGL Context Creation Page\" target=\"_blank\"></a> and modified it slighly. Thanks to the folks at OpenGL.org for providing this. The source code with the changes I made can be found here: <a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.hpp\" target=\"_blank\">glContext.hpp</a>.\r\n\r\nInclude this in your source code. To create context run createGLContext() and to delete the context run deleteGLContext().\r\n\r\nI have specified that the minimum OpenGL version should be 4.4 with forward context enabled. You can modify this version by changing the values at lines 26 and 27.\r\nThe forward compatibility can be disabled at line 241 by changing line 241 to None.\r\nIf the application fails to create the specified version of the context, the application will exit.\r\n\r\nAt line 189, we create the window. The API description can be found <a href=\"http://tronche.com/gui/x/xlib/window/XCreateWindow.html\" title=\"link\" target=\"_blank\">here</a>. \"0, 0, 10, 10\" specifies the top-left corner (0,0) and the width and height of the window (10, 10). Since the goal of this is to be used for off-screen rendering, the size of the window has no effect on the rendering.\r\nLine 202 specifies the window title.\r\n\r\nIf everything goes successfully, you should see an output like this:\r\n<pre>\r\nglContext.hpp:297: GL Version  = 4.4.0 NVIDIA 331.79\r\nglContext.hpp:298: GL Vendor   = NVIDIA Corporation\r\nglContext.hpp:299: GL Renderer = GeForce GTX 690/PCIe/SSE2\r\nglContext.hpp:300: GL Shader   = 4.40 NVIDIA via Cg compiler\r\n</pre>\r\n\r\nIf you wish to use a lower minimum version, say 3.0, then the version provided by the output will reflect 3.0 since GL fetches version from the context.\r\n\r\nTo test the context creation as a stand alone, create a cpp file with the following contents (<a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.cpp\" title=\"glContext.cpp\" target=\"_blank\">glContext.cpp</a>):\r\n<pre>\r\n#include \"glContext.hpp\"\r\n\r\nint main(int argc, char* argv[])\r\n{\r\n    createGLContext();\r\n    deleteGLContext();\r\n    return 0;\r\n}\r\n</pre>\r\n\r\nCompile this with <strong>g++ -o gl glContext.cpp -lGL -lX11</strong> and run with <strong>./gl</strong> (make sure DISPLAY is :0). If this works successfully, any off-screen rendering code will work perfectly with this.\r\n<strong>Note:</strong> If you use GLEW, make sure you include glew.h before including gl.h.\r\n\r\nIf you wish to know about remote OpenGL further or work with us on remote rendering, contact us at <a href=\"mailto:technical@arrayfire.com\" >technical@arrayfire.com</a>.\r\n\r\nLinks:\r\nOpenGL Context Creation Tutorial: <a href=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" title=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" target=\"_blank\">http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)</a>\r\nArrayFire glContext repo on Github: <a href=\"https://github.com/arrayfire/glContext\" title=\"https://github.com/arrayfire/glContext\" target=\"_blank\">https://github.com/arrayfire/glContext</a>','Remote Off-Screen Rendering with OpenGL','','inherit','open','open','','6054-revision-v1','','','2014-07-09 18:55:27','2014-07-09 18:55:27','',6054,'http://sandbox.arrayfire.com/6054-revision-v1/',0,'revision','',0),(6089,11,'2014-07-09 19:03:20','2014-07-09 19:03:20','At ArrayFire, we constantly encounter projects that require OpenGL and run on a remote server that does not have a display.\r\nIn this blog, we have compiled a list of steps that users can use to run full profile OpenGL applications over SSH on remote systems without a display.\r\n\r\nA few notes before we get started.\r\n<ul>\r\n	<li>The first part of the blog that shows the configuration of the xorg.conf file is limited to NVIDIA cards (with display).</li>\r\n	<li>AMD cards support this capability without the modification of xorg.conf file. However, we have not been able to get a comprehensive list of supported devices.</li>\r\n</ul>\r\n\r\n<strong>Requirements</strong>:\r\nYou will need access to the remote system over SSH.\r\nTo run the tool, you will need libGL.so, libX11.so. Another tool I would recommend strongly is glewinfo. Most linux distributions ship this with the glew-utils package. An alternate to glewinfo is glxinfo which is present on all systems with X. You can substitute glewinfo with glxinfo in all the commands below if needed.\r\n\r\n<strong>Part 1: Setting up X (NVIDIA Only)</strong>\r\nTo get X to running on NVIDIA cards, we need to make a changes to the xorg.conf file. Before making the change, make sure you create a back up of the current version on your system (name it xorg.conf.stable).\r\nYou can find a sample xorg.conf file <a href=\"https://github.com/arrayfire/glContext/blob/master/xorg.conf\" title=\"xorg.conf\" target=\"_blank\">here</a>. The sample file is for a NVIDIA GTX 690. The specific things to notice are the use of \"UseDisplayDevice\" option under \"Screen\" and the \"Virtual\" option under \"SubSection Display\". You can use parts of this file to configure your own config file. Make sure the options listed in the sample file get listed in your config file as well.\r\nSave and close the file.\r\n\r\nNow run this command: <code># nvidia-xconfig -a --use-display-device=None --virtual=1280x1024</code>\r\nRestart the system.\r\n\r\n<strong>Note:</strong> To abort trying this, just copy xorg.conf.stable back to xorg.conf and restart.\r\n\r\n<strong>Part 2: Start X (NVIDIA GeForce Only)</strong>\r\n\r\nThe following is only for GeForce cards. Quadro and Tesla cards can skip to Part 3.\r\n\r\nOn restart, run the command <code># /usr/bin/X :0 &</code>. Ideally, this command should give an output similar to:\r\n<pre>\r\nX.Org X Server 1.13.0\r\nRelease Date: 2012-09-05\r\nX Protocol Version 11, Revision 0\r\n\r\n<Some more output here>\r\n\r\nLoading extension GLX\r\nLoading extension NV-GLX\r\nLoading extension NV-CONTROL\r\n</pre>\r\n\r\nThis means X has started successfully on the virtual display.\r\nIf it fails, restart the system and try again. You can also look at /var/log/Xorg.0.log for the log of the failure.\r\n\r\n<strong>Part 3: Initial Diagnosis</strong>\r\nOnce X has started successfully, run <code>echo $DISPLAY</code>. It is very likely that the output of this will be empty.\r\nIf you have glewinfo installed, run the following command <code>env DISPLAY=:0 glewinfo | less</code>.\r\nThe goal of this command is to run glewinfo having temporarily set DISPLAY to :0 (virtual display on remote system). If this command run\'s successfully, you should be able to see the graphics card on the remote system along with the full OpenGL profile. And now you are ready to deploy applications using X.\r\nIf this command fails for Quadro and Tesla cards, run the section in Part 2.\r\n\r\nIf you want to set DISPLAY for the entire session, run <code>export DISPLAY=:0</code>\r\n\r\n<strong>Part 4: Deploying Off-Screen Rendering Applications on Remote System</strong>\r\nThis is where X becomes crucial. Tools like GLFW may or may not work on remote systems because of their dependence on Xrandr and other software. The trick is use X to create an OpenGL context, and the run everything using off-screen rendering using framebuffers and renderbuffers. I took the source to create an OpenGL context using X from <a href=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" title=\"OpenGL Context Creation Page\" target=\"_blank\"></a> and modified it slighly. Thanks to the folks at OpenGL.org for providing this. The source code with the changes I made can be found here: <a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.hpp\" target=\"_blank\">glContext.hpp</a>.\r\n\r\nInclude this in your source code. To create context and delete contexts run createGLContext() and deleteGLContext() respectively.\r\n\r\nI have specified that the minimum OpenGL version should be 4.4 with forward context enabled. You can modify this version by changing the values at lines 26 and 27 of glContext.hpp.\r\nThe forward compatibility can be disabled at line 241 by changing line 241 to None.\r\nIf the application fails to create the specified version of the context, the application will exit.\r\n\r\nAt line 189, we create the window. The API description can be found <a href=\"http://tronche.com/gui/x/xlib/window/XCreateWindow.html\" title=\"link\" target=\"_blank\">here</a>. \"0, 0, 10, 10\" specifies the top-left corner (0,0) and the width and height of the window (10, 10). Since the goal of this is to be used for off-screen rendering, the size of the window has no effect on the rendering.\r\nLine 202 specifies the window title.\r\n\r\nIf everything goes successfully, you should see an output like this:\r\n<pre>\r\nglContext.hpp:297: GL Version  = 4.4.0 NVIDIA 331.79\r\nglContext.hpp:298: GL Vendor   = NVIDIA Corporation\r\nglContext.hpp:299: GL Renderer = GeForce GTX 690/PCIe/SSE2\r\nglContext.hpp:300: GL Shader   = 4.40 NVIDIA via Cg compiler\r\n</pre>\r\n\r\nIf you wish to use a lower minimum version, say 3.0, then the version provided by the output will reflect 3.0 since GL fetches version from the context.\r\n\r\nTo test the context creation as a stand alone, create a cpp file with the following contents (<a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.cpp\" title=\"glContext.cpp\" target=\"_blank\">glContext.cpp</a>):\r\n<pre>\r\n#include \"glContext.hpp\"\r\n\r\nint main(int argc, char* argv[])\r\n{\r\n    createGLContext();\r\n    deleteGLContext();\r\n    return 0;\r\n}\r\n</pre>\r\n\r\nCompile this with <strong>g++ -o gl glContext.cpp -lGL -lX11</strong> and run with <strong>./gl</strong> (make sure DISPLAY is :0). If this works successfully, any off-screen rendering code will work perfectly with this.\r\n<strong>Note:</strong> If you use GLEW, make sure you include glew.h before including gl.h.\r\n\r\nIf you wish to know about remote OpenGL further or work with us on remote rendering, contact us at <a href=\"mailto:technical@arrayfire.com\" >technical@arrayfire.com</a>.\r\n\r\nLinks:\r\nOpenGL Context Creation Tutorial: <a href=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" title=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" target=\"_blank\">http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)</a>\r\nArrayFire glContext repo on Github: <a href=\"https://github.com/arrayfire/glContext\" title=\"https://github.com/arrayfire/glContext\" target=\"_blank\">https://github.com/arrayfire/glContext</a>','Remote Off-Screen Rendering with OpenGL','','inherit','open','open','','6054-revision-v1','','','2014-07-09 19:03:20','2014-07-09 19:03:20','',6054,'http://sandbox.arrayfire.com/6054-revision-v1/',0,'revision','',0),(6090,11,'2014-07-09 19:07:41','2014-07-09 19:07:41','At ArrayFire, we constantly encounter projects that require OpenGL and run on a remote server that does not have a display.\r\nIn this blog, we have compiled a list of steps that users can use to run full profile OpenGL applications over SSH on remote systems without a display.\r\n\r\nA few notes before we get started.\r\n<ul>\r\n        <li>This blog is limited to computers running distributions of Linux.\r\n	<li>The first part of the blog that shows the configuration of the xorg.conf file is limited to NVIDIA cards (with display).</li>\r\n	<li>AMD cards support this capability without the modification of xorg.conf file. However, we have not been able to get a comprehensive list of supported devices.</li>\r\n</ul>\r\n\r\n<strong>Requirements</strong>:\r\nYou will need access to the remote system over SSH.\r\nTo run the tool, you will need libGL.so, libX11.so. Another tool I would recommend strongly is glewinfo. Most linux distributions ship this with the glew-utils package. An alternate to glewinfo is glxinfo which is present on all systems with X. You can substitute glewinfo with glxinfo in all the commands below if needed.\r\n\r\n<strong>Part 1: Setting up X (NVIDIA Only)</strong>\r\nTo get X to running on NVIDIA cards, we need to make a changes to the xorg.conf file. Before making the change, make sure you create a back up of the current version on your system (name it xorg.conf.stable).\r\nYou can find a sample xorg.conf file <a href=\"https://github.com/arrayfire/glContext/blob/master/xorg.conf\" title=\"xorg.conf\" target=\"_blank\">here</a>. The sample file is for a NVIDIA GTX 690. The specific things to notice are the use of \"UseDisplayDevice\" option under \"Screen\" and the \"Virtual\" option under \"SubSection Display\". You can use parts of this file to configure your own config file. Make sure the options listed in the sample file get listed in your config file as well.\r\nSave and close the file.\r\n\r\nNow run this command: <code># nvidia-xconfig -a --use-display-device=None --virtual=1280x1024</code>\r\nRestart the system.\r\n\r\n<strong>Note:</strong> To abort trying this, just copy xorg.conf.stable back to xorg.conf and restart.\r\n\r\n<strong>Part 2: Start X (NVIDIA GeForce Only)</strong>\r\n\r\nThe following is only for GeForce cards. Quadro and Tesla cards can skip to Part 3.\r\n\r\nOn restart, run the command <code># /usr/bin/X :0 &</code>. Ideally, this command should give an output similar to:\r\n<pre>\r\nX.Org X Server 1.13.0\r\nRelease Date: 2012-09-05\r\nX Protocol Version 11, Revision 0\r\n\r\n<Some more output here>\r\n\r\nLoading extension GLX\r\nLoading extension NV-GLX\r\nLoading extension NV-CONTROL\r\n</pre>\r\n\r\nThis means X has started successfully on the virtual display.\r\nIf it fails, restart the system and try again. You can also look at /var/log/Xorg.0.log for the log of the failure.\r\n\r\n<strong>Part 3: Initial Diagnosis</strong>\r\nOnce X has started successfully, run <code>echo $DISPLAY</code>. It is very likely that the output of this will be empty.\r\nIf you have glewinfo installed, run the following command <code>env DISPLAY=:0 glewinfo | less</code>.\r\nThe goal of this command is to run glewinfo having temporarily set DISPLAY to :0 (virtual display on remote system). If this command run\'s successfully, you should be able to see the graphics card on the remote system along with the full OpenGL profile. And now you are ready to deploy applications using X.\r\nIf this command fails for Quadro and Tesla cards, run the section in Part 2.\r\n\r\nIf you want to set DISPLAY for the entire session, run <code>export DISPLAY=:0</code>\r\n\r\n<strong>Part 4: Deploying Off-Screen Rendering Applications on Remote System</strong>\r\nThis is where X becomes crucial. Tools like GLFW may or may not work on remote systems because of their dependence on Xrandr and other software. The trick is use X to create an OpenGL context, and the run everything using off-screen rendering using framebuffers and renderbuffers. I took the source to create an OpenGL context using X from <a href=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" title=\"OpenGL Context Creation Page\" target=\"_blank\"></a> and modified it slighly. Thanks to the folks at OpenGL.org for providing this. The source code with the changes I made can be found here: <a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.hpp\" target=\"_blank\">glContext.hpp</a>.\r\n\r\nInclude this in your source code. To create context and delete contexts run createGLContext() and deleteGLContext() respectively.\r\n\r\nI have specified that the minimum OpenGL version should be 4.4 with forward context enabled. You can modify this version by changing the values at lines 26 and 27 of glContext.hpp.\r\nThe forward compatibility can be disabled at line 241 by changing line 241 to None.\r\nIf the application fails to create the specified version of the context, the application will exit.\r\n\r\nAt line 189, we create the window. The API description can be found <a href=\"http://tronche.com/gui/x/xlib/window/XCreateWindow.html\" title=\"link\" target=\"_blank\">here</a>. \"0, 0, 10, 10\" specifies the top-left corner (0,0) and the width and height of the window (10, 10). Since the goal of this is to be used for off-screen rendering, the size of the window has no effect on the rendering.\r\nLine 202 specifies the window title.\r\n\r\nIf everything goes successfully, you should see an output like this:\r\n<pre>\r\nglContext.hpp:297: GL Version  = 4.4.0 NVIDIA 331.79\r\nglContext.hpp:298: GL Vendor   = NVIDIA Corporation\r\nglContext.hpp:299: GL Renderer = GeForce GTX 690/PCIe/SSE2\r\nglContext.hpp:300: GL Shader   = 4.40 NVIDIA via Cg compiler\r\n</pre>\r\n\r\nIf you wish to use a lower minimum version, say 3.0, then the version provided by the output will reflect 3.0 since GL fetches version from the context.\r\n\r\nTo test the context creation as a stand alone, create a cpp file with the following contents (<a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.cpp\" title=\"glContext.cpp\" target=\"_blank\">glContext.cpp</a>):\r\n<pre>\r\n#include \"glContext.hpp\"\r\n\r\nint main(int argc, char* argv[])\r\n{\r\n    createGLContext();\r\n    deleteGLContext();\r\n    return 0;\r\n}\r\n</pre>\r\n\r\nCompile this with <strong>g++ -o gl glContext.cpp -lGL -lX11</strong> and run with <strong>./gl</strong> (make sure DISPLAY is :0). If this works successfully, any off-screen rendering code will work perfectly with this.\r\n<strong>Note:</strong> If you use GLEW, make sure you include glew.h before including gl.h.\r\n\r\nIf you wish to know about remote OpenGL further or work with us on remote rendering, contact us at <a href=\"mailto:technical@arrayfire.com\" >technical@arrayfire.com</a>.\r\n\r\nLinks:\r\nOpenGL Context Creation Tutorial: <a href=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" title=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" target=\"_blank\">http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)</a>\r\nArrayFire glContext repo on Github: <a href=\"https://github.com/arrayfire/glContext\" title=\"https://github.com/arrayfire/glContext\" target=\"_blank\">https://github.com/arrayfire/glContext</a>','Remote Off-Screen Rendering with OpenGL','','inherit','open','open','','6054-revision-v1','','','2014-07-09 19:07:41','2014-07-09 19:07:41','',6054,'http://sandbox.arrayfire.com/6054-revision-v1/',0,'revision','',0),(6092,11,'2015-11-02 18:45:50','2015-11-02 18:45:50','At ArrayFire, we constantly encounter projects that require OpenGL and run on a remote server that does not have a display.\nIn this blog, we have compiled a list of steps that users can use to run full profile OpenGL applications over SSH on remote systems without a display.\n\nA few notes before we get started.\n<ul>\n        <li>This blog is limited to computers running distributions of Linux.\n	<li>The first part of the blog that shows the configuration of the xorg.conf file is limited to NVIDIA cards (with display).</li>\n	<li>AMD cards support this capability without the modification of xorg.conf file. However, we have not been able to get a comprehensive list of supported devices.</li>\n</ul>\n\n<h4>Requirements</h4>\nYou will need access to the remote system over SSH.\nTo run the tool, you will need <code>libGL.so<code> and </code>libX11.so</code>. Another tool I would recommend strongly is glewinfo. Most linux distributions ship this with the glew-utils package. An alternate to glewinfo is glxinfo which is present on all systems with X. You can substitute glewinfo with glxinfo in all the commands below if needed.\n\n<h4 id=\"ConfigX\">Configuring X (NVIDIA Only)</h4>\nTo get X to running on NVIDIA cards, we need to make changes to the xorg.conf file. Before making the change, make sure you create a back up of the current version on your system (name it xorg.conf.stable).\nYou can find a sample xorg.conf file <a href=\"https://github.com/arrayfire/glContext/blob/master/xorg.conf\" title=\"xorg.conf\" target=\"_blank\">here</a>. The sample file is for a NVIDIA GTX 690. The specific things to notice are the use of \"UseDisplayDevice\" option under \"Screen\" and the \"Virtual\" option under \"SubSection Display\". You can use parts of this file to configure your own config file. Make sure the options listed in the sample file get listed in your config file as well.\nSave and close the file.\n\nNow run this command: <code># nvidia-xconfig -a --use-display-device=None --virtual=1280x1024</code>\nRestart the system.\n\n<strong>Note:</strong> To abort trying this, just copy xorg.conf.stable back to xorg.conf and restart.\n\nThe following is only for GeForce cards. Quadro and Tesla cards can skip to <a href=\"#InitDiag\">Initial Diagnosis</a> section.\n\nOn restart, run the command <code># /usr/bin/X :0 &</code>. Ideally, this command should give an output similar to:\n<pre>\nX.Org X Server 1.13.0\nRelease Date: 2012-09-05\nX Protocol Version 11, Revision 0\n\n<Some more output here>\n\nLoading extension GLX\nLoading extension NV-GLX\nLoading extension NV-CONTROL\n</pre>\n\nThis means X has started successfully on the virtual display.\nIf it fails, restart the system and try again. You can also look at /var/log/Xorg.0.log for the log of the failure.\n\n<h5>Update: Known issue with Starting X</h5>\nIf the output is not similar to the one shown above, run the <a href=\"#InitDiag\">Initial Diagnosis</a> section below. If the output shows an error as follows:\n<pre>\n$ env DISPLAY=:0 glewinfo\nX Error of failed request:  BadWindow (invalid Window parameter)\n  Major opcode of failed request:  137 (NV-GLX)\n  Minor opcode of failed request:  4 ()\n  Resource id in failed request:  0x200004\n  Serial number of failed request:  39\n  Current serial number in output stream:  39\n</pre>\nrun the following commands:\n<pre>\nsudo mv /usr/lib/xorg/modules/extensions/libglx.so /usr/lib/xorg/modules/extensions/libglx.so.orig\nsudo ln -s /usr/lib/xorg/modules/extensions/libglx.so.XXX.YY /usr/lib/xorg/modules/extensions/libglx.so\n</pre>\nWhere XXX.YY is the NVIDIA driver version.\n\nNow try starting X again.\n\n<h4 id=\"InitDiag\">Initial Diagnosis</h4>\nOnce X has started successfully, run <code>echo $DISPLAY</code>. It is very likely that the output of this will be empty.\nIf you have glewinfo installed, run the following command <code>env DISPLAY=:0 glewinfo | less</code>.\nThe goal of this command is to run glewinfo having temporarily set DISPLAY to :0 (virtual display on remote system). If this command runs successfully, you should be able to see the graphics card on the remote system along with the full OpenGL profile. And now you are ready to deploy applications using X.\n\nIf you want to set DISPLAY for the entire session, run <code>export DISPLAY=:0</code>. To set DISPLAY permanently, add the same line to your bashrc file.\n\n<h4 id=\"Deploy\">Deploying Off-Screen Rendering Applications on Remote System</h4>\nThis is where X becomes crucial. Tools like GLFW may or may not work on remote systems because of their dependence on Xrandr and other software. The trick is use X to create an OpenGL context, and the run everything using off-screen rendering using framebuffers and renderbuffers. I took the source to create an OpenGL context using X from <a href=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" title=\"OpenGL Context Creation Page\" target=\"_blank\"></a> and modified it slighly. Thanks to the folks at OpenGL.org for providing this. The source code with the changes I made can be found here: <a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.hpp\" target=\"_blank\">glContext.hpp</a>.\n\nInclude this in your source code. To create context and delete contexts run createGLContext() and deleteGLContext() respectively.\n\nI have specified that the minimum OpenGL version should be 4.4 with forward context enabled. You can modify this version by changing the values at lines 26 and 27 of glContext.hpp.\nThe forward compatibility can be disabled at line 241 by changing line 241 to None.\nIf the application fails to create the specified version of the context, the application will exit.\n\nAt line 189, we create the window. The API description can be found <a href=\"http://tronche.com/gui/x/xlib/window/XCreateWindow.html\" title=\"link\" target=\"_blank\">here</a>. \"0, 0, 10, 10\" specifies the top-left corner (0,0) and the width and height of the window (10, 10). Since the goal of this is to be used for off-screen rendering, the size of the window has no effect on the rendering.\nLine 202 specifies the window title.\n\nIf everything goes successfully, you should see an output like this:\n<pre>\nglContext.hpp:297: GL Version  = 4.4.0 NVIDIA 331.79\nglContext.hpp:298: GL Vendor   = NVIDIA Corporation\nglContext.hpp:299: GL Renderer = GeForce GTX 690/PCIe/SSE2\nglContext.hpp:300: GL Shader   = 4.40 NVIDIA via Cg compiler\n</pre>\n\nIf you wish to use a lower minimum version, say 3.0, then the version provided by the output will reflect 3.0 since GL fetches version from the context.\n\nTo test the context creation as a stand alone, create a cpp file with the following contents (<a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.cpp\" title=\"glContext.cpp\" target=\"_blank\">glContext.cpp</a>):\n<pre>\n#include \"glContext.hpp\"\n\nint main(int argc, char* argv[])\n{\n    createGLContext();\n    deleteGLContext();\n    return 0;\n}\n</pre>\n\nCompile this with <code>g++ -o gl glContext.cpp -lGL -lX11</code> and run with <code>./gl</code> (make sure DISPLAY is :0). If this works successfully, any off-screen rendering code will work perfectly with this.\n<strong>Note:</strong> If you use GLEW, make sure you include glew.h before including gl.h.\n\nIf you wish to know about remote OpenGL further or work with us on remote rendering, contact us at <a href=\"mailto:technical@arrayfire.com\" >technical@arrayfire.com</a>.\n\nLinks:\n<a href=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" title=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" target=\"_blank\">OpenGL Context Creation Tutorial</a>\n<a href=\"https://github.com/arrayfire/glContext\" title=\"https://github.com/arrayfire/glContext\" target=\"_blank\">ArrayFire glContext repo on Github</a>','Remote Off-Screen Rendering with OpenGL','','inherit','open','open','','6054-autosave-v1','','','2015-11-02 18:45:50','2015-11-02 18:45:50','',6054,'http://sandbox.arrayfire.com/6054-autosave-v1/',0,'revision','',0),(6093,11,'2014-07-09 20:10:55','2014-07-09 20:10:55','At ArrayFire, we constantly encounter projects that require OpenGL and run on a remote server that does not have a display.\r\nIn this blog, we have compiled a list of steps that users can use to run full profile OpenGL applications over SSH on remote systems without a display.\r\n\r\nA few notes before we get started.\r\n<ul>\r\n        <li>This blog is limited to computers running distributions of Linux.\r\n	<li>The first part of the blog that shows the configuration of the xorg.conf file is limited to NVIDIA cards (with display).</li>\r\n	<li>AMD cards support this capability without the modification of xorg.conf file. However, we have not been able to get a comprehensive list of supported devices.</li>\r\n</ul>\r\n\r\n<h3>Requirements</h3>:\r\nYou will need access to the remote system over SSH.\r\nTo run the tool, you will need <code>libGL.so and libX11.so</code>. Another tool I would recommend strongly is glewinfo. Most linux distributions ship this with the glew-utils package. An alternate to glewinfo is glxinfo which is present on all systems with X. You can substitute glewinfo with glxinfo in all the commands below if needed.\r\n\r\n<h3 id=\"ConfigX\">Configuring X (NVIDIA Only)</h3>\r\nTo get X to running on NVIDIA cards, we need to make changes to the xorg.conf file. Before making the change, make sure you create a back up of the current version on your system (name it xorg.conf.stable).\r\nYou can find a sample xorg.conf file <a href=\"https://github.com/arrayfire/glContext/blob/master/xorg.conf\" title=\"xorg.conf\" target=\"_blank\">here</a>. The sample file is for a NVIDIA GTX 690. The specific things to notice are the use of \"UseDisplayDevice\" option under \"Screen\" and the \"Virtual\" option under \"SubSection Display\". You can use parts of this file to configure your own config file. Make sure the options listed in the sample file get listed in your config file as well.\r\nSave and close the file.\r\n\r\nNow run this command: <code># nvidia-xconfig -a --use-display-device=None --virtual=1280x1024</code>\r\nRestart the system.\r\n\r\n<strong>Note:</strong> To abort trying this, just copy xorg.conf.stable back to xorg.conf and restart.\r\n\r\nThe following is only for GeForce cards. Quadro and Tesla cards can skip to <a href=\"#InitDiag\">Initial Diagnosis</a> section.\r\n\r\nOn restart, run the command <code># /usr/bin/X :0 &</code>. Ideally, this command should give an output similar to:\r\n<pre>\r\nX.Org X Server 1.13.0\r\nRelease Date: 2012-09-05\r\nX Protocol Version 11, Revision 0\r\n\r\n<Some more output here>\r\n\r\nLoading extension GLX\r\nLoading extension NV-GLX\r\nLoading extension NV-CONTROL\r\n</pre>\r\n\r\nThis means X has started successfully on the virtual display.\r\nIf it fails, restart the system and try again. You can also look at /var/log/Xorg.0.log for the log of the failure.\r\n\r\n<h3 id=\"InitDiag\">Initial Diagnosis</h3>\r\nOnce X has started successfully, run <code>echo $DISPLAY</code>. It is very likely that the output of this will be empty.\r\nIf you have glewinfo installed, run the following command <code>env DISPLAY=:0 glewinfo | less</code>.\r\nThe goal of this command is to run glewinfo having temporarily set DISPLAY to :0 (virtual display on remote system). If this command runs successfully, you should be able to see the graphics card on the remote system along with the full OpenGL profile. And now you are ready to deploy applications using X.\r\n\r\nIf you want to set DISPLAY for the entire session, run <code>export DISPLAY=:0</code>. To set DISPLAY permanently, add the same line to your bashrc file.\r\n\r\n<h3 id=\"Deploy\">Deploying Off-Screen Rendering Applications on Remote System</h3>\r\nThis is where X becomes crucial. Tools like GLFW may or may not work on remote systems because of their dependence on Xrandr and other software. The trick is use X to create an OpenGL context, and the run everything using off-screen rendering using framebuffers and renderbuffers. I took the source to create an OpenGL context using X from <a href=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" title=\"OpenGL Context Creation Page\" target=\"_blank\"></a> and modified it slighly. Thanks to the folks at OpenGL.org for providing this. The source code with the changes I made can be found here: <a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.hpp\" target=\"_blank\">glContext.hpp</a>.\r\n\r\nInclude this in your source code. To create context and delete contexts run createGLContext() and deleteGLContext() respectively.\r\n\r\nI have specified that the minimum OpenGL version should be 4.4 with forward context enabled. You can modify this version by changing the values at lines 26 and 27 of glContext.hpp.\r\nThe forward compatibility can be disabled at line 241 by changing line 241 to None.\r\nIf the application fails to create the specified version of the context, the application will exit.\r\n\r\nAt line 189, we create the window. The API description can be found <a href=\"http://tronche.com/gui/x/xlib/window/XCreateWindow.html\" title=\"link\" target=\"_blank\">here</a>. \"0, 0, 10, 10\" specifies the top-left corner (0,0) and the width and height of the window (10, 10). Since the goal of this is to be used for off-screen rendering, the size of the window has no effect on the rendering.\r\nLine 202 specifies the window title.\r\n\r\nIf everything goes successfully, you should see an output like this:\r\n<pre>\r\nglContext.hpp:297: GL Version  = 4.4.0 NVIDIA 331.79\r\nglContext.hpp:298: GL Vendor   = NVIDIA Corporation\r\nglContext.hpp:299: GL Renderer = GeForce GTX 690/PCIe/SSE2\r\nglContext.hpp:300: GL Shader   = 4.40 NVIDIA via Cg compiler\r\n</pre>\r\n\r\nIf you wish to use a lower minimum version, say 3.0, then the version provided by the output will reflect 3.0 since GL fetches version from the context.\r\n\r\nTo test the context creation as a stand alone, create a cpp file with the following contents (<a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.cpp\" title=\"glContext.cpp\" target=\"_blank\">glContext.cpp</a>):\r\n<pre>\r\n#include \"glContext.hpp\"\r\n\r\nint main(int argc, char* argv[])\r\n{\r\n    createGLContext();\r\n    deleteGLContext();\r\n    return 0;\r\n}\r\n</pre>\r\n\r\nCompile this with <strong>g++ -o gl glContext.cpp -lGL -lX11</strong> and run with <strong>./gl</strong> (make sure DISPLAY is :0). If this works successfully, any off-screen rendering code will work perfectly with this.\r\n<strong>Note:</strong> If you use GLEW, make sure you include glew.h before including gl.h.\r\n\r\nIf you wish to know about remote OpenGL further or work with us on remote rendering, contact us at <a href=\"mailto:technical@arrayfire.com\" >technical@arrayfire.com</a>.\r\n\r\nLinks:\r\n<a href=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" title=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" target=\"_blank\">OpenGL Context Creation Tutorial</a>\r\n<a href=\"https://github.com/arrayfire/glContext\" title=\"https://github.com/arrayfire/glContext\" target=\"_blank\">ArrayFire glContext repo on Github</a>','Remote Off-Screen Rendering with OpenGL','','inherit','open','open','','6054-revision-v1','','','2014-07-09 20:10:55','2014-07-09 20:10:55','',6054,'http://sandbox.arrayfire.com/6054-revision-v1/',0,'revision','',0),(6094,11,'2014-07-09 20:14:23','2014-07-09 20:14:23','At ArrayFire, we constantly encounter projects that require OpenGL and run on a remote server that does not have a display.\r\nIn this blog, we have compiled a list of steps that users can use to run full profile OpenGL applications over SSH on remote systems without a display.\r\n\r\nA few notes before we get started.\r\n<ul>\r\n        <li>This blog is limited to computers running distributions of Linux.\r\n	<li>The first part of the blog that shows the configuration of the xorg.conf file is limited to NVIDIA cards (with display).</li>\r\n	<li>AMD cards support this capability without the modification of xorg.conf file. However, we have not been able to get a comprehensive list of supported devices.</li>\r\n</ul>\r\n\r\n<h3>Requirements</h3>:\r\nYou will need access to the remote system over SSH.\r\nTo run the tool, you will need <code>libGL.so<code> and </code>libX11.so</code>. Another tool I would recommend strongly is glewinfo. Most linux distributions ship this with the glew-utils package. An alternate to glewinfo is glxinfo which is present on all systems with X. You can substitute glewinfo with glxinfo in all the commands below if needed.\r\n\r\n<h3 id=\"ConfigX\">Configuring X (NVIDIA Only)</h3>\r\nTo get X to running on NVIDIA cards, we need to make changes to the xorg.conf file. Before making the change, make sure you create a back up of the current version on your system (name it xorg.conf.stable).\r\nYou can find a sample xorg.conf file <a href=\"https://github.com/arrayfire/glContext/blob/master/xorg.conf\" title=\"xorg.conf\" target=\"_blank\">here</a>. The sample file is for a NVIDIA GTX 690. The specific things to notice are the use of \"UseDisplayDevice\" option under \"Screen\" and the \"Virtual\" option under \"SubSection Display\". You can use parts of this file to configure your own config file. Make sure the options listed in the sample file get listed in your config file as well.\r\nSave and close the file.\r\n\r\nNow run this command: <code># nvidia-xconfig -a --use-display-device=None --virtual=1280x1024</code>\r\nRestart the system.\r\n\r\n<strong>Note:</strong> To abort trying this, just copy xorg.conf.stable back to xorg.conf and restart.\r\n\r\nThe following is only for GeForce cards. Quadro and Tesla cards can skip to <a href=\"#InitDiag\">Initial Diagnosis</a> section.\r\n\r\nOn restart, run the command <code># /usr/bin/X :0 &</code>. Ideally, this command should give an output similar to:\r\n<pre>\r\nX.Org X Server 1.13.0\r\nRelease Date: 2012-09-05\r\nX Protocol Version 11, Revision 0\r\n\r\n<Some more output here>\r\n\r\nLoading extension GLX\r\nLoading extension NV-GLX\r\nLoading extension NV-CONTROL\r\n</pre>\r\n\r\nThis means X has started successfully on the virtual display.\r\nIf it fails, restart the system and try again. You can also look at /var/log/Xorg.0.log for the log of the failure.\r\n\r\n<h3 id=\"InitDiag\">Initial Diagnosis</h3>\r\nOnce X has started successfully, run <code>echo $DISPLAY</code>. It is very likely that the output of this will be empty.\r\nIf you have glewinfo installed, run the following command <code>env DISPLAY=:0 glewinfo | less</code>.\r\nThe goal of this command is to run glewinfo having temporarily set DISPLAY to :0 (virtual display on remote system). If this command runs successfully, you should be able to see the graphics card on the remote system along with the full OpenGL profile. And now you are ready to deploy applications using X.\r\n\r\nIf you want to set DISPLAY for the entire session, run <code>export DISPLAY=:0</code>. To set DISPLAY permanently, add the same line to your bashrc file.\r\n\r\n<h3 id=\"Deploy\">Deploying Off-Screen Rendering Applications on Remote System</h3>\r\nThis is where X becomes crucial. Tools like GLFW may or may not work on remote systems because of their dependence on Xrandr and other software. The trick is use X to create an OpenGL context, and the run everything using off-screen rendering using framebuffers and renderbuffers. I took the source to create an OpenGL context using X from <a href=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" title=\"OpenGL Context Creation Page\" target=\"_blank\"></a> and modified it slighly. Thanks to the folks at OpenGL.org for providing this. The source code with the changes I made can be found here: <a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.hpp\" target=\"_blank\">glContext.hpp</a>.\r\n\r\nInclude this in your source code. To create context and delete contexts run createGLContext() and deleteGLContext() respectively.\r\n\r\nI have specified that the minimum OpenGL version should be 4.4 with forward context enabled. You can modify this version by changing the values at lines 26 and 27 of glContext.hpp.\r\nThe forward compatibility can be disabled at line 241 by changing line 241 to None.\r\nIf the application fails to create the specified version of the context, the application will exit.\r\n\r\nAt line 189, we create the window. The API description can be found <a href=\"http://tronche.com/gui/x/xlib/window/XCreateWindow.html\" title=\"link\" target=\"_blank\">here</a>. \"0, 0, 10, 10\" specifies the top-left corner (0,0) and the width and height of the window (10, 10). Since the goal of this is to be used for off-screen rendering, the size of the window has no effect on the rendering.\r\nLine 202 specifies the window title.\r\n\r\nIf everything goes successfully, you should see an output like this:\r\n<pre>\r\nglContext.hpp:297: GL Version  = 4.4.0 NVIDIA 331.79\r\nglContext.hpp:298: GL Vendor   = NVIDIA Corporation\r\nglContext.hpp:299: GL Renderer = GeForce GTX 690/PCIe/SSE2\r\nglContext.hpp:300: GL Shader   = 4.40 NVIDIA via Cg compiler\r\n</pre>\r\n\r\nIf you wish to use a lower minimum version, say 3.0, then the version provided by the output will reflect 3.0 since GL fetches version from the context.\r\n\r\nTo test the context creation as a stand alone, create a cpp file with the following contents (<a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.cpp\" title=\"glContext.cpp\" target=\"_blank\">glContext.cpp</a>):\r\n<pre>\r\n#include \"glContext.hpp\"\r\n\r\nint main(int argc, char* argv[])\r\n{\r\n    createGLContext();\r\n    deleteGLContext();\r\n    return 0;\r\n}\r\n</pre>\r\n\r\nCompile this with <strong>g++ -o gl glContext.cpp -lGL -lX11</strong> and run with <strong>./gl</strong> (make sure DISPLAY is :0). If this works successfully, any off-screen rendering code will work perfectly with this.\r\n<strong>Note:</strong> If you use GLEW, make sure you include glew.h before including gl.h.\r\n\r\nIf you wish to know about remote OpenGL further or work with us on remote rendering, contact us at <a href=\"mailto:technical@arrayfire.com\" >technical@arrayfire.com</a>.\r\n\r\nLinks:\r\n<a href=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" title=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" target=\"_blank\">OpenGL Context Creation Tutorial</a>\r\n<a href=\"https://github.com/arrayfire/glContext\" title=\"https://github.com/arrayfire/glContext\" target=\"_blank\">ArrayFire glContext repo on Github</a>','Remote Off-Screen Rendering with OpenGL','','inherit','open','open','','6054-revision-v1','','','2014-07-09 20:14:23','2014-07-09 20:14:23','',6054,'http://sandbox.arrayfire.com/6054-revision-v1/',0,'revision','',0),(6095,11,'2014-07-09 20:15:40','2014-07-09 20:15:40','At ArrayFire, we constantly encounter projects that require OpenGL and run on a remote server that does not have a display.\r\nIn this blog, we have compiled a list of steps that users can use to run full profile OpenGL applications over SSH on remote systems without a display.\r\n\r\nA few notes before we get started.\r\n<ul>\r\n        <li>This blog is limited to computers running distributions of Linux.\r\n	<li>The first part of the blog that shows the configuration of the xorg.conf file is limited to NVIDIA cards (with display).</li>\r\n	<li>AMD cards support this capability without the modification of xorg.conf file. However, we have not been able to get a comprehensive list of supported devices.</li>\r\n</ul>\r\n\r\n<h3>Requirements</h3>:\r\nYou will need access to the remote system over SSH.\r\nTo run the tool, you will need <code>libGL.so<code> and </code>libX11.so</code>. Another tool I would recommend strongly is glewinfo. Most linux distributions ship this with the glew-utils package. An alternate to glewinfo is glxinfo which is present on all systems with X. You can substitute glewinfo with glxinfo in all the commands below if needed.\r\n\r\n<h3 id=\"ConfigX\">Configuring X (NVIDIA Only)</h3>\r\nTo get X to running on NVIDIA cards, we need to make changes to the xorg.conf file. Before making the change, make sure you create a back up of the current version on your system (name it xorg.conf.stable).\r\nYou can find a sample xorg.conf file <a href=\"https://github.com/arrayfire/glContext/blob/master/xorg.conf\" title=\"xorg.conf\" target=\"_blank\">here</a>. The sample file is for a NVIDIA GTX 690. The specific things to notice are the use of \"UseDisplayDevice\" option under \"Screen\" and the \"Virtual\" option under \"SubSection Display\". You can use parts of this file to configure your own config file. Make sure the options listed in the sample file get listed in your config file as well.\r\nSave and close the file.\r\n\r\nNow run this command: <code># nvidia-xconfig -a --use-display-device=None --virtual=1280x1024</code>\r\nRestart the system.\r\n\r\n<strong>Note:</strong> To abort trying this, just copy xorg.conf.stable back to xorg.conf and restart.\r\n\r\nThe following is only for GeForce cards. Quadro and Tesla cards can skip to <a href=\"#InitDiag\">Initial Diagnosis</a> section.\r\n\r\nOn restart, run the command <code># /usr/bin/X :0 &</code>. Ideally, this command should give an output similar to:\r\n<pre>\r\nX.Org X Server 1.13.0\r\nRelease Date: 2012-09-05\r\nX Protocol Version 11, Revision 0\r\n\r\n<Some more output here>\r\n\r\nLoading extension GLX\r\nLoading extension NV-GLX\r\nLoading extension NV-CONTROL\r\n</pre>\r\n\r\nThis means X has started successfully on the virtual display.\r\nIf it fails, restart the system and try again. You can also look at /var/log/Xorg.0.log for the log of the failure.\r\n\r\n<h3 id=\"InitDiag\">Initial Diagnosis</h3>\r\nOnce X has started successfully, run <code>echo $DISPLAY</code>. It is very likely that the output of this will be empty.\r\nIf you have glewinfo installed, run the following command <code>env DISPLAY=:0 glewinfo | less</code>.\r\nThe goal of this command is to run glewinfo having temporarily set DISPLAY to :0 (virtual display on remote system). If this command runs successfully, you should be able to see the graphics card on the remote system along with the full OpenGL profile. And now you are ready to deploy applications using X.\r\n\r\nIf you want to set DISPLAY for the entire session, run <code>export DISPLAY=:0</code>. To set DISPLAY permanently, add the same line to your bashrc file.\r\n\r\n<h3 id=\"Deploy\">Deploying Off-Screen Rendering Applications on Remote System</h3>\r\nThis is where X becomes crucial. Tools like GLFW may or may not work on remote systems because of their dependence on Xrandr and other software. The trick is use X to create an OpenGL context, and the run everything using off-screen rendering using framebuffers and renderbuffers. I took the source to create an OpenGL context using X from <a href=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" title=\"OpenGL Context Creation Page\" target=\"_blank\"></a> and modified it slighly. Thanks to the folks at OpenGL.org for providing this. The source code with the changes I made can be found here: <a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.hpp\" target=\"_blank\">glContext.hpp</a>.\r\n\r\nInclude this in your source code. To create context and delete contexts run createGLContext() and deleteGLContext() respectively.\r\n\r\nI have specified that the minimum OpenGL version should be 4.4 with forward context enabled. You can modify this version by changing the values at lines 26 and 27 of glContext.hpp.\r\nThe forward compatibility can be disabled at line 241 by changing line 241 to None.\r\nIf the application fails to create the specified version of the context, the application will exit.\r\n\r\nAt line 189, we create the window. The API description can be found <a href=\"http://tronche.com/gui/x/xlib/window/XCreateWindow.html\" title=\"link\" target=\"_blank\">here</a>. \"0, 0, 10, 10\" specifies the top-left corner (0,0) and the width and height of the window (10, 10). Since the goal of this is to be used for off-screen rendering, the size of the window has no effect on the rendering.\r\nLine 202 specifies the window title.\r\n\r\nIf everything goes successfully, you should see an output like this:\r\n<pre>\r\nglContext.hpp:297: GL Version  = 4.4.0 NVIDIA 331.79\r\nglContext.hpp:298: GL Vendor   = NVIDIA Corporation\r\nglContext.hpp:299: GL Renderer = GeForce GTX 690/PCIe/SSE2\r\nglContext.hpp:300: GL Shader   = 4.40 NVIDIA via Cg compiler\r\n</pre>\r\n\r\nIf you wish to use a lower minimum version, say 3.0, then the version provided by the output will reflect 3.0 since GL fetches version from the context.\r\n\r\nTo test the context creation as a stand alone, create a cpp file with the following contents (<a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.cpp\" title=\"glContext.cpp\" target=\"_blank\">glContext.cpp</a>):\r\n<pre>\r\n#include \"glContext.hpp\"\r\n\r\nint main(int argc, char* argv[])\r\n{\r\n    createGLContext();\r\n    deleteGLContext();\r\n    return 0;\r\n}\r\n</pre>\r\n\r\nCompile this with <code>g++ -o gl glContext.cpp -lGL -lX11</code> and run with <code>./gl</code> (make sure DISPLAY is :0). If this works successfully, any off-screen rendering code will work perfectly with this.\r\n<strong>Note:</strong> If you use GLEW, make sure you include glew.h before including gl.h.\r\n\r\nIf you wish to know about remote OpenGL further or work with us on remote rendering, contact us at <a href=\"mailto:technical@arrayfire.com\" >technical@arrayfire.com</a>.\r\n\r\nLinks:\r\n<a href=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" title=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" target=\"_blank\">OpenGL Context Creation Tutorial</a>\r\n<a href=\"https://github.com/arrayfire/glContext\" title=\"https://github.com/arrayfire/glContext\" target=\"_blank\">ArrayFire glContext repo on Github</a>','Remote Off-Screen Rendering with OpenGL','','inherit','open','open','','6054-revision-v1','','','2014-07-09 20:15:40','2014-07-09 20:15:40','',6054,'http://sandbox.arrayfire.com/6054-revision-v1/',0,'revision','',0),(6096,11,'2014-07-09 20:30:59','2014-07-09 20:30:59','At ArrayFire, we constantly encounter projects that require OpenGL and run on a remote server that does not have a display.\r\nIn this blog, we have compiled a list of steps that users can use to run full profile OpenGL applications over SSH on remote systems without a display.\r\n\r\nA few notes before we get started.\r\n<ul>\r\n        <li>This blog is limited to computers running distributions of Linux.\r\n	<li>The first part of the blog that shows the configuration of the xorg.conf file is limited to NVIDIA cards (with display).</li>\r\n	<li>AMD cards support this capability without the modification of xorg.conf file. However, we have not been able to get a comprehensive list of supported devices.</li>\r\n</ul>\r\n\r\n<h4>Requirements</h4>:\r\nYou will need access to the remote system over SSH.\r\nTo run the tool, you will need <code>libGL.so<code> and </code>libX11.so</code>. Another tool I would recommend strongly is glewinfo. Most linux distributions ship this with the glew-utils package. An alternate to glewinfo is glxinfo which is present on all systems with X. You can substitute glewinfo with glxinfo in all the commands below if needed.\r\n\r\n<h4 id=\"ConfigX\">Configuring X (NVIDIA Only)</h4>\r\nTo get X to running on NVIDIA cards, we need to make changes to the xorg.conf file. Before making the change, make sure you create a back up of the current version on your system (name it xorg.conf.stable).\r\nYou can find a sample xorg.conf file <a href=\"https://github.com/arrayfire/glContext/blob/master/xorg.conf\" title=\"xorg.conf\" target=\"_blank\">here</a>. The sample file is for a NVIDIA GTX 690. The specific things to notice are the use of \"UseDisplayDevice\" option under \"Screen\" and the \"Virtual\" option under \"SubSection Display\". You can use parts of this file to configure your own config file. Make sure the options listed in the sample file get listed in your config file as well.\r\nSave and close the file.\r\n\r\nNow run this command: <code># nvidia-xconfig -a --use-display-device=None --virtual=1280x1024</code>\r\nRestart the system.\r\n\r\n<strong>Note:</strong> To abort trying this, just copy xorg.conf.stable back to xorg.conf and restart.\r\n\r\nThe following is only for GeForce cards. Quadro and Tesla cards can skip to <a href=\"#InitDiag\">Initial Diagnosis</a> section.\r\n\r\nOn restart, run the command <code># /usr/bin/X :0 &</code>. Ideally, this command should give an output similar to:\r\n<pre>\r\nX.Org X Server 1.13.0\r\nRelease Date: 2012-09-05\r\nX Protocol Version 11, Revision 0\r\n\r\n<Some more output here>\r\n\r\nLoading extension GLX\r\nLoading extension NV-GLX\r\nLoading extension NV-CONTROL\r\n</pre>\r\n\r\nThis means X has started successfully on the virtual display.\r\nIf it fails, restart the system and try again. You can also look at /var/log/Xorg.0.log for the log of the failure.\r\n\r\n<h4 id=\"InitDiag\">Initial Diagnosis</h4>\r\nOnce X has started successfully, run <code>echo $DISPLAY</code>. It is very likely that the output of this will be empty.\r\nIf you have glewinfo installed, run the following command <code>env DISPLAY=:0 glewinfo | less</code>.\r\nThe goal of this command is to run glewinfo having temporarily set DISPLAY to :0 (virtual display on remote system). If this command runs successfully, you should be able to see the graphics card on the remote system along with the full OpenGL profile. And now you are ready to deploy applications using X.\r\n\r\nIf you want to set DISPLAY for the entire session, run <code>export DISPLAY=:0</code>. To set DISPLAY permanently, add the same line to your bashrc file.\r\n\r\n<h4 id=\"Deploy\">Deploying Off-Screen Rendering Applications on Remote System</h4>\r\nThis is where X becomes crucial. Tools like GLFW may or may not work on remote systems because of their dependence on Xrandr and other software. The trick is use X to create an OpenGL context, and the run everything using off-screen rendering using framebuffers and renderbuffers. I took the source to create an OpenGL context using X from <a href=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" title=\"OpenGL Context Creation Page\" target=\"_blank\"></a> and modified it slighly. Thanks to the folks at OpenGL.org for providing this. The source code with the changes I made can be found here: <a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.hpp\" target=\"_blank\">glContext.hpp</a>.\r\n\r\nInclude this in your source code. To create context and delete contexts run createGLContext() and deleteGLContext() respectively.\r\n\r\nI have specified that the minimum OpenGL version should be 4.4 with forward context enabled. You can modify this version by changing the values at lines 26 and 27 of glContext.hpp.\r\nThe forward compatibility can be disabled at line 241 by changing line 241 to None.\r\nIf the application fails to create the specified version of the context, the application will exit.\r\n\r\nAt line 189, we create the window. The API description can be found <a href=\"http://tronche.com/gui/x/xlib/window/XCreateWindow.html\" title=\"link\" target=\"_blank\">here</a>. \"0, 0, 10, 10\" specifies the top-left corner (0,0) and the width and height of the window (10, 10). Since the goal of this is to be used for off-screen rendering, the size of the window has no effect on the rendering.\r\nLine 202 specifies the window title.\r\n\r\nIf everything goes successfully, you should see an output like this:\r\n<pre>\r\nglContext.hpp:297: GL Version  = 4.4.0 NVIDIA 331.79\r\nglContext.hpp:298: GL Vendor   = NVIDIA Corporation\r\nglContext.hpp:299: GL Renderer = GeForce GTX 690/PCIe/SSE2\r\nglContext.hpp:300: GL Shader   = 4.40 NVIDIA via Cg compiler\r\n</pre>\r\n\r\nIf you wish to use a lower minimum version, say 3.0, then the version provided by the output will reflect 3.0 since GL fetches version from the context.\r\n\r\nTo test the context creation as a stand alone, create a cpp file with the following contents (<a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.cpp\" title=\"glContext.cpp\" target=\"_blank\">glContext.cpp</a>):\r\n<pre>\r\n#include \"glContext.hpp\"\r\n\r\nint main(int argc, char* argv[])\r\n{\r\n    createGLContext();\r\n    deleteGLContext();\r\n    return 0;\r\n}\r\n</pre>\r\n\r\nCompile this with <code>g++ -o gl glContext.cpp -lGL -lX11</code> and run with <code>./gl</code> (make sure DISPLAY is :0). If this works successfully, any off-screen rendering code will work perfectly with this.\r\n<strong>Note:</strong> If you use GLEW, make sure you include glew.h before including gl.h.\r\n\r\nIf you wish to know about remote OpenGL further or work with us on remote rendering, contact us at <a href=\"mailto:technical@arrayfire.com\" >technical@arrayfire.com</a>.\r\n\r\nLinks:\r\n<a href=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" title=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" target=\"_blank\">OpenGL Context Creation Tutorial</a>\r\n<a href=\"https://github.com/arrayfire/glContext\" title=\"https://github.com/arrayfire/glContext\" target=\"_blank\">ArrayFire glContext repo on Github</a>','Remote Off-Screen Rendering with OpenGL','','inherit','open','open','','6054-revision-v1','','','2014-07-09 20:30:59','2014-07-09 20:30:59','',6054,'http://sandbox.arrayfire.com/6054-revision-v1/',0,'revision','',0),(6097,11,'2014-07-09 20:31:17','2014-07-09 20:31:17','At ArrayFire, we constantly encounter projects that require OpenGL and run on a remote server that does not have a display.\r\nIn this blog, we have compiled a list of steps that users can use to run full profile OpenGL applications over SSH on remote systems without a display.\r\n\r\nA few notes before we get started.\r\n<ul>\r\n        <li>This blog is limited to computers running distributions of Linux.\r\n	<li>The first part of the blog that shows the configuration of the xorg.conf file is limited to NVIDIA cards (with display).</li>\r\n	<li>AMD cards support this capability without the modification of xorg.conf file. However, we have not been able to get a comprehensive list of supported devices.</li>\r\n</ul>\r\n\r\n<h4>Requirements</h4>\r\nYou will need access to the remote system over SSH.\r\nTo run the tool, you will need <code>libGL.so<code> and </code>libX11.so</code>. Another tool I would recommend strongly is glewinfo. Most linux distributions ship this with the glew-utils package. An alternate to glewinfo is glxinfo which is present on all systems with X. You can substitute glewinfo with glxinfo in all the commands below if needed.\r\n\r\n<h4 id=\"ConfigX\">Configuring X (NVIDIA Only)</h4>\r\nTo get X to running on NVIDIA cards, we need to make changes to the xorg.conf file. Before making the change, make sure you create a back up of the current version on your system (name it xorg.conf.stable).\r\nYou can find a sample xorg.conf file <a href=\"https://github.com/arrayfire/glContext/blob/master/xorg.conf\" title=\"xorg.conf\" target=\"_blank\">here</a>. The sample file is for a NVIDIA GTX 690. The specific things to notice are the use of \"UseDisplayDevice\" option under \"Screen\" and the \"Virtual\" option under \"SubSection Display\". You can use parts of this file to configure your own config file. Make sure the options listed in the sample file get listed in your config file as well.\r\nSave and close the file.\r\n\r\nNow run this command: <code># nvidia-xconfig -a --use-display-device=None --virtual=1280x1024</code>\r\nRestart the system.\r\n\r\n<strong>Note:</strong> To abort trying this, just copy xorg.conf.stable back to xorg.conf and restart.\r\n\r\nThe following is only for GeForce cards. Quadro and Tesla cards can skip to <a href=\"#InitDiag\">Initial Diagnosis</a> section.\r\n\r\nOn restart, run the command <code># /usr/bin/X :0 &</code>. Ideally, this command should give an output similar to:\r\n<pre>\r\nX.Org X Server 1.13.0\r\nRelease Date: 2012-09-05\r\nX Protocol Version 11, Revision 0\r\n\r\n<Some more output here>\r\n\r\nLoading extension GLX\r\nLoading extension NV-GLX\r\nLoading extension NV-CONTROL\r\n</pre>\r\n\r\nThis means X has started successfully on the virtual display.\r\nIf it fails, restart the system and try again. You can also look at /var/log/Xorg.0.log for the log of the failure.\r\n\r\n<h4 id=\"InitDiag\">Initial Diagnosis</h4>\r\nOnce X has started successfully, run <code>echo $DISPLAY</code>. It is very likely that the output of this will be empty.\r\nIf you have glewinfo installed, run the following command <code>env DISPLAY=:0 glewinfo | less</code>.\r\nThe goal of this command is to run glewinfo having temporarily set DISPLAY to :0 (virtual display on remote system). If this command runs successfully, you should be able to see the graphics card on the remote system along with the full OpenGL profile. And now you are ready to deploy applications using X.\r\n\r\nIf you want to set DISPLAY for the entire session, run <code>export DISPLAY=:0</code>. To set DISPLAY permanently, add the same line to your bashrc file.\r\n\r\n<h4 id=\"Deploy\">Deploying Off-Screen Rendering Applications on Remote System</h4>\r\nThis is where X becomes crucial. Tools like GLFW may or may not work on remote systems because of their dependence on Xrandr and other software. The trick is use X to create an OpenGL context, and the run everything using off-screen rendering using framebuffers and renderbuffers. I took the source to create an OpenGL context using X from <a href=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" title=\"OpenGL Context Creation Page\" target=\"_blank\"></a> and modified it slighly. Thanks to the folks at OpenGL.org for providing this. The source code with the changes I made can be found here: <a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.hpp\" target=\"_blank\">glContext.hpp</a>.\r\n\r\nInclude this in your source code. To create context and delete contexts run createGLContext() and deleteGLContext() respectively.\r\n\r\nI have specified that the minimum OpenGL version should be 4.4 with forward context enabled. You can modify this version by changing the values at lines 26 and 27 of glContext.hpp.\r\nThe forward compatibility can be disabled at line 241 by changing line 241 to None.\r\nIf the application fails to create the specified version of the context, the application will exit.\r\n\r\nAt line 189, we create the window. The API description can be found <a href=\"http://tronche.com/gui/x/xlib/window/XCreateWindow.html\" title=\"link\" target=\"_blank\">here</a>. \"0, 0, 10, 10\" specifies the top-left corner (0,0) and the width and height of the window (10, 10). Since the goal of this is to be used for off-screen rendering, the size of the window has no effect on the rendering.\r\nLine 202 specifies the window title.\r\n\r\nIf everything goes successfully, you should see an output like this:\r\n<pre>\r\nglContext.hpp:297: GL Version  = 4.4.0 NVIDIA 331.79\r\nglContext.hpp:298: GL Vendor   = NVIDIA Corporation\r\nglContext.hpp:299: GL Renderer = GeForce GTX 690/PCIe/SSE2\r\nglContext.hpp:300: GL Shader   = 4.40 NVIDIA via Cg compiler\r\n</pre>\r\n\r\nIf you wish to use a lower minimum version, say 3.0, then the version provided by the output will reflect 3.0 since GL fetches version from the context.\r\n\r\nTo test the context creation as a stand alone, create a cpp file with the following contents (<a href=\"https://github.com/arrayfire/glContext/blob/master/glContext.cpp\" title=\"glContext.cpp\" target=\"_blank\">glContext.cpp</a>):\r\n<pre>\r\n#include \"glContext.hpp\"\r\n\r\nint main(int argc, char* argv[])\r\n{\r\n    createGLContext();\r\n    deleteGLContext();\r\n    return 0;\r\n}\r\n</pre>\r\n\r\nCompile this with <code>g++ -o gl glContext.cpp -lGL -lX11</code> and run with <code>./gl</code> (make sure DISPLAY is :0). If this works successfully, any off-screen rendering code will work perfectly with this.\r\n<strong>Note:</strong> If you use GLEW, make sure you include glew.h before including gl.h.\r\n\r\nIf you wish to know about remote OpenGL further or work with us on remote rendering, contact us at <a href=\"mailto:technical@arrayfire.com\" >technical@arrayfire.com</a>.\r\n\r\nLinks:\r\n<a href=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" title=\"http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)\" target=\"_blank\">OpenGL Context Creation Tutorial</a>\r\n<a href=\"https://github.com/arrayfire/glContext\" title=\"https://github.com/arrayfire/glContext\" target=\"_blank\">ArrayFire glContext repo on Github</a>','Remote Off-Screen Rendering with OpenGL','','inherit','open','open','','6054-revision-v1','','','2014-07-09 20:31:17','2014-07-09 20:31:17','',6054,'http://sandbox.arrayfire.com/6054-revision-v1/',0,'revision','',0),(6099,17729,'2014-07-11 15:00:27','2014-07-11 15:00:27','<p>In this post, we will be looking at the following simple image editing operations using the ArrayFire library.</p>\r\n<ul>\r\n<li>contrast modification<br /></li>\r\n<li>brightness modification<br /></li>\r\n<li>translation<br /></li>\r\n<li>digital zoom<br /></li>\r\n<li>alpha blending<br /></li>\r\n<li>unsharp mask</li>\r\n</ul>\r\n<p>Code required to do each operation and the corresponding input/output sample are given below in their corresponding sections. All the operations are built using some existing image manipulation functions and the awesome element-wise operations in ArrayFire.\r\n<h4 id=\"contrast-modification\">Contrast modification</h4>\r\n<pre>\r\n/**\r\n * contrast value should be in the range [-1,1]\r\n **/\r\nvoid changeContrast(array &in, const float contrast)\r\n{\r\n    float scale     = tan((contrast+1)*Pi/4);\r\n    in = ((in/255.0f - 0.5f) * scale + 0.5f) * 255.0f;\r\n}\r\n</pre>\r\n<div style = \"text-align:center\">\r\n <div style=\"display: inline-block; margin-right: 5px\">\r\n   <a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/man.jpg\">\r\n     <img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/man.jpg\" alt=\"man\" width=\"226\" height=\"300\" class=\"alignnone size-full wp-image-6108\"/>\r\n   </a>\r\n </div>\r\n <div style=\"display: inline-block\">\r\n   <a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/highcon.jpg\">\r\n     <img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/highcon.jpg\" alt=\"highcon\" width=\"226\" height=\"300\" class=\"alignnone size-full wp-image-6106\"/>\r\n   </a>\r\n </div>\r\n</div>\r\n<h4 id=\"brightness-modification\">Brightness modification</h4>\r\n<pre>\r\n/**\r\n * brightness value should be in the range [0,1]\r\n **/\r\nvoid changeBrightness(array &in, const float brightness, const float channelMax=255.0f)\r\n{\r\n    float factor = brightness*channelMax;\r\n    in = (in + factor);\r\n}\r\n</pre>\r\n<div style = \"text-align:center\">\r\n <div style=\"display: inline-block; margin-right: 5px\">\r\n   <a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/man.jpg\">\r\n     <img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/man.jpg\" alt=\"man\" width=\"226\" height=\"300\" class=\"alignnone size-full wp-image-6108\"/>\r\n   </a>\r\n </div>\r\n <div style=\"display: inline-block\">\r\n   <a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/highbright.jpg\">\r\n     <img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/highbright.jpg\" alt=\"highbright\" width=\"226\" height=\"300\" class=\"alignnone size-full wp-image-6105\" />\r\n   </a>\r\n </div>\r\n</div>\r\n<p>You may add an additional step to the above function that clamps each pixel value to [0,255] range. Clamping can be easily achieved by the following line of code.</p>\r\n<pre>\r\nimage = (image<0.0f)*0.0f + (image>255.0f)*255.0f + (image>=0.0f && image<=255.0f)*image;\r\n</pre>\r\nor a more generalized clamp/thresholding operation would like as below.\r\n<pre>\r\narray clamp(const array &in, float min=0.0f, float max=255.0f)\r\n{\r\n    return ((in<min)*0.0f + (in>max)*255.0f + (in>=min && in <=max)*in);\r\n}\r\n</pre>\r\n\r\n<h4 id=\"image-translation\">Image translation</h4>\r\n<p>This operation can be achieved directly by a function in our library <a href=\"http://www.sandbox.arrayfire.com/docs/group__image__func__cpp__translate.htm#ga1615c8ea000ad113a0dc7a9313d7b645\"><code>translate</code></a>. A sample output of the function <code>translate(a,100,100,200,126)</code> on the sample input is provided below.</p> \r\n<div style = \"text-align:center\">\r\n <div style=\"display: inline-block; margin-right: 5px\">\r\n   <a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/man.jpg\">\r\n     <img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/man.jpg\" alt=\"man\" width=\"226\" height=\"300\" class=\"alignnone size-full wp-image-6108\" />\r\n   </a>\r\n </div>\r\n <div style=\"display: inline-block\">\r\n<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/translated.jpg\"><img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/translated.jpg\" alt=\"translated\" width=\"126\" height=\"200\" class=\"alignnone size-full wp-image-6110\" /></a>\r\n </div>\r\n</div>\r\n<h4 id=\"digital-zoom\">Digital Zoom</h4>\r\n<pre>\r\narray digZoom(const array &in, int x, int y, int width, int height)\r\n{\r\n    array cropped = in(seq(height)+x,seq(width)+y,span);\r\n    return resize((unsigned)in.dims(0),(unsigned)in.dims(1),cropped);\r\n}\r\n</pre>\r\n<div style = \"text-align:center\">\r\n <div style=\"display: inline-block; margin-right: 5px\">\r\n   <a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/man.jpg\">\r\n     <img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/man.jpg\" alt=\"man\" width=\"226\" height=\"300\" class=\"alignnone size-full wp-image-6108\"/>\r\n   </a>\r\n </div>\r\n <div style=\"display: inline-block\">\r\n   <a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/zoom.jpg\">\r\n     <img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/zoom.jpg\" alt=\"zoom\" width=\"226\" height=\"300\" class=\"alignnone size-full wp-image-6112\" />\r\n   </a>\r\n </div>\r\n</div>\r\n<h4 id=\"alpha-blending\">Alpha Blending</h4>\r\n<pre>\r\narray alphaBlend(const array &foreground, const array &background, const array &mask)\r\n{\r\n    array tiledMask;\r\n    if (mask.dims(2)!=foreground.dims(2))\r\n        tiledMask = tile(mask,1,1,foreground.dims(2));\r\n    return foreground*tiledMask+(1.0f-tiledMask)*background;\r\n}\r\n</pre>\r\n<p>For the purpose of this example, a very simple mask was created using the following code stub.\r\n<pre>\r\narray intensity = colorspace(fight,af_gray,af_rgb);\r\narray mask = clamp(intensity,10.0f,255.0f)>0.0f;\r\n</pre>\r\nA more detailed and accurate mask would deliver more appropriate blending.</p>\r\n<div style = \"text-align:center\">\r\n <div style=\"display: inline-block; margin-right: 5px\">\r\n   <a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/nature.jpg\">\r\n     <img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/nature-300x168.jpg\" alt=\"nature\" width=\"300\" height=\"168\" class=\"alignnone size-medium wp-image-6109\" />\r\n   </a>\r\n </div>\r\n <div style=\"display: inline-block\">\r\n   <a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/fight.jpg\">\r\n     <img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/fight-300x168.jpg\" alt=\"fight\" width=\"300\" height=\"168\" class=\"alignnone size-medium wp-image-6104\" />\r\n   </a>\r\n </div>\r\n <div style=\"display: inline-block\">\r\n   <a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/blend.jpg\">\r\n     <img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/blend-300x168.jpg\" alt=\"blend\" width=\"300\" height=\"168\" class=\"alignnone size-medium wp-image-6103\" />\r\n   </a>\r\n </div>\r\n</div>\r\n<h4 id=\"unsharpmask\">Unsharpmask</h4>\r\n<pre>\r\n/**\r\n * radius effects the level of details that will effected during sharpening process\r\n * amount value should be in the range [0,1] or [1,]\r\n * note: value of 1.0 for amount results unsharp masking\r\n *       values > 1.0 results in highboost filter effect\r\n **/\r\narray usm(const array &in, float radius, float amount)\r\n{\r\n    int gKernelLen  = 2*radius + 1;\r\n    array blurKernel= gaussiankernel(gKernelLen,gKernelLen);\r\n    array blur  = convolve(in,blurKernel);\r\n    return (in + amount*(in - blur));\r\n}\r\n</pre>\r\n<div style = \"text-align:center\">\r\n <div style=\"display: inline-block; margin-right: 5px\">\r\n   <a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/man.jpg\">\r\n     <img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/man.jpg\" alt=\"man\" width=\"226\" height=\"300\" class=\"alignnone size-full wp-image-6108\" />\r\n   </a>\r\n </div>\r\n <div style=\"display: inline-block\">\r\n   <a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/usm.jpg\">\r\n     <img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/usm.jpg\" alt=\"usm\" width=\"226\" height=\"300\" class=\"alignnone size-full wp-image-6111\" />\r\n   </a>\r\n </div>\r\n</div>\r\n<h4>Conclusion</h4>\r\nWe are working on a free image editing application based on ArrayFire. This is the first part of the series that discusses our progress. You can follow the project <a href=\"https://github.com/9prady9/wildfire\">here</a>.','Image editing using ArrayFire','','publish','open','open','','image-editing-using-arrayfire','','','2014-07-11 19:17:02','2014-07-11 19:17:02','',0,'http://sandbox.arrayfire.com/?p=6099',0,'post','',2),(6100,17729,'2014-07-11 14:43:50','2014-07-11 14:43:50','<h1 id=\"image-editing-operations-using-arrayfire\">Image editing operations using ArrayFire</h1>\r\n<p>In this post, we will be looking at the following simple image editing operations using the ArrayFire library.</p>\r\n<ul>\r\n<li>contrast modification<br /></li>\r\n<li>brightness modification<br /></li>\r\n<li>translation<br /></li>\r\n<li>digital zoom<br /></li>\r\n<li>alpha blending<br /></li>\r\n<li>unsharp mask</li>\r\n</ul>\r\n<p>Code required to do each operation and the corresponding input/output sample are given below in their corresponding sections.<br />All the operations are built using some existing image manipulation functions and the awesome element-wise operations enabled in ArrayFire.<br />If you are not aware of what the JIT feature in ArrayFire lets you do, please refer to one of our previous post here.</p>\r\n<h2 id=\"contrast-modification\">Contrast modification</h2>\r\n<pre class=\"sourceCode c\"><code class=\"sourceCode c\"><span class=\"co\">/**</span>\r\n<span class=\"co\"> * contrast value should be in the range [-1,1]</span>\r\n<span class=\"co\"> **/</span>\r\n<span class=\"dt\">void</span> changeContrast(array &amp;in, <span class=\"dt\">const</span> <span class=\"dt\">float</span> contrast)\r\n{\r\n    <span class=\"dt\">float</span> scale     = tan((contrast<span class=\"dv\">+1</span>)*Pi/<span class=\"dv\">4</span>);\r\n    in = ((in/<span class=\"fl\">255.</span>0f - <span class=\"fl\">0.</span>5f) * scale + <span class=\"fl\">0.</span>5f) * <span class=\"fl\">255.</span>0f;\r\n}</code></pre>\r\n<h2 id=\"brightness-modification\">Brightness modification</h2>\r\n<pre class=\"sourceCode c\"><code class=\"sourceCode c\"><span class=\"co\">/**</span>\r\n<span class=\"co\"> * brightness value should be in the range [0,1]</span>\r\n<span class=\"co\"> **/</span>\r\n<span class=\"dt\">void</span> changeBrightness(array &amp;in, <span class=\"dt\">const</span> <span class=\"dt\">float</span> brightness, <span class=\"dt\">const</span> <span class=\"dt\">float</span> channelMax=<span class=\"fl\">255.</span>0f)\r\n{\r\n    <span class=\"dt\">float</span> factor = brightness*channelMax;\r\n    <span class=\"kw\">return</span> (in + factor);\r\n}</code></pre>\r\n<p>You may add an additional step to the above function that clamps each pixel value to [0,255] range. Clamping can be easily achieved by the following line of code.</p>\r\n<pre class=\"sourceCode c\"><code class=\"sourceCode c\">image = (image&lt;<span class=\"fl\">0.</span>0f)*<span class=\"fl\">0.</span>0f + (image&gt;<span class=\"fl\">255.</span>0f)*<span class=\"fl\">255.</span>0f + (image&gt;=<span class=\"fl\">0.</span>0f &amp;&amp; image&lt;=<span class=\"fl\">255.</span>0f)*image;</code></pre>\r\n<p>or a more generalized thresholding operation would like as below.</p>\r\n<pre class=\"sourceCode c\"><code class=\"sourceCode c\">array clamp(<span class=\"dt\">const</span> array &amp;in, <span class=\"dt\">float</span> min=<span class=\"fl\">0.</span>0f, <span class=\"dt\">float</span> max=<span class=\"fl\">255.</span>0f)\r\n{\r\n    <span class=\"kw\">return</span> ((in&lt;min)*<span class=\"fl\">0.</span>0f + (in&gt;max)*<span class=\"fl\">255.</span>0f + (in&gt;=min &amp;&amp; in &lt;=max)*in);\r\n}</code></pre>\r\n<h2 id=\"image-translation\">Image translation</h2>\r\n<p>This operation can be achieved directly by a function in our library <code>translate</code>.</p>\r\n<h2 id=\"digital-zoom\">Digital Zoom</h2>\r\n<pre class=\"sourceCode c\"><code class=\"sourceCode c\">array digZoom(<span class=\"dt\">const</span> array &amp;in, <span class=\"dt\">int</span> x, <span class=\"dt\">int</span> y, <span class=\"dt\">int</span> width, <span class=\"dt\">int</span> height)\r\n{\r\n    array cropped = in(seq(height)+x,seq(width)+y,span);\r\n    <span class=\"kw\">return</span> resize((<span class=\"dt\">unsigned</span>)in.dims(<span class=\"dv\">0</span>),(<span class=\"dt\">unsigned</span>)in.dims(<span class=\"dv\">1</span>),cropped);\r\n}</code></pre>\r\n<h2 id=\"alpha-blending\">Alpha Blending</h2>\r\n<pre class=\"sourceCode c\"><code class=\"sourceCode c\">array alphaBlend(<span class=\"dt\">const</span> array &amp;foreground, <span class=\"dt\">const</span> array &amp;background, <span class=\"dt\">const</span> array &amp;mask)\r\n{\r\n    array tiledMask;\r\n    <span class=\"kw\">if</span> (mask.dims(<span class=\"dv\">2</span>)!=foreground.dims(<span class=\"dv\">2</span>))\r\n        tiledMask = tile(mask,<span class=\"dv\">1</span>,<span class=\"dv\">1</span>,foreground.dims(<span class=\"dv\">2</span>));\r\n    <span class=\"kw\">return</span> foreground*tiledMask+(<span class=\"fl\">1.</span>0f-tiledMask)*background;\r\n}</code></pre>\r\n<p>For the purpose of this example, a very simple mask was created using this single line of code <code>array mask = clamp(intensity,10.0f,255.0f)&gt;0.0f;</code>. A more detailed and accurate mask would deliver more appropiate blending.</p>\r\n<h2 id=\"unsharpmask\">Unsharpmask</h2>\r\n<pre class=\"sourceCode c\"><code class=\"sourceCode c\"><span class=\"co\">/**</span>\r\n<span class=\"co\"> * radius effects the level of details that will effected during sharpening process</span>\r\n<span class=\"co\"> * amount value should be in the range [0,1] or [1,]</span>\r\n<span class=\"co\"> * note: value of 1.0 for amount results unsharp masking</span>\r\n<span class=\"co\"> *       values &gt; 1.0 results in highboost filter effect</span>\r\n<span class=\"co\"> **/</span>\r\narray usm(<span class=\"dt\">const</span> array &amp;in, <span class=\"dt\">float</span> radius, <span class=\"dt\">float</span> amount)\r\n{\r\n    <span class=\"dt\">int</span> gKernelLen  = <span class=\"dv\">2</span>*radius + <span class=\"dv\">1</span>;\r\n    array blurKernel= gaussiankernel(gKernelLen,gKernelLen);\r\n    array blur  = convolve(in,blurKernel);\r\n    <span class=\"kw\">return</span> (in + amount*(in - blur));\r\n}</code></pre>','','','inherit','open','open','','6099-revision-v1','','','2014-07-11 14:43:50','2014-07-11 14:43:50','',6099,'http://sandbox.arrayfire.com/6099-revision-v1/',0,'revision','',0),(6101,17729,'2014-07-11 14:44:31','2014-07-11 14:44:31','<h3 id=\"image-editing-operations-using-arrayfire\">Image editing operations using ArrayFire</h3>\r\n<p>In this post, we will be looking at the following simple image editing operations using the ArrayFire library.</p>\r\n<ul>\r\n<li>contrast modification<br /></li>\r\n<li>brightness modification<br /></li>\r\n<li>translation<br /></li>\r\n<li>digital zoom<br /></li>\r\n<li>alpha blending<br /></li>\r\n<li>unsharp mask</li>\r\n</ul>\r\n<p>Code required to do each operation and the corresponding input/output sample are given below in their corresponding sections.<br />All the operations are built using some existing image manipulation functions and the awesome element-wise operations enabled in ArrayFire.<br />If you are not aware of what the JIT feature in ArrayFire lets you do, please refer to one of our previous post here.</p>\r\n<h4 id=\"contrast-modification\">Contrast modification</h4>\r\n<pre class=\"sourceCode c\"><code class=\"sourceCode c\"><span class=\"co\">/**</span>\r\n<span class=\"co\"> * contrast value should be in the range [-1,1]</span>\r\n<span class=\"co\"> **/</span>\r\n<span class=\"dt\">void</span> changeContrast(array &amp;in, <span class=\"dt\">const</span> <span class=\"dt\">float</span> contrast)\r\n{\r\n    <span class=\"dt\">float</span> scale     = tan((contrast<span class=\"dv\">+1</span>)*Pi/<span class=\"dv\">4</span>);\r\n    in = ((in/<span class=\"fl\">255.</span>0f - <span class=\"fl\">0.</span>5f) * scale + <span class=\"fl\">0.</span>5f) * <span class=\"fl\">255.</span>0f;\r\n}</code></pre>\r\n<h2 id=\"brightness-modification\">Brightness modification</h2>\r\n<pre class=\"sourceCode c\"><code class=\"sourceCode c\"><span class=\"co\">/**</span>\r\n<span class=\"co\"> * brightness value should be in the range [0,1]</span>\r\n<span class=\"co\"> **/</span>\r\n<span class=\"dt\">void</span> changeBrightness(array &amp;in, <span class=\"dt\">const</span> <span class=\"dt\">float</span> brightness, <span class=\"dt\">const</span> <span class=\"dt\">float</span> channelMax=<span class=\"fl\">255.</span>0f)\r\n{\r\n    <span class=\"dt\">float</span> factor = brightness*channelMax;\r\n    <span class=\"kw\">return</span> (in + factor);\r\n}</code></pre>\r\n<p>You may add an additional step to the above function that clamps each pixel value to [0,255] range. Clamping can be easily achieved by the following line of code.</p>\r\n<pre class=\"sourceCode c\"><code class=\"sourceCode c\">image = (image&lt;<span class=\"fl\">0.</span>0f)*<span class=\"fl\">0.</span>0f + (image&gt;<span class=\"fl\">255.</span>0f)*<span class=\"fl\">255.</span>0f + (image&gt;=<span class=\"fl\">0.</span>0f &amp;&amp; image&lt;=<span class=\"fl\">255.</span>0f)*image;</code></pre>\r\n<p>or a more generalized thresholding operation would like as below.</p>\r\n<pre class=\"sourceCode c\"><code class=\"sourceCode c\">array clamp(<span class=\"dt\">const</span> array &amp;in, <span class=\"dt\">float</span> min=<span class=\"fl\">0.</span>0f, <span class=\"dt\">float</span> max=<span class=\"fl\">255.</span>0f)\r\n{\r\n    <span class=\"kw\">return</span> ((in&lt;min)*<span class=\"fl\">0.</span>0f + (in&gt;max)*<span class=\"fl\">255.</span>0f + (in&gt;=min &amp;&amp; in &lt;=max)*in);\r\n}</code></pre>\r\n<h2 id=\"image-translation\">Image translation</h2>\r\n<p>This operation can be achieved directly by a function in our library <code>translate</code>.</p>\r\n<h2 id=\"digital-zoom\">Digital Zoom</h2>\r\n<pre class=\"sourceCode c\"><code class=\"sourceCode c\">array digZoom(<span class=\"dt\">const</span> array &amp;in, <span class=\"dt\">int</span> x, <span class=\"dt\">int</span> y, <span class=\"dt\">int</span> width, <span class=\"dt\">int</span> height)\r\n{\r\n    array cropped = in(seq(height)+x,seq(width)+y,span);\r\n    <span class=\"kw\">return</span> resize((<span class=\"dt\">unsigned</span>)in.dims(<span class=\"dv\">0</span>),(<span class=\"dt\">unsigned</span>)in.dims(<span class=\"dv\">1</span>),cropped);\r\n}</code></pre>\r\n<h2 id=\"alpha-blending\">Alpha Blending</h2>\r\n<pre class=\"sourceCode c\"><code class=\"sourceCode c\">array alphaBlend(<span class=\"dt\">const</span> array &amp;foreground, <span class=\"dt\">const</span> array &amp;background, <span class=\"dt\">const</span> array &amp;mask)\r\n{\r\n    array tiledMask;\r\n    <span class=\"kw\">if</span> (mask.dims(<span class=\"dv\">2</span>)!=foreground.dims(<span class=\"dv\">2</span>))\r\n        tiledMask = tile(mask,<span class=\"dv\">1</span>,<span class=\"dv\">1</span>,foreground.dims(<span class=\"dv\">2</span>));\r\n    <span class=\"kw\">return</span> foreground*tiledMask+(<span class=\"fl\">1.</span>0f-tiledMask)*background;\r\n}</code></pre>\r\n<p>For the purpose of this example, a very simple mask was created using this single line of code <code>array mask = clamp(intensity,10.0f,255.0f)&gt;0.0f;</code>. A more detailed and accurate mask would deliver more appropiate blending.</p>\r\n<h2 id=\"unsharpmask\">Unsharpmask</h2>\r\n<pre class=\"sourceCode c\"><code class=\"sourceCode c\"><span class=\"co\">/**</span>\r\n<span class=\"co\"> * radius effects the level of details that will effected during sharpening process</span>\r\n<span class=\"co\"> * amount value should be in the range [0,1] or [1,]</span>\r\n<span class=\"co\"> * note: value of 1.0 for amount results unsharp masking</span>\r\n<span class=\"co\"> *       values &gt; 1.0 results in highboost filter effect</span>\r\n<span class=\"co\"> **/</span>\r\narray usm(<span class=\"dt\">const</span> array &amp;in, <span class=\"dt\">float</span> radius, <span class=\"dt\">float</span> amount)\r\n{\r\n    <span class=\"dt\">int</span> gKernelLen  = <span class=\"dv\">2</span>*radius + <span class=\"dv\">1</span>;\r\n    array blurKernel= gaussiankernel(gKernelLen,gKernelLen);\r\n    array blur  = convolve(in,blurKernel);\r\n    <span class=\"kw\">return</span> (in + amount*(in - blur));\r\n}</code></pre>','','','inherit','open','open','','6099-revision-v1','','','2014-07-11 14:44:31','2014-07-11 14:44:31','',6099,'http://sandbox.arrayfire.com/6099-revision-v1/',0,'revision','',0),(6102,17729,'2014-07-11 14:50:35','2014-07-11 14:50:35','<h2 id=\"image-editing-operations-using-arrayfire\">Image editing operations using ArrayFire</h2>\r\n<p>In this post, we will be looking at the following simple image editing operations using the ArrayFire library.</p>\r\n<ul>\r\n<li>contrast modification<br /></li>\r\n<li>brightness modification<br /></li>\r\n<li>translation<br /></li>\r\n<li>digital zoom<br /></li>\r\n<li>alpha blending<br /></li>\r\n<li>unsharp mask</li>\r\n</ul>\r\n<p>Code required to do each operation and the corresponding input/output sample are given below in their corresponding sections.<br />All the operations are built using some existing image manipulation functions and the awesome element-wise operations enabled in ArrayFire.<br />If you are not aware of what the JIT feature in ArrayFire lets you do, please refer to one of our previous post here.</p>\r\n<h3 id=\"contrast-modification\">Contrast modification</h3>\r\n\r\n<pre>\r\n/**\r\n * contrast value should be in the range [-1,1]\r\n **/\r\nvoid changeContrast(array &in, const float contrast)\r\n{\r\n    float scale     = tan((contrast+1)*Pi/4);\r\n    in = ((in/255.0f - 0.5f) * scale + 0.5f) * 255.0f;\r\n}\r\n</pre>\r\n\r\n<h3 id=\"brightness-modification\">Brightness modification</h3>\r\n<pre>\r\n/**\r\n * brightness value should be in the range [0,1]\r\n **/\r\nvoid changeBrightness(array &in, const float brightness, const float channelMax=255.0f)\r\n{\r\n    float factor = brightness*channelMax;\r\n    return (in + factor);\r\n}\r\n</pre>\r\n<p>You may add an additional step to the above function that clamps each pixel value to [0,255] range. Clamping can be easily achieved by the following line of code.</p>\r\n<pre>\r\nimage = (image<0.0f)*0.0f + (image>255.0f)*255.0f + (image>=0.0f && image<=255.0f)*image;\r\n</pre>\r\nor a more generalized thresholding operation would like as below.\r\n<pre>\r\narray clamp(const array &in, float min=0.0f, float max=255.0f)\r\n{\r\n    return ((in<min)*0.0f + (in>max)*255.0f + (in>=min && in <=max)*in);\r\n}\r\n</pre>\r\n\r\n<h3 id=\"image-translation\">Image translation</h3>\r\n<p>This operation can be achieved directly by a function in our library <code>translate</code>.</p>\r\n<h3 id=\"digital-zoom\">Digital Zoom</h3>\r\n<pre>\r\narray digZoom(const array &in, int x, int y, int width, int height)\r\n{\r\n    array cropped = in(seq(height)+x,seq(width)+y,span);\r\n    return resize((unsigned)in.dims(0),(unsigned)in.dims(1),cropped);\r\n}\r\n</pre>\r\n<h3 id=\"alpha-blending\">Alpha Blending</h3>\r\n<pre>\r\narray alphaBlend(const array &foreground, const array &background, const array &mask)\r\n{\r\n    array tiledMask;\r\n    if (mask.dims(2)!=foreground.dims(2))\r\n        tiledMask = tile(mask,1,1,foreground.dims(2));\r\n    return foreground*tiledMask+(1.0f-tiledMask)*background;\r\n}\r\n</pre>\r\n<p>For the purpose of this example, a very simple mask was created using this single line of code <code>array mask = clamp(intensity,10.0f,255.0f)&gt;0.0f;</code>. A more detailed and accurate mask would deliver more appropiate blending.</p>\r\n<h3 id=\"unsharpmask\">Unsharpmask</h3>\r\n<pre>\r\n/**\r\n * radius effects the level of details that will effected during sharpening process\r\n * amount value should be in the range [0,1] or [1,]\r\n * note: value of 1.0 for amount results unsharp masking\r\n *       values > 1.0 results in highboost filter effect\r\n **/\r\narray usm(const array &in, float radius, float amount)\r\n{\r\n    int gKernelLen  = 2*radius + 1;\r\n    array blurKernel= gaussiankernel(gKernelLen,gKernelLen);\r\n    array blur  = convolve(in,blurKernel);\r\n    return (in + amount*(in - blur));\r\n}\r\n</pre>','','','inherit','open','open','','6099-revision-v1','','','2014-07-11 14:50:35','2014-07-11 14:50:35','',6099,'http://sandbox.arrayfire.com/6099-revision-v1/',0,'revision','',0),(6103,17729,'2014-07-11 15:01:51','2014-07-11 15:01:51','','blend','','inherit','open','open','','blend','','','2014-07-11 15:01:51','2014-07-11 15:01:51','',6099,'http://sandbox.arrayfire.com/wp-content/uploads/2014/07/blend.jpg',0,'attachment','image/jpeg',0),(6104,17729,'2014-07-11 15:01:54','2014-07-11 15:01:54','','fight','','inherit','open','open','','fight','','','2014-07-11 15:01:54','2014-07-11 15:01:54','',6099,'http://sandbox.arrayfire.com/wp-content/uploads/2014/07/fight.jpg',0,'attachment','image/jpeg',0),(6106,17729,'2014-07-11 15:01:57','2014-07-11 15:01:57','','highcon','','inherit','open','open','','highcon','','','2014-07-11 15:01:57','2014-07-11 15:01:57','',6099,'http://sandbox.arrayfire.com/wp-content/uploads/2014/07/highcon.jpg',0,'attachment','image/jpeg',0),(6107,17729,'2014-07-11 15:01:58','2014-07-11 15:01:58','','intensity','','inherit','open','open','','intensity','','','2014-07-11 15:01:58','2014-07-11 15:01:58','',6099,'http://sandbox.arrayfire.com/wp-content/uploads/2014/07/intensity.jpg',0,'attachment','image/jpeg',0),(6108,17729,'2014-07-11 15:02:01','2014-07-11 15:02:01','','man','','inherit','open','open','','man','','','2014-07-11 15:02:01','2014-07-11 15:02:01','',6099,'http://sandbox.arrayfire.com/wp-content/uploads/2014/07/man.jpg',0,'attachment','image/jpeg',0),(6109,17729,'2014-07-11 15:02:02','2014-07-11 15:02:02','','nature','','inherit','open','open','','nature','','','2014-07-11 15:02:02','2014-07-11 15:02:02','',6099,'http://sandbox.arrayfire.com/wp-content/uploads/2014/07/nature.jpg',0,'attachment','image/jpeg',0),(6110,17729,'2014-07-11 15:02:06','2014-07-11 15:02:06','','translated','','inherit','open','open','','translated','','','2014-07-11 15:02:06','2014-07-11 15:02:06','',6099,'http://sandbox.arrayfire.com/wp-content/uploads/2014/07/translated.jpg',0,'attachment','image/jpeg',0),(6111,17729,'2014-07-11 15:02:06','2014-07-11 15:02:06','','usm','','inherit','open','open','','usm','','','2014-07-11 15:02:06','2014-07-11 15:02:06','',6099,'http://sandbox.arrayfire.com/wp-content/uploads/2014/07/usm.jpg',0,'attachment','image/jpeg',0),(6112,17729,'2014-07-11 15:02:07','2014-07-11 15:02:07','','zoom','','inherit','open','open','','zoom','','','2014-07-11 15:02:07','2014-07-11 15:02:07','',6099,'http://sandbox.arrayfire.com/wp-content/uploads/2014/07/zoom.jpg',0,'attachment','image/jpeg',0),(6113,17729,'2014-07-11 15:03:35','2014-07-11 15:03:35','<h2 id=\"image-editing-operations-using-arrayfire\">Image editing operations using ArrayFire</h2>\r\n<p>In this post, we will be looking at the following simple image editing operations using the ArrayFire library.</p>\r\n<ul>\r\n<li>contrast modification<br /></li>\r\n<li>brightness modification<br /></li>\r\n<li>translation<br /></li>\r\n<li>digital zoom<br /></li>\r\n<li>alpha blending<br /></li>\r\n<li>unsharp mask</li>\r\n</ul>\r\n<p>Code required to do each operation and the corresponding input/output sample are given below in their corresponding sections.<br />All the operations are built using some existing image manipulation functions and the awesome element-wise operations enabled in ArrayFire.<br />If you are not aware of what the JIT feature in ArrayFire lets you do, please refer to one of our previous post here.</p>\r\n<h3 id=\"contrast-modification\">Contrast modification</h3>\r\n\r\n<pre>\r\n/**\r\n * contrast value should be in the range [-1,1]\r\n **/\r\nvoid changeContrast(array &in, const float contrast)\r\n{\r\n    float scale     = tan((contrast+1)*Pi/4);\r\n    in = ((in/255.0f - 0.5f) * scale + 0.5f) * 255.0f;\r\n}\r\n</pre>\r\n<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/man.jpg\"><img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/man.jpg\" alt=\"man\" width=\"226\" height=\"300\" class=\"alignnone size-full wp-image-6108\" /></a>\r\n<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/highcon.jpg\"><img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/highcon.jpg\" alt=\"highcon\" width=\"226\" height=\"300\" class=\"alignnone size-full wp-image-6106\" /></a>\r\n<h3 id=\"brightness-modification\">Brightness modification</h3>\r\n<pre>\r\n/**\r\n * brightness value should be in the range [0,1]\r\n **/\r\nvoid changeBrightness(array &in, const float brightness, const float channelMax=255.0f)\r\n{\r\n    float factor = brightness*channelMax;\r\n    return (in + factor);\r\n}\r\n</pre>\r\n<p>You may add an additional step to the above function that clamps each pixel value to [0,255] range. Clamping can be easily achieved by the following line of code.</p>\r\n<pre>\r\nimage = (image<0.0f)*0.0f + (image>255.0f)*255.0f + (image>=0.0f && image<=255.0f)*image;\r\n</pre>\r\nor a more generalized thresholding operation would like as below.\r\n<pre>\r\narray clamp(const array &in, float min=0.0f, float max=255.0f)\r\n{\r\n    return ((in<min)*0.0f + (in>max)*255.0f + (in>=min && in <=max)*in);\r\n}\r\n</pre>\r\n\r\n<h3 id=\"image-translation\">Image translation</h3>\r\n<p>This operation can be achieved directly by a function in our library <code>translate</code>.</p>\r\n<h3 id=\"digital-zoom\">Digital Zoom</h3>\r\n<pre>\r\narray digZoom(const array &in, int x, int y, int width, int height)\r\n{\r\n    array cropped = in(seq(height)+x,seq(width)+y,span);\r\n    return resize((unsigned)in.dims(0),(unsigned)in.dims(1),cropped);\r\n}\r\n</pre>\r\n<h3 id=\"alpha-blending\">Alpha Blending</h3>\r\n<pre>\r\narray alphaBlend(const array &foreground, const array &background, const array &mask)\r\n{\r\n    array tiledMask;\r\n    if (mask.dims(2)!=foreground.dims(2))\r\n        tiledMask = tile(mask,1,1,foreground.dims(2));\r\n    return foreground*tiledMask+(1.0f-tiledMask)*background;\r\n}\r\n</pre>\r\n<p>For the purpose of this example, a very simple mask was created using this single line of code <code>array mask = clamp(intensity,10.0f,255.0f)&gt;0.0f;</code>. A more detailed and accurate mask would deliver more appropiate blending.</p>\r\n<h3 id=\"unsharpmask\">Unsharpmask</h3>\r\n<pre>\r\n/**\r\n * radius effects the level of details that will effected during sharpening process\r\n * amount value should be in the range [0,1] or [1,]\r\n * note: value of 1.0 for amount results unsharp masking\r\n *       values > 1.0 results in highboost filter effect\r\n **/\r\narray usm(const array &in, float radius, float amount)\r\n{\r\n    int gKernelLen  = 2*radius + 1;\r\n    array blurKernel= gaussiankernel(gKernelLen,gKernelLen);\r\n    array blur  = convolve(in,blurKernel);\r\n    return (in + amount*(in - blur));\r\n}\r\n</pre>','','','inherit','open','open','','6099-revision-v1','','','2014-07-11 15:03:35','2014-07-11 15:03:35','',6099,'http://sandbox.arrayfire.com/6099-revision-v1/',0,'revision','',0),(6114,17729,'2014-07-11 15:05:56','2014-07-11 15:05:56','<h2 id=\"image-editing-operations-using-arrayfire\">Image editing operations using ArrayFire</h2>\r\n<p>In this post, we will be looking at the following simple image editing operations using the ArrayFire library.</p>\r\n<ul>\r\n<li>contrast modification<br /></li>\r\n<li>brightness modification<br /></li>\r\n<li>translation<br /></li>\r\n<li>digital zoom<br /></li>\r\n<li>alpha blending<br /></li>\r\n<li>unsharp mask</li>\r\n</ul>\r\n<p>Code required to do each operation and the corresponding input/output sample are given below in their corresponding sections.<br />All the operations are built using some existing image manipulation functions and the awesome element-wise operations enabled in ArrayFire.<br />If you are not aware of what the JIT feature in ArrayFire lets you do, please refer to one of our previous post here.</p>\r\n<h3 id=\"contrast-modification\">Contrast modification</h3>\r\n\r\n<pre>\r\n/**\r\n * contrast value should be in the range [-1,1]\r\n **/\r\nvoid changeContrast(array &in, const float contrast)\r\n{\r\n    float scale     = tan((contrast+1)*Pi/4);\r\n    in = ((in/255.0f - 0.5f) * scale + 0.5f) * 255.0f;\r\n}\r\n</pre>\r\n<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/man.jpg\"><img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/man.jpg\" alt=\"man\" width=\"226\" height=\"300\" class=\"alignnone size-full wp-image-6108\" style=\"float:left\"/></a>\r\n<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/highcon.jpg\"><img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/highcon.jpg\" alt=\"highcon\" width=\"226\" height=\"300\" class=\"alignnone size-full wp-image-6106\" style=\"float:right\"/></a>\r\n<h3 id=\"brightness-modification\">Brightness modification</h3>\r\n<pre>\r\n/**\r\n * brightness value should be in the range [0,1]\r\n **/\r\nvoid changeBrightness(array &in, const float brightness, const float channelMax=255.0f)\r\n{\r\n    float factor = brightness*channelMax;\r\n    return (in + factor);\r\n}\r\n</pre>\r\n<p>You may add an additional step to the above function that clamps each pixel value to [0,255] range. Clamping can be easily achieved by the following line of code.</p>\r\n<pre>\r\nimage = (image<0.0f)*0.0f + (image>255.0f)*255.0f + (image>=0.0f && image<=255.0f)*image;\r\n</pre>\r\nor a more generalized thresholding operation would like as below.\r\n<pre>\r\narray clamp(const array &in, float min=0.0f, float max=255.0f)\r\n{\r\n    return ((in<min)*0.0f + (in>max)*255.0f + (in>=min && in <=max)*in);\r\n}\r\n</pre>\r\n\r\n<h3 id=\"image-translation\">Image translation</h3>\r\n<p>This operation can be achieved directly by a function in our library <code>translate</code>.</p>\r\n<h3 id=\"digital-zoom\">Digital Zoom</h3>\r\n<pre>\r\narray digZoom(const array &in, int x, int y, int width, int height)\r\n{\r\n    array cropped = in(seq(height)+x,seq(width)+y,span);\r\n    return resize((unsigned)in.dims(0),(unsigned)in.dims(1),cropped);\r\n}\r\n</pre>\r\n<h3 id=\"alpha-blending\">Alpha Blending</h3>\r\n<pre>\r\narray alphaBlend(const array &foreground, const array &background, const array &mask)\r\n{\r\n    array tiledMask;\r\n    if (mask.dims(2)!=foreground.dims(2))\r\n        tiledMask = tile(mask,1,1,foreground.dims(2));\r\n    return foreground*tiledMask+(1.0f-tiledMask)*background;\r\n}\r\n</pre>\r\n<p>For the purpose of this example, a very simple mask was created using this single line of code <code>array mask = clamp(intensity,10.0f,255.0f)&gt;0.0f;</code>. A more detailed and accurate mask would deliver more appropiate blending.</p>\r\n<h3 id=\"unsharpmask\">Unsharpmask</h3>\r\n<pre>\r\n/**\r\n * radius effects the level of details that will effected during sharpening process\r\n * amount value should be in the range [0,1] or [1,]\r\n * note: value of 1.0 for amount results unsharp masking\r\n *       values > 1.0 results in highboost filter effect\r\n **/\r\narray usm(const array &in, float radius, float amount)\r\n{\r\n    int gKernelLen  = 2*radius + 1;\r\n    array blurKernel= gaussiankernel(gKernelLen,gKernelLen);\r\n    array blur  = convolve(in,blurKernel);\r\n    return (in + amount*(in - blur));\r\n}\r\n</pre>','','','inherit','open','open','','6099-revision-v1','','','2014-07-11 15:05:56','2014-07-11 15:05:56','',6099,'http://sandbox.arrayfire.com/6099-revision-v1/',0,'revision','',0),(6115,17729,'2014-07-11 15:08:52','2014-07-11 15:08:52','<h2 id=\"image-editing-operations-using-arrayfire\">Image editing operations using ArrayFire</h2>\r\n<p>In this post, we will be looking at the following simple image editing operations using the ArrayFire library.</p>\r\n<ul>\r\n<li>contrast modification<br /></li>\r\n<li>brightness modification<br /></li>\r\n<li>translation<br /></li>\r\n<li>digital zoom<br /></li>\r\n<li>alpha blending<br /></li>\r\n<li>unsharp mask</li>\r\n</ul>\r\n<p>Code required to do each operation and the corresponding input/output sample are given below in their corresponding sections.<br />All the operations are built using some existing image manipulation functions and the awesome element-wise operations enabled in ArrayFire.<br />If you are not aware of what the JIT feature in ArrayFire lets you do, please refer to one of our previous post here.</p>\r\n<h3 id=\"contrast-modification\">Contrast modification</h3>\r\n\r\n<pre>\r\n/**\r\n * contrast value should be in the range [-1,1]\r\n **/\r\nvoid changeContrast(array &in, const float contrast)\r\n{\r\n    float scale     = tan((contrast+1)*Pi/4);\r\n    in = ((in/255.0f - 0.5f) * scale + 0.5f) * 255.0f;\r\n}\r\n</pre>\r\n<div style = \"text-align:center\">\r\n <div style=\"display: inline-block; margin-right: 5px\">\r\n   <a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/man.jpg\">\r\n     <img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/man.jpg\" alt=\"man\" width=\"226\" height=\"300\" class=\"alignnone size-full wp-image-6108\"/>\r\n   </a>\r\n </div>\r\n <div style=\"display: inline-block\">\r\n   <a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/highcon.jpg\">\r\n     <img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/highcon.jpg\" alt=\"highcon\" width=\"226\" height=\"300\" class=\"alignnone size-full wp-image-6106\"/>\r\n   </a>\r\n </div>\r\n</div>\r\n<h3 id=\"brightness-modification\">Brightness modification</h3>\r\n<pre>\r\n/**\r\n * brightness value should be in the range [0,1]\r\n **/\r\nvoid changeBrightness(array &in, const float brightness, const float channelMax=255.0f)\r\n{\r\n    float factor = brightness*channelMax;\r\n    return (in + factor);\r\n}\r\n</pre>\r\n<p>You may add an additional step to the above function that clamps each pixel value to [0,255] range. Clamping can be easily achieved by the following line of code.</p>\r\n<pre>\r\nimage = (image<0.0f)*0.0f + (image>255.0f)*255.0f + (image>=0.0f && image<=255.0f)*image;\r\n</pre>\r\nor a more generalized thresholding operation would like as below.\r\n<pre>\r\narray clamp(const array &in, float min=0.0f, float max=255.0f)\r\n{\r\n    return ((in<min)*0.0f + (in>max)*255.0f + (in>=min && in <=max)*in);\r\n}\r\n</pre>\r\n\r\n<h3 id=\"image-translation\">Image translation</h3>\r\n<p>This operation can be achieved directly by a function in our library <code>translate</code>.</p>\r\n<h3 id=\"digital-zoom\">Digital Zoom</h3>\r\n<pre>\r\narray digZoom(const array &in, int x, int y, int width, int height)\r\n{\r\n    array cropped = in(seq(height)+x,seq(width)+y,span);\r\n    return resize((unsigned)in.dims(0),(unsigned)in.dims(1),cropped);\r\n}\r\n</pre>\r\n<h3 id=\"alpha-blending\">Alpha Blending</h3>\r\n<pre>\r\narray alphaBlend(const array &foreground, const array &background, const array &mask)\r\n{\r\n    array tiledMask;\r\n    if (mask.dims(2)!=foreground.dims(2))\r\n        tiledMask = tile(mask,1,1,foreground.dims(2));\r\n    return foreground*tiledMask+(1.0f-tiledMask)*background;\r\n}\r\n</pre>\r\n<p>For the purpose of this example, a very simple mask was created using this single line of code <code>array mask = clamp(intensity,10.0f,255.0f)&gt;0.0f;</code>. A more detailed and accurate mask would deliver more appropiate blending.</p>\r\n<h3 id=\"unsharpmask\">Unsharpmask</h3>\r\n<pre>\r\n/**\r\n * radius effects the level of details that will effected during sharpening process\r\n * amount value should be in the range [0,1] or [1,]\r\n * note: value of 1.0 for amount results unsharp masking\r\n *       values > 1.0 results in highboost filter effect\r\n **/\r\narray usm(const array &in, float radius, float amount)\r\n{\r\n    int gKernelLen  = 2*radius + 1;\r\n    array blurKernel= gaussiankernel(gKernelLen,gKernelLen);\r\n    array blur  = convolve(in,blurKernel);\r\n    return (in + amount*(in - blur));\r\n}\r\n</pre>','','','inherit','open','open','','6099-revision-v1','','','2014-07-11 15:08:52','2014-07-11 15:08:52','',6099,'http://sandbox.arrayfire.com/6099-revision-v1/',0,'revision','',0),(6116,17729,'2014-07-11 15:10:03','2014-07-11 15:10:03','<h2 id=\"image-editing-operations-using-arrayfire\">Image editing operations using ArrayFire</h2>\r\n<p>In this post, we will be looking at the following simple image editing operations using the ArrayFire library.</p>\r\n<ul>\r\n<li>contrast modification<br /></li>\r\n<li>brightness modification<br /></li>\r\n<li>translation<br /></li>\r\n<li>digital zoom<br /></li>\r\n<li>alpha blending<br /></li>\r\n<li>unsharp mask</li>\r\n</ul>\r\n<p>Code required to do each operation and the corresponding input/output sample are given below in their corresponding sections.<br />All the operations are built using some existing image manipulation functions and the awesome element-wise operations enabled in ArrayFire.<br />If you are not aware of what the JIT feature in ArrayFire lets you do, please refer to one of our previous post here.</p>\r\n<h3 id=\"contrast-modification\">Contrast modification</h3>\r\n\r\n<pre>\r\n/**\r\n * contrast value should be in the range [-1,1]\r\n **/\r\nvoid changeContrast(array &in, const float contrast)\r\n{\r\n    float scale     = tan((contrast+1)*Pi/4);\r\n    in = ((in/255.0f - 0.5f) * scale + 0.5f) * 255.0f;\r\n}\r\n</pre>\r\n<div style = \"text-align:center\">\r\n <div style=\"display: inline-block; margin-right: 5px\">\r\n   <a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/man.jpg\">\r\n     <img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/man.jpg\" alt=\"man\" width=\"226\" height=\"300\" class=\"alignnone size-full wp-image-6108\"/>\r\n   </a>\r\n </div>\r\n <div style=\"display: inline-block\">\r\n   <a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/highcon.jpg\">\r\n     <img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/highcon.jpg\" alt=\"highcon\" width=\"226\" height=\"300\" class=\"alignnone size-full wp-image-6106\"/>\r\n   </a>\r\n </div>\r\n</div>\r\n<h3 id=\"brightness-modification\">Brightness modification</h3>\r\n<pre>\r\n/**\r\n * brightness value should be in the range [0,1]\r\n **/\r\nvoid changeBrightness(array &in, const float brightness, const float channelMax=255.0f)\r\n{\r\n    float factor = brightness*channelMax;\r\n    return (in + factor);\r\n}\r\n</pre>\r\n<div style = \"text-align:center\">\r\n <div style=\"display: inline-block; margin-right: 5px\">\r\n   <a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/man.jpg\">\r\n     <img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/man.jpg\" alt=\"man\" width=\"226\" height=\"300\" class=\"alignnone size-full wp-image-6108\"/>\r\n   </a>\r\n </div>\r\n <div style=\"display: inline-block\">\r\n   <a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/highbright.jpg\">\r\n     <img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/highbright.jpg\" alt=\"highbright\" width=\"226\" height=\"300\" class=\"alignnone size-full wp-image-6105\" />\r\n   </a>\r\n </div>\r\n</div>\r\n<p>You may add an additional step to the above function that clamps each pixel value to [0,255] range. Clamping can be easily achieved by the following line of code.</p>\r\n<pre>\r\nimage = (image<0.0f)*0.0f + (image>255.0f)*255.0f + (image>=0.0f && image<=255.0f)*image;\r\n</pre>\r\nor a more generalized thresholding operation would like as below.\r\n<pre>\r\narray clamp(const array &in, float min=0.0f, float max=255.0f)\r\n{\r\n    return ((in<min)*0.0f + (in>max)*255.0f + (in>=min && in <=max)*in);\r\n}\r\n</pre>\r\n\r\n<h3 id=\"image-translation\">Image translation</h3>\r\n<p>This operation can be achieved directly by a function in our library <code>translate</code>.</p>\r\n<h3 id=\"digital-zoom\">Digital Zoom</h3>\r\n<pre>\r\narray digZoom(const array &in, int x, int y, int width, int height)\r\n{\r\n    array cropped = in(seq(height)+x,seq(width)+y,span);\r\n    return resize((unsigned)in.dims(0),(unsigned)in.dims(1),cropped);\r\n}\r\n</pre>\r\n<h3 id=\"alpha-blending\">Alpha Blending</h3>\r\n<pre>\r\narray alphaBlend(const array &foreground, const array &background, const array &mask)\r\n{\r\n    array tiledMask;\r\n    if (mask.dims(2)!=foreground.dims(2))\r\n        tiledMask = tile(mask,1,1,foreground.dims(2));\r\n    return foreground*tiledMask+(1.0f-tiledMask)*background;\r\n}\r\n</pre>\r\n<p>For the purpose of this example, a very simple mask was created using this single line of code <code>array mask = clamp(intensity,10.0f,255.0f)&gt;0.0f;</code>. A more detailed and accurate mask would deliver more appropiate blending.</p>\r\n<h3 id=\"unsharpmask\">Unsharpmask</h3>\r\n<pre>\r\n/**\r\n * radius effects the level of details that will effected during sharpening process\r\n * amount value should be in the range [0,1] or [1,]\r\n * note: value of 1.0 for amount results unsharp masking\r\n *       values > 1.0 results in highboost filter effect\r\n **/\r\narray usm(const array &in, float radius, float amount)\r\n{\r\n    int gKernelLen  = 2*radius + 1;\r\n    array blurKernel= gaussiankernel(gKernelLen,gKernelLen);\r\n    array blur  = convolve(in,blurKernel);\r\n    return (in + amount*(in - blur));\r\n}\r\n</pre>','','','inherit','open','open','','6099-revision-v1','','','2014-07-11 15:10:03','2014-07-11 15:10:03','',6099,'http://sandbox.arrayfire.com/6099-revision-v1/',0,'revision','',0),(6117,17729,'2014-07-11 15:13:25','2014-07-11 15:13:25','<h2 id=\"image-editing-operations-using-arrayfire\">Image editing operations using ArrayFire</h2>\r\n<p>In this post, we will be looking at the following simple image editing operations using the ArrayFire library.</p>\r\n<ul>\r\n<li>contrast modification<br /></li>\r\n<li>brightness modification<br /></li>\r\n<li>translation<br /></li>\r\n<li>digital zoom<br /></li>\r\n<li>alpha blending<br /></li>\r\n<li>unsharp mask</li>\r\n</ul>\r\n<p>Code required to do each operation and the corresponding input/output sample are given below in their corresponding sections.<br />All the operations are built using some existing image manipulation functions and the awesome element-wise operations enabled in ArrayFire.<br />If you are not aware of what the JIT feature in ArrayFire lets you do, please refer to one of our previous post here.</p>\r\n<h3 id=\"contrast-modification\">Contrast modification</h3>\r\n\r\n<pre>\r\n/**\r\n * contrast value should be in the range [-1,1]\r\n **/\r\nvoid changeContrast(array &in, const float contrast)\r\n{\r\n    float scale     = tan((contrast+1)*Pi/4);\r\n    in = ((in/255.0f - 0.5f) * scale + 0.5f) * 255.0f;\r\n}\r\n</pre>\r\n<div style = \"text-align:center\">\r\n <div style=\"display: inline-block; margin-right: 5px\">\r\n   <a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/man.jpg\">\r\n     <img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/man.jpg\" alt=\"man\" width=\"226\" height=\"300\" class=\"alignnone size-full wp-image-6108\"/>\r\n   </a>\r\n </div>\r\n <div style=\"display: inline-block\">\r\n   <a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/highcon.jpg\">\r\n     <img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/highcon.jpg\" alt=\"highcon\" width=\"226\" height=\"300\" class=\"alignnone size-full wp-image-6106\"/>\r\n   </a>\r\n </div>\r\n</div>\r\n<h3 id=\"brightness-modification\">Brightness modification</h3>\r\n<pre>\r\n/**\r\n * brightness value should be in the range [0,1]\r\n **/\r\nvoid changeBrightness(array &in, const float brightness, const float channelMax=255.0f)\r\n{\r\n    float factor = brightness*channelMax;\r\n    return (in + factor);\r\n}\r\n</pre>\r\n<div style = \"text-align:center\">\r\n <div style=\"display: inline-block; margin-right: 5px\">\r\n   <a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/man.jpg\">\r\n     <img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/man.jpg\" alt=\"man\" width=\"226\" height=\"300\" class=\"alignnone size-full wp-image-6108\"/>\r\n   </a>\r\n </div>\r\n <div style=\"display: inline-block\">\r\n   <a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/highbright.jpg\">\r\n     <img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/highbright.jpg\" alt=\"highbright\" width=\"226\" height=\"300\" class=\"alignnone size-full wp-image-6105\" />\r\n   </a>\r\n </div>\r\n</div>\r\n<p>You may add an additional step to the above function that clamps each pixel value to [0,255] range. Clamping can be easily achieved by the following line of code.</p>\r\n<pre>\r\nimage = (image<0.0f)*0.0f + (image>255.0f)*255.0f + (image>=0.0f && image<=255.0f)*image;\r\n</pre>\r\nor a more generalized thresholding operation would like as below.\r\n<pre>\r\narray clamp(const array &in, float min=0.0f, float max=255.0f)\r\n{\r\n    return ((in<min)*0.0f + (in>max)*255.0f + (in>=min && in <=max)*in);\r\n}\r\n</pre>\r\n\r\n<h3 id=\"image-translation\">Image translation</h3>\r\n<p>This operation can be achieved directly by a function in our library <a href=\"http://www.sandbox.arrayfire.com/docs/group__image__func__cpp__translate.htm#ga1615c8ea000ad113a0dc7a9313d7b645\"><code>translate</code></a>.</p>\r\n<h3 id=\"digital-zoom\">Digital Zoom</h3>\r\n<pre>\r\narray digZoom(const array &in, int x, int y, int width, int height)\r\n{\r\n    array cropped = in(seq(height)+x,seq(width)+y,span);\r\n    return resize((unsigned)in.dims(0),(unsigned)in.dims(1),cropped);\r\n}\r\n</pre>\r\n<div style = \"text-align:center\">\r\n <div style=\"display: inline-block; margin-right: 5px\">\r\n   <a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/man.jpg\">\r\n     <img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/man.jpg\" alt=\"man\" width=\"226\" height=\"300\" class=\"alignnone size-full wp-image-6108\"/>\r\n   </a>\r\n </div>\r\n <div style=\"display: inline-block\">\r\n   <a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/zoom.jpg\">\r\n     <img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/zoom.jpg\" alt=\"zoom\" width=\"226\" height=\"300\" class=\"alignnone size-full wp-image-6112\" />\r\n   </a>\r\n </div>\r\n</div>\r\n<h3 id=\"alpha-blending\">Alpha Blending</h3>\r\n<pre>\r\narray alphaBlend(const array &foreground, const array &background, const array &mask)\r\n{\r\n    array tiledMask;\r\n    if (mask.dims(2)!=foreground.dims(2))\r\n        tiledMask = tile(mask,1,1,foreground.dims(2));\r\n    return foreground*tiledMask+(1.0f-tiledMask)*background;\r\n}\r\n</pre>\r\n<p>For the purpose of this example, a very simple mask was created using this single line of code <code>array mask = clamp(intensity,10.0f,255.0f)&gt;0.0f;</code>. A more detailed and accurate mask would deliver more appropiate blending.</p>\r\n<div style = \"text-align:center\">\r\n <div style=\"display: inline-block; margin-right: 5px\">\r\n<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/nature.jpg\"><img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/nature-300x168.jpg\" alt=\"nature\" width=\"300\" height=\"168\" class=\"alignnone size-medium wp-image-6109\" /></a>\r\n </div>\r\n <div style=\"display: inline-block\">\r\n<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/fight.jpg\"><img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/fight-300x168.jpg\" alt=\"fight\" width=\"300\" height=\"168\" class=\"alignnone size-medium wp-image-6104\" /></a>\r\n </div>\r\n <div style=\"display: inline-block\">\r\n<a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/blend.jpg\"><img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/blend-300x168.jpg\" alt=\"blend\" width=\"300\" height=\"168\" class=\"alignnone size-medium wp-image-6103\" /></a>\r\n </div>\r\n</div>\r\n<h3 id=\"unsharpmask\">Unsharpmask</h3>\r\n<pre>\r\n/**\r\n * radius effects the level of details that will effected during sharpening process\r\n * amount value should be in the range [0,1] or [1,]\r\n * note: value of 1.0 for amount results unsharp masking\r\n *       values > 1.0 results in highboost filter effect\r\n **/\r\narray usm(const array &in, float radius, float amount)\r\n{\r\n    int gKernelLen  = 2*radius + 1;\r\n    array blurKernel= gaussiankernel(gKernelLen,gKernelLen);\r\n    array blur  = convolve(in,blurKernel);\r\n    return (in + amount*(in - blur));\r\n}\r\n</pre>','','','inherit','open','open','','6099-revision-v1','','','2014-07-11 15:13:25','2014-07-11 15:13:25','',6099,'http://sandbox.arrayfire.com/6099-revision-v1/',0,'revision','',0),(6118,17729,'2014-07-11 15:16:08','2014-07-11 15:16:08','<h2 id=\"image-editing-operations-using-arrayfire\">Image editing operations using ArrayFire</h2>\r\n<p>In this post, we will be looking at the following simple image editing operations using the ArrayFire library.</p>\r\n<ul>\r\n<li>contrast modification<br /></li>\r\n<li>brightness modification<br /></li>\r\n<li>translation<br /></li>\r\n<li>digital zoom<br /></li>\r\n<li>alpha blending<br /></li>\r\n<li>unsharp mask</li>\r\n</ul>\r\n<p>Code required to do each operation and the corresponding input/output sample are given below in their corresponding sections.<br />All the operations are built using some existing image manipulation functions and the awesome element-wise operations enabled in ArrayFire.<br />If you are not aware of what the JIT feature in ArrayFire lets you do, please refer to one of our previous post here.</p>\r\n<h3 id=\"contrast-modification\">Contrast modification</h3>\r\n\r\n<pre>\r\n/**\r\n * contrast value should be in the range [-1,1]\r\n **/\r\nvoid changeContrast(array &in, const float contrast)\r\n{\r\n    float scale     = tan((contrast+1)*Pi/4);\r\n    in = ((in/255.0f - 0.5f) * scale + 0.5f) * 255.0f;\r\n}\r\n</pre>\r\n<div style = \"text-align:center\">\r\n <div style=\"display: inline-block; margin-right: 5px\">\r\n   <a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/man.jpg\">\r\n     <img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/man.jpg\" alt=\"man\" width=\"226\" height=\"300\" class=\"alignnone size-full wp-image-6108\"/>\r\n   </a>\r\n </div>\r\n <div style=\"display: inline-block\">\r\n   <a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/highcon.jpg\">\r\n     <img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/highcon.jpg\" alt=\"highcon\" width=\"226\" height=\"300\" class=\"alignnone size-full wp-image-6106\"/>\r\n   </a>\r\n </div>\r\n</div>\r\n<h3 id=\"brightness-modification\">Brightness modification</h3>\r\n<pre>\r\n/**\r\n * brightness value should be in the range [0,1]\r\n **/\r\nvoid changeBrightness(array &in, const float brightness, const float channelMax=255.0f)\r\n{\r\n    float factor = brightness*channelMax;\r\n    return (in + factor);\r\n}\r\n</pre>\r\n<div style = \"text-align:center\">\r\n <div style=\"display: inline-block; margin-right: 5px\">\r\n   <a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/man.jpg\">\r\n     <img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/man.jpg\" alt=\"man\" width=\"226\" height=\"300\" class=\"alignnone size-full wp-image-6108\"/>\r\n   </a>\r\n </div>\r\n <div style=\"display: inline-block\">\r\n   <a href=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/highbright.jpg\">\r\n     <img src=\"http://sandbox.arrayfire.com/wp-content/uploads/2014/07/highbright.jpg\" alt=\"highbright\" width=\"226\" height=\"300\" class=\"alignnone size-full wp-image-6105\" />\r\n   </a>\r\n </div>\r\n</div>\r\n<p>You may add an additional step to the above function that clamps each pixel value to [0,255] range. Clamping can be easily achieved by the following line of code.</p>\r\n<pre>\r\nimage = (image<0.0f)*0.0f + (image>255.0f)*255.0f + (image>=0.0f && image<=255.0f)*image;\r\n</pre>\r\nor a more generalized thresholding operation would like as below.\r\n<pre>\r\narray clamp(const array &in, float min=0.0f, float max=255.0f)\r\n{\r\n    return ((in<min)*0.0f + (in>max)*255.0f + (in>=min && in <=max)*in);\r\n}\r\n</pre>\r\n\r\n<h3 id=\"image-translation\">Image translation</h3>\r\n<p>This operation can be achieved directly by a function in our library <a href=\"http://www.sandbox.arrayfire.com/docs/group__image__func__cpp__translate.htm#ga1615c8ea000ad113a0dc7a9313d7b645\"><code>translate</code></a>.</p>\r\n<h3 id=\"digital-zoom\">Digital Zoom</h3>\r\n<pre>\r\narray digZoom(const array &in, int x, int y, int width, int height)\r\n{\r\n    array cropped = in(seq(height)+x,seq(width)+y,span);\r\n    return resize((unsigned)in.dims(0),