我正在使用带有 CUDA 的cusp库来使用稀疏矩阵。我不能struct
在 C 中使用它,例如:
#include <cusp/coo_matrix.h>
#include <cusp/multiply.h>
#include <cusp/print.h>
#include <cusp/transpose.h>
struct Cat{
int id;
cusp::coo_matrix<int, double, cusp::host_memory> A(2,100,10);
};
int main(){
}
我收到错误:
try.cu(7): error: expected a type specifier
try.cu(7): error: expected a type specifier
try.cu(7): error: expected a type specifier
在 a 中使用它的正确方法是什么,struct
以便我可以拥有这样的结构数组?