<p>I am the developer of <a href="https://github.com/ddemidov/vexcl" rel="noreferrer">VexCL</a>, but I really like what <a href="https://stackoverflow.com/users/226814/kyle-lutz">Kyle Lutz</a>, the author of <a href="https://github.com/boostorg/compute" rel="noreferrer">Boost.Compute</a>, had to say on the same subject on <a href="http://lists.boost.org/Archives/boost/2013/03/201547.php" rel="noreferrer">Boost mailing list</a>. In short, from the user standpoint <a href="http://thrust.github.io/" rel="noreferrer">Thrust</a>, Boost.Compute, AMD's <a href="https://github.com/HSA-Libraries/Bolt" rel="noreferrer">Bolt</a> and probably Microsoft's <a href="http://msdn.microsoft.com/en-us/library/vstudio/hh265136.aspx" rel="noreferrer">C++ AMP</a> all implement an STL-like API, while VexCL is an expression template based library that is closer to <a href="http://eigen.tuxfamily.org/" rel="noreferrer">Eigen</a> in nature. I believe the main difference between the STL-like libraries is their portability: </p>

<ol>
<li>Thrust only supports NVIDIA GPUs, but may also work on CPUs through its OpenMP and TBB backends.</li>
<li>Bolt uses AMD extensions to OpenCL which are only available on AMD GPUs. It also provides Microsoft C++ AMP and Intel TBB backends.</li>
<li>The only compiler that supports Microsoft C++ AMP is Microsoft Visual C++ (although the work on <a href="http://hsafoundation.com/bringing-camp-beyond-windows-via-clang-llvm/" rel="noreferrer">Bringing C++AMP Beyond Windows</a> is being done).</li>
<li>Boost.Compute seems to be the most portable solution of those, as it is based on standard OpenCL.</li>
</ol>

<p>Again, all of those libraries are trying to implement an STL-like interface, so they have very broad applicability. VexCL was developed with scientific computing in mind. If Boost.Compute was developed a bit earlier, I could probably base VexCL on top of it :). Another library for scientific computing worth looking at is <a href="http://viennacl.sourceforge.net/" rel="noreferrer">ViennaCL</a>, a free open-source linear algebra library for computations on many-core architectures (GPUs, MIC) and multi-core CPUs. Have a look at [1] for the comparison of VexCL, ViennaCL, CMTL4 and Thrust for that field.</p>

<p>Regarding the quoted inability of Thrust developers to add an OpenCL backend: Thrust, VexCL and Boost.Compute (I am not familiar with the internals of other libraries) all use metaprogramming techniques to do what they do. But since CUDA supports C++ templates, the job of Thrust developers is probably a bit easier: they have to write metaprograms that generate CUDA programs with help of C++ compiler. VexCL and Boost.Compute authors write metaprograms that generate programs that generate OpenCL source code. Have a look at the <a href="https://speakerdeck.com/ddemidov/vexcl-implementation-university-of-texas-2013" rel="noreferrer">slides</a> where I tried to explain how VexCL is implemented. So I agree that current Thrust's design prohibits them adding an OpenCL backend.</p>

<p>[1] Denis Demidov, Karsten Ahnert, Karl Rupp, Peter Gottschling, <a href="http://epubs.siam.org/doi/abs/10.1137/120903683" rel="noreferrer">Programming CUDA and OpenCL: A Case Study Using Modern C++ Libraries</a>, SIAM J. Sci. Comput., 35(5), C453–C472. (an <a href="http://arxiv.org/abs/1212.6326" rel="noreferrer">arXiv version</a> is also available).</p>

<p>Update: @gnzlbg commented that there is no support for C++ functors and lambdas in OpenCL-based libraries. And indeed, OpenCL is based on C99 and is compiled from sources stored in strings at runtime, so there is no easy way to fully interact with C++ classes. But to be fair, OpenCL-based libraries do support user-based functions and even lambdas to some extent.</p>

<ul>
<li>Boost.Compute provides its own <a href="http://boostorg.github.io/compute/boost_compute/advanced_topics.html#boost_compute.advanced_topics.lambda_expressions" rel="noreferrer">implementation of simple lambdas</a> (based on Boost.Proto), and allows to interact with user-defined structs through <a href="http://boostorg.github.io/compute/BOOST_COMPUTE_ADAPT_STRUCT.html" rel="noreferrer">BOOST_COMPUTE_ADAPT_STRUCT</a> and <a href="http://boostorg.github.io/compute/BOOST_COMPUTE_CLOSURE.html" rel="noreferrer">BOOST_COMPUTE_CLOSURE</a> macros.</li>
<li>VexCL provides linear-algebra-like DSL (also based on Boost.Proto), and also <a href="https://github.com/ddemidov/vexcl#converting-generic-c-algorithms-to-opencl" rel="noreferrer">supports conversion of generic C++ algorithms and functors</a> (and even Boost.Phoenix lambdas) to OpenCL functions (with restrictions).</li>
<li>I believe AMD's Bolt does support user-defined functors through its <a href="http://developer.amd.com/community/blog/2012/05/21/opencl-1-2-and-c-static-kernel-language-now-available/" rel="noreferrer">C++ for OpenCL</a> extension magic.</li>
</ul>

<p>Having said that, CUDA-based libraries (and may be C++ AMP) have an obvious advantage of actual compile-time compiler (can you even say that?), so the integration with user code can be much tighter.</p>
Differences between VexCL, Thrust, and Boost.Compute
<p>With a just a cursory understanding of these libraries, they look to be very similar. I know that VexCL and Boost.Compute use OpenCl as a backend (although the v1.0 release VexCL also supports CUDA as a backend) and Thrust uses CUDA. Aside from the different backends, what's the difference between these. </p>

<p>Specifically, what problem space do they address and why would I want to use one over the other.</p>

<p>Also, on the Thrust FAQ it is stated that</p>

<blockquote>
  <p>The primary barrier to OpenCL support is the lack of an OpenCL compiler and runtime with support for C++ templates</p>
</blockquote>

<p>If this is the case, how is it possible that VexCL and Boost.Compute even exist.</p>