NVCC chokes on func(arg r[N]) unable to match function definition to an existing declaration
See the code below:

[code]template <typename TValueType, unsigned int VLength=3>
class FixedArray
{
public:
typedef TValueType ValueType;
FixedArray(const ValueType r[VLength]);
};

template <typename TValueType, unsigned int VLength>
FixedArray<TValueType, VLength>
::FixedArray(const ValueType r[VLength])
{
}[/code]

[quote]Error 1 error C2244: 'FixedArray<TValueType,VLength>::FixedArray' : unable to match function definition to an existing declaration C:\Users\tfarago\Desktop\src\cudaResampleImageFilter.cu 130[/quote]

Everything works if I remove the superflouos VLength size, but this is a third-party library (ITK) so it isn't really an option. Using CUDA 3.0. I couldn't find why this argument length is even needed, but both MSVC and GCC accept it
See the code below:



template <typename TValueType, unsigned int VLength=3>

class FixedArray

{

public:

typedef TValueType ValueType;

FixedArray(const ValueType r[VLength]);

};



template <typename TValueType, unsigned int VLength>

FixedArray<TValueType, VLength>

::FixedArray(const ValueType r[VLength])

{

}




Error 1 error C2244: 'FixedArray<TValueType,VLength>::FixedArray' : unable to match function definition to an existing declaration C:\Users\tfarago\Desktop\src\cudaResampleImageFilter.cu 130




Everything works if I remove the superflouos VLength size, but this is a third-party library (ITK) so it isn't really an option. Using CUDA 3.0. I couldn't find why this argument length is even needed, but both MSVC and GCC accept it

#1
Posted 05/03/2010 03:21 PM   
Scroll To Top

Add Reply