UCLA quarterback Josh Rosen completed 40 of his 60 passes for 480 yards, three touchdowns, and two interceptions in a losing effort to Stanford on Saturday. The Cardinal beat the Bruins 58-34.

The San Francisco 49ers had at least one representative in attendance to presumably watch the Bruins' star quarterback. 49ers vice president of player personnel Adam Peters was in attendance at Stanford Stadium to watch Rosen, according to Nick Wagoner of ESPN and Dylana DeSimone of Fourth & Nine.

The 49ers are widely expected to be in search of a franchise quarterback during the 2018 offseason. That could include one of the top prospects in next year's draft, which is expected to have a strong quarterback class. Rosen is among those top prospects.

Prior to the start of the regular season, general manager John Lynch said the nice thing about scouting this year is that all of the top quarterback prospects would be coming to the Bay Area. Rosen and USC's Sam Darnold were in town this weekend with the Trojans playing Cal. Wyoming's Josh Allen is scheduled to visit San Jose State in November.

The 49ers drafted quarterback C.J. Beathard out of Iowa in the third round of April's draft. However, it is unknown if the team views him as a long-term solution.

In his six games in 2016, Rosen completed 59.3-percent of his passes for 1,915 yards, 10 touchdowns, and five interceptions.

In November, Rosen had surgery on his throwing shoulder to repair the soft tissue injury that ended his season. Through four games in 2017, Rosen has completed 65.5-percent of his passes for 1,763 yards, 16 touchdowns, and four interceptions.