[PATCH] D16494: [CUDA] Add Target::isNVPTX().

Eric Christopher via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 23 01:04:22 PST 2016


OK.

On Fri, Jan 22, 2016, 5:05 PM Justin Lebar <jlebar at google.com> wrote:

> jlebar created this revision.
> jlebar added a reviewer: tra.
> jlebar added subscribers: echristo, jhen, llvm-commits.
>
> Helper so we don't have to enumerate nvptx && nvptx64 everywhere.
>
> http://reviews.llvm.org/D16494
>
> Files:
>   include/llvm/ADT/Triple.h
>
> Index: include/llvm/ADT/Triple.h
> ===================================================================
> --- include/llvm/ADT/Triple.h
> +++ include/llvm/ADT/Triple.h
> @@ -546,6 +546,11 @@
>    /// Tests whether the target is Android
>    bool isAndroid() const { return getEnvironment() == Triple::Android; }
>
> +  /// Tests whether the target is NVPTX (32- or 64-bit).
> +  bool isNVPTX() const {
> +    return getArch() == Triple::nvptx || getArch() == Triple::nvptx64;
> +  }
> +
>    /// @}
>    /// @name Mutators
>    /// @{
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160123/8d8c3bc6/attachment.html>


More information about the llvm-commits mailing list