Atlanta — A billionaire technology investor and philanthropist says his family is providing grants to wipe out the student debt of the entire 2019 class at Morehouse College. Robert F. Smith made the announcement Sunday morning in front of nearly 400 graduating seniors, eliciting the biggest cheers of the morning.

"My family is going to create a grant to eliminate your student loans," Smith said, according to a tweet from the school.

A Morehouse College representative told CBS News that the total amount Smith is pledging to donate is $40 million. The total debt the students have is still being calculated.

Get Breaking News Delivered to Your Inbox

Morehouse President David Thomas had "no idea" the announcement was coming.

"People were stunned. If you look at any other film footage, you will see the students turning to each other. What did he say? Did he say what I think he said," Thomas told CBS News correspondent Mark Strassmann. "This will allow them to pursue their dreams ... As opposed to serving the debt."

Morehouse College is an all-male historically black college located in Atlanta. Smith is the founder and CEO of Vista Equity Partners, a private equity firm that invests in software, data, and technology-driven companies.

Robert F. Smith seen Sun., May 19, 2019, in a photo provided by Morehouse College in Atlanta. Morehouse College

During his commencement speech, Smith referenced Martin Luther King Jr. and spoke of a 21st century tech-based economy being a "Fourth Industrial Revolution."

"When Dr. King said that the 'arc of the moral universe bends toward justice," he wasn't saying it bends on its own accord. It bends because we choose to put our shoulders into it together and push," Smith said. "Technology is creating a whole new set of on ramps to the 21st century economy, and together we well help assure that African Americans will acquire the tech skills and be the beneficiaries in sectors that are being automated."

Smith received an honorary doctorate from Morehouse during the ceremony. He had already announced a $1.5 million gift to the school.