I need to implement a function given as input x: 1xF, y: 1xF and outputs a scalar. I’m looking for to implement it in a GPU efficient manner, i.e. create all pair x_i, y_j and compute a scalar with one operation. This is why I though about this (NxF)x(NxF) --> NxNx2F