CUDA and Boost Libraries

Greetings all,

I am trying to write a host function and kernel that will integrate with a project on which I am working. This project is being developed in VS2008 on Windows XP 64. In this project we are using the Boost Libraries for added functionality, but I am having an issue when I try to compile my function. In the Boost libraries there is a piece of code of the form:

struct __declspec(align(32)) a32 {

};

Which when compiled produces the error “error: invalid alignment specifier value.”

While this form is normally not valid, the compiler for Microsoft allows the use of integers larger than 16 when using align, [url=“align (C++) | Microsoft Docs”]Microsoft Docs - Developer tools, technical documentation and coding examples. I think the problem arises when nvcc is used to compile code that contains this header file. Has anyone else come across this problem and been able to resolve it?

K

Hi smokeyjayl,

have you found any solution to this? I’m currently stuck with the same problem.

Greetings,

To

Hey, i’ve come across this kind of error while compiling using alignment in cuda. how did you fix it? i’m working on it now.

define d_4(t,n,b,e,f,g,h) EXTERN ALIGN CONST XP_DIR t n[4][256]

where ALIGN is defined as

define ALIGN __declspec(align(TABLE_ALIGN))

compiling this gives undefined error but not in EMU & host mode.

thanks.

Hey, i’ve come across this kind of error while compiling using alignment in cuda. how did you fix it? i’m working on it now.

define d_4(t,n,b,e,f,g,h) EXTERN ALIGN CONST XP_DIR t n[4][256]

where ALIGN is defined as

define ALIGN __declspec(align(TABLE_ALIGN))

compiling this gives undefined error but not in EMU & host mode.

thanks.

Hello,

I’ve the same problem with NVCC compiler and Boost (VS 2005). Has you a solution for this behavior?

Regards
chero :rolleyes: