use array in am_kernel instead of vector, fixes segfaults with AVX