# structure in \_\_global\_\_

**URL:** <https://forums.developer.nvidia.com/t/structure-in-global/8618>\
**Category:** CUDA Programming and Performance\
**Created:** [March 30, 2009, 4:46am UTC](https://forums.developer.nvidia.com/t/structure-in-global/8618 "2009-03-30T04:46:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kiukk7979](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@kiukk7979](https://forums.developer.nvidia.com/u/kiukk7979)\
**Post date:** [March 30, 2009, 4:46am UTC](https://forums.developer.nvidia.com/t/structure-in-global/8618/1 "2009-03-30T04:46:05Z")

</div>

Hi Ihave a question.

When I use structure.

But the results are not what I want.

In the emulation mode, the results are true.  
But running in GPU, the result is false.

This is source code.

**global** void executeRelData( GATHERING\_DATASYMBOL\* \_frame, REALDATASYMBOL\* \_dataSymbol )  
{  
const int idx = blockIdx.x \* blockDim.x + threadIdx.x;  
const int idy = blockIdx.y \* blockDim.y + threadIdx.y;

```
if( idx < 840 && idy < 16 )
{
	_dataSymbol->dataSymbol[idy].iData[idx] = _frame->dataSymbol[idy].reverse.iq[idx].i;
	_dataSymbol->dataSymbol[idy].qData[idx] = _frame->dataSymbol[idy].reverse.iq[idx].q;
}

```

}

Is not impossible to use structure??  
Please help me ~~~~

---

<div class="post-metadata">

**Author:** ![navier-stokes](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/navier-stokes/32/9814_2.png) [@navier-stokes](https://forums.developer.nvidia.com/u/navier-stokes)\
**Post date:** [March 31, 2009, 6:56am UTC](https://forums.developer.nvidia.com/t/structure-in-global/8618/2 "2009-03-31T06:56:32Z")

</div>

Hi,  
are you sure to have properly allocated the dynamical memory that is anchored in the structure ?
