Bank Conflict Problem Having problems with CUT_BANK_CHECKER

Hi All,

I have a simple code that I want to check its bank conflicts using CUT_BANK_CHECKER.

The following is the definitions:

...

typedef struct type {

        float x;

        float y;

}type2;

...

#define S(i) CUT_BANK_CHECKER(((type2*)&s[0]), i)

...

Bellow is the snippet of code that I’m writing to the shared memory:

__global__ void

test (float* C, float* A)

{

__shared__ type2 s[64];

type2 data;

data.x = 3.1*A[tid];

data.y = 5.5*A[tid];

S(tid) = data;

s[tid].x = ty + s[tid].y;

s[tid].y = tx + s[tid].x;

C[tid] = s[tid].x+2*s[tid].y;

}

Based on the cuda manual, this should have bank conflicts. But, I get 0 bank conflicts results from the CUT_BANK_CHECKER.

Am I missing anything here?

Thanks.

Is it allowed to have a define with the same name as a shared variable?