  We combine the published stellar mass function (SMF) and gas scaling
relations to explore the baryonic (stellar plus cold gas) mass function (BMF)
of galaxies to redshift $z=3$. We find evidence that at log$(M_{\rm
baryon}/M_{\bigodot})>11.3$, the BMF evolves little since $z\sim 2.2$. With the
evolution of BMF and SMF, we investigate the baryon net accretion rate
($\dot{\rho}_{\rm baryon}$) and stellar mass growth rate ($\dot{\rho}_{\rm
star}$) for the galaxy population of log($M_{\rm star}/M_{\bigodot}$)>10. The
ratio between these two quanties, $\dot{\rho}_{\rm baryon}$/$\dot{\rho}_{\rm
star}$, decreases from $\dot{\rho}_{\rm baryon}$/$\dot{\rho}_{\rm star}\sim$2
at $z\sim 2.5$ to $\dot{\rho}_{\rm baryon}$/$\dot{\rho}_{\rm star}<$0.5 at
$z\sim 0.5$, suggesting that massive galaxies are transforming from the
"accretion dominated" phase to the "depletion dominated" phase from high$-z$ to
low$-z$. The transition of these two phases occurs at $z\sim1.5$, which is
consistent with the onset redshift of the decline of cosmic star formation rate
density. This provides evidence to support the idea that the decline of cosmic
star formation rate density since $z\sim1.5$ is mainly resulted from the
decline of baryon net accretion rate and star formation quenching in galaxies.
