Magnetic structure of Sm2IrIn8 determined by x-ray resonant magnetic scattering