Text this: IRS-assisted D2D system resource allocation and RCG beamforming optimization in H-CRAN