The State Government may authorize the officer in charge of the jail where a person is confined under the provisions of section 330 or section 335 to perform all or any of the functions of the Inspector-General of Prisons under section 337 or section 338.