I'm trying to write a kernel to find the 'smallest' item in a 4096 by 4096 matrix that consists out of structs called pair. It looks to me that a reduce kernel is perfect for this. However, when I use my struct, it doesn't work, while floats work perfectly as in the documentation. Basicly nothing happens to the result, all values are always 0 no matter the input data. (even if I set the result pair's values before calling the kernel)
I am attaching my kernel code
kernel code