[llvm-bugs] [Bug 26400] New: [CUDA] cannot find matching tex2D

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Jan 30 22:05:44 PST 2016


https://llvm.org/bugs/show_bug.cgi?id=26400

            Bug ID: 26400
           Summary: [CUDA] cannot find matching tex2D
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: wujingyue at gmail.com
                CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
    Classification: Unclassified

texture<float4, 2, cudaReadModeElementType> texA;

__global__ void readTexels(float* d_out) {
  float4 v = tex2D(texA, 0.0f, 0.0f);
  *d_out = v.x + v.y + v.z + v.w;
}

$ clang++ texture.cu -c --cuda-gpu-arch=sm_35

texture.cu:4:14: error: no matching function for call to 'tex2D'
  float4 v = tex2D(texA, 0.0f, 0.0f);
             ^~~~~
/usr/local/cuda/include/texture_indirect_functions.h:522:39: note: candidate
template ignored: couldn't infer template argument 'T'
__TEXTURE_INDIRECT_FUNCTIONS_DECL__ T tex2D(cudaTextureObject_t texObject,
float x, float y)
...

nvcc can compile this file. The declaration of the matching tex2D is in
texture_fetch_functions.h, and its definition is in
texture_fetch_functions.hpp.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160131/8e3d1e98/attachment-0001.html>


More information about the llvm-bugs mailing list