diff options
author | Eli Bendersky <eliben@google.com> | 2013-12-17 14:14:15 +0000 |
---|---|---|
committer | Eli Bendersky <eliben@google.com> | 2013-12-17 14:14:15 +0000 |
commit | 352168c57ec450c4962ee336edacc57a982aae84 (patch) | |
tree | a6b0559ee1f1f5ec316c67c72d9c922f09bf2e89 /docs/NVPTXUsage.rst | |
parent | 5842a037fb6d63d833e0a3af900d129fc2fad94a (diff) | |
download | llvm-352168c57ec450c4962ee336edacc57a982aae84.tar.gz |
Fix code sample in NVPTX examples: now it compiles to PTX and runs as expected.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197498 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/NVPTXUsage.rst')
-rw-r--r-- | docs/NVPTXUsage.rst | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/NVPTXUsage.rst b/docs/NVPTXUsage.rst index a9065ce74ba5..b081c5a7ae56 100644 --- a/docs/NVPTXUsage.rst +++ b/docs/NVPTXUsage.rst @@ -839,7 +839,7 @@ Libdevice provides an ``__nv_powf`` function that we will use. %valB = load float addrspace(1)* %ptrB, align 4 ; Compute C = pow(A, B) - %valC = call float @__nv_exp2f(float %valA, float %valB) + %valC = call float @__nv_powf(float %valA, float %valB) ; Store back to C store float %valC, float addrspace(1)* %ptrC, align 4 @@ -850,7 +850,7 @@ Libdevice provides an ``__nv_powf`` function that we will use. !nvvm.annotations = !{!0} !0 = metadata !{void (float addrspace(1)*, float addrspace(1)*, - float addrspace(1)*)* @kernel, metadata !"kernel", i32 1}% + float addrspace(1)*)* @kernel, metadata !"kernel", i32 1} To compile this kernel, we perform the following steps: |