Error: Unaligned memory accesses not supported


I have declared a struct as follows:

typedef unsigned int fieldSet;

typedef unsigned int fieldSetDouble;

struct __align(16)__ task {

	fieldSet cols;

	fieldSet rows;

	fieldSetDouble diagP;

	fieldSetDouble diagN;

	int nextRow;


The following code gives me an error when compiling:


_device__ void initTask(task* t) {

	t->cols = 0;

	t->rows = 0;

	t->diagP = 0;

	t->diagN = 0;

	t->nextRow = 0;


Each line inside the function gives an “Error: Unaligned memory accesses not supported”.

I’ve searched the forums and there are some threads referencing this error, but none discuses this specific issue. At least I couldn’t figure out :P

So, if you can help me! Thanks a lot!