very short and simple, could use some insight.
trying to compile:
struct S
{
float2 s[1];
};
__global__ void f(float t, S s)
{
}
void g()
{
float t = 0;
S s;
f<<<1,1>>>( t , s );
}
fails with nvcc 3.0, windows 7, 64 bit.
builds with nvcc 2.3, windows xp, 32 bit
those are the only machines i have for testing.
nothing necessary for the error has been elided.
gives a compilation error “error PRJ0019: A tool returned an error code from …”
more specifically nvcc seems to give up with “compiler error in file … during data layout phase: unexpected field mtype”
most interesting are ways around the error:
-
switch float2 to float
-
switch the order of the t and s parameters
successfully compiles with either of those changes.
any thoughts? is this a bug? am i doing something stupid? anyone willing to try building it on their machine? any help is appreciated.
googling “unexpected field mtype” shows that apparently i am the only one with this error…