[Parallel_libs-commits] [PATCH] D25701: Initial check-in of Acxxel (StreamExecutor renamed)

Jason Henline via Parallel_libs-commits parallel_libs-commits at lists.llvm.org
Tue Oct 18 18:07:59 PDT 2016


jhen added a comment.

Latest patch responds to jlebar's comments on acxxel.cpp and does a couple of other things.

- Removes old `Platform::getContext` function. It used to be used for launching OpenCL kernels, but is not needed now.
- Cleans up a bunch of minor documentation stuff.



================
Comment at: acxxel/acxxel.cpp:36
+#ifdef ACXXEL_ENABLE_CUDA
+  static Expected<std::unique_ptr<Platform>> MaybeCUDAPlatform = [] {
+    return createCUDAPlatform();
----------------
jlebar wrote:
> Using a unique_ptr here means that when the program shuts down, it will run the Platform's destructor.
> 
> This is usually something we avoid in large projects because these destructors are expensive and usually not actually useful.
> 
> If we wanted to avoid running the destructor here, we could just make this into an Expected<Platform*> and unwrap the unique_ptr. I am not sure if you want that, though -- there may be actual useful work you want to do on shutdown.
No need to run the cleanup. I changed it to `Expected<Platform *>`.


https://reviews.llvm.org/D25701





More information about the Parallel_libs-commits mailing list