Erbium-doped laser with multi-segmented silicon nitride structure