[Parallel_libs-commits] [PATCH] D25701: Initial check-in of Acxxel (StreamExecutor renamed)
Justin Lebar via Parallel_libs-commits
parallel_libs-commits at lists.llvm.org
Tue Oct 25 13:14:38 PDT 2016
jlebar added inline comments.
================
Comment at: acxxel/cuda_acxxel.cpp:546
+ else
+ return MaybePlatform.getValue();
+}
----------------
jhen wrote:
> jlebar wrote:
> > Can we just return MaybePlatform now, or does that not work because the types don't match? If so, maybe we should actually have a constructor on Expected which does this type conversion. (unique_ptr has something similar.) But we could do that in a separate patch.
> I added the templated copy constructor to make this work (and the corresponding templated move constructor while I was at it), so now we are just returning `MaybePlatform`.
>
> One thing I wasn't sure about when adding the templated constructors was whether I should remove the corresponding non-templated constructors because they now seem redundant. I didn't remove them, though, because `std::unique_ptr` seems to keep both the templated and non-templated version.
Yes, I think it probably makes sense to keep the non-templated constructors, although I am not 100% sure if they're necessary, like you say.
https://reviews.llvm.org/D25701
More information about the Parallel_libs-commits
mailing list