Menu

#28 Pointer inside struct is not alllowed even for non kernel

1.5
open
GEN
brcc (29)
5
2009-05-27
2009-05-27
GEN
No

Pointer inside struct is not alllowed even if it is not used in kernel

Following test case gives hlsl compilation errors. I am filing this bug on brcc
because brcc should not pass unused structs to hlsl file-

typedef struct tTest { double* a; } tTest;

kernel void TestKernel (float a_in<>, out float a_out<>, float a0, float a1,
float a2)
{
a_out = a_in * a0 * a1 * a2;
}

void TestFunc (float* in, float *out, tTest* t, int n)
{
float s_in<n>;
float s_out<n>;
float a [3];
int i;

for (i = 0; i < 10; i++)
a = (float) t.a ;
streamRead (s_in, a_in);
TestKernel (s_in, s_out, a [0], a [1], a [2]);
streamWrite (s_out, a_out);
}

Discussion

  • GEN

    GEN - 2009-05-27
    • assigned_to: nobody --> genaganna
     

Log in to post a comment.