使用推力调试不完整的类型错误
Debugging incomplete type errors with thrust
我对unary_function和binary_function进行了大量的推力调试,但我设法找到了它们。中的yes_type中存在除一个以外的所有类型错误和不完整类型错误
namespace is_assignable_ns
{
template<typename T1, typename T2>
class is_assignable
{
typedef char yes_type;
typedef struct { char array[2]; } no_type;
template<typename T> static typename add_reference<T>::type declval();
template<unsigned int> struct helper { typedef void * type; };
template<typename U1, typename U2> static yes_type test(typename helper<sizeof(declval<U1>() = declval<U2>())>::type);
template<typename,typename> static no_type test(...);
public:
static const bool value = sizeof(test<T1,T2>(0)) == 1;
}; // end is_assignable
} // end is_assignable_ns
有人知道我目前使用的可能会调用哪些推力操作吗
#include <thrust/remove.h>
#include <thrust/count.h>
#include <thrust/unique.h>
#include <thrust/execution_policy.h>
我必须处理的唯一错误是:
C:Program FilesNVIDIA GPU Computing ToolkitCUDAv7.0includethrust/detail/type_traits.h(607): error : incomplete type is not allowed
任何调试方法都将不胜感激!
它在一个推力::unique()中发现我在unique运算符=中使用的结构没有返回,因此在通过yes_type()时返回了一个不完整的类型。
相关文章:
- 类没有命名C++代码中的类型错误
- 不完整类型错误(E0409、E0070、E0515)
- 使用具有结构不完整类型错误的模板
- 不命名构造函数和析构函数上的类型错误
- 返回派生类型时出现协变类型错误
- 为什么此构造函数没有给出不完整的类型错误?
- 定义模板化结构的特征时出现不完整的类型错误
- 使用重载构造函数时出现不完整的类型错误
- 为什么我得到表达式必须有类类型错误?
- 输出 [left]=input[i] 行中的 c++ 代码中存在无效的类型错误
- 枚举成员不是类型错误
- 如何修复"ctypes"。参数错误:参数 2:<键入"异常.类型错误">:RaspberryPi 中的错误类型"错误
- 外部 "C" Visual Studio 2015 中的显式类型错误,DLL 测试代码
- 非默认析构函数会导致不完整的类型错误
- 为什么按引用传入会导致绑定引用类型错误
- Objective-C C++ 包装器 类型错误的不完整定义
- 输入类型错误
- 当构造函数的参数类型错误时引发异常
- 命名空间中的'bad_cast' 'std' 未命名类型错误
- C UNWORKOWN类型错误