Help: compiling error_NYI: deposit_bits for non-word size

hello every friends:

  I have a problem that I can not finish for some days. the problem as follow:

I have defined some data structures like these :

struct tag_NodeHeader //
{
int nValValue:16;
int nValIndex:8;
int nGrowthCount:8;
};

union union_NodeHeader //
{
tag_NodeHeader tag_Fission; //fission state
int nFusion; //fusion state
};

struct Thin_Node
{
int nNodeHeader; //Node
float FValue; //Node FValue
};

and such codes worked good, but the value range they do is small, so I changed the codes:

struct tag_NodeHeader //
{
int nValValue:32;
int nValIndex:16;
int nGrowthCount:16;
};

union union_NodeHeader //
{
tag_NodeHeader tag_Fission; //fission state
__int64 nFusion; //fusion state
};

struct Thin_Node
{
__int64 nNodeHeader; //node
float FValue; //node’s F value
};

when I recompile the code, the error messages appeared as following:

1>Compiling…
1>Test.cu
1>tmpxft_00000d44_00000000-3_Test.cudafe1.gpu
1>tmpxft_00000d44_00000000-8_Test.cudafe2.gpu
1>### Assertion failure at line 1140 of …/…/be/cg/NVISA/exp_loadstore.cxx:
1>### Compiler Error in file C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/tmpxft_00000d44_00000000-9_Test.cpp3.i during Code_Expansion phase:
1>### NYI: deposit_bits for non-word size
1>nvopencc ERROR: C:\CUDA\toolkit\bin/…/open64/lib//be.exe returned non-zero status 1
1>Compiling…
1>main.cpp
1Linking…
1>LINK : fatal error LNK1181: Can not open file“.\Release\Test.obj”
1>Login Saved in“file://e:\PGSA_GPU\Demo11\Release\BuildLog.htm”
1>Demo11 - 1 个Error,0 个Waring.


My platform is : Windows XP sp3, CUDA2.3, VS2005

could you give some advice ?? thank you all!!!

The problem isn’t here. You’re probably calling a function that expects 32 bit integers.

thank you for your advice, but the problem was still at there. The function which call such structures is:

///////////////////////////////////////////////////////////////////////////////////////////

/// @brief

/// @param

///

/// @return

/// @see

/// @note

/// @date 2010-10-10 17:43

/// @version

///////////////////////////////////////////////////////////////////////////////////////////

global void GPUInitNodes(Thin_Node *pNodes, const int NUM)

{

unsigned int tidInGrid = threadIdx.x + blockIdx.x * blockDim.x;

union_NodeHeader temp;

Thin_Node Temp_Node;

for(int i=tidInGrid; i < NUM; i+=blockDim.x*gridDim.x)

{

	temp.tag_Fission.nValIndex = tidInGrid%125;

	temp.tag_Fission.nValValue = (int)tidInGrid%1022;

	temp.tag_Fission.nGrowthCount = tidInGrid%2020+1;

	Temp_Node.nNodeHeader = temp.nFusion;

	Temp_Node.FValue  = (float)(tidInGrid/123.0f);

	pNodes[i] = Temp_Node;

}

}

global void GPUProcessNode(Thin_Node *pNodes, const int NUM)

{

int tidInGrid = threadIdx.x + blockIdx.x * blockDim.x;

Thin_Node Temp_Node;

union_NodeHeader temp ;

for(int i=tidInGrid; i < NUM; i+=blockDim.x*gridDim.x)

{

	Temp_Node = pNodes[i];

	temp.nFusion = Temp_Node.nNodeHeader;

	temp.tag_Fission.nValIndex *= 2;

	temp.tag_Fission.nValValue *= 2;

	temp.tag_Fission.nGrowthCount *= 2;

	Temp_Node.nNodeHeader = temp.nFusion;

	Temp_Node.FValue = (float)(sqrt( Temp_Node.FValue ) );

	//__syncthreads();

	pNodes[i] = Temp_Node;

}

}

Have you tried changing those int’s to unsigned int’s in the structs?

This kind of error message indicates an internal compiler error. Since the version of CUDA is stated as 2.3, I would suggest upgrading to CUDA 3.2. If the version number contains an inadvertent swizzle and this is actually CUDA 3.2, I would suggest filing a bug against the compiler.

Yes, I have done such work, and It was failed.

I got another idea yesterday, for example

struct tag_NodeHeader //

{

int nValValue:32;      

int nValIndex:16;      

int nGrowthCount:16;   

};

union union_NodeHeader //

{

tag_NodeHeader  tag_Fission;   

int2    nFusion;              

};

struct Thin_Node

{

int2   nNodeHeader;   

float  FValue;       

};

and it seemed to work.