Pass inherited struct to kernel?

Hi,

according to the CUDA Programming Guide 3.0 inheritance is supported. Before I start implementing I would like to ask whether the following construction works:

struct A
{
unsigned int valueA;
};

struct B : A
{
unsigned int valueB;
};

Can I pass B to a kernel?

Thanks in advance,

Kwyjibo

Hi,

according to the CUDA Programming Guide 3.0 inheritance is supported. Before I start implementing I would like to ask whether the following construction works:

struct A
{
unsigned int valueA;
};

struct B : A
{
unsigned int valueB;
};

Can I pass B to a kernel?

Thanks in advance,

Kwyjibo

yes you can

i am doing it all the time. but dont hope on virtual member functions or so^^ and prefer public inheritanca if you’d like to use A’s members in B

yes you can

i am doing it all the time. but dont hope on virtual member functions or so^^ and prefer public inheritanca if you’d like to use A’s members in B