Confused with routine cusparseSpGEMM_workEstimation

I am confused with the purpose of routine “cusparseSpGEMM_workEstimation”. Both routines “cusparseSpGEMM_workEstimation” and “cusparseSpGEMM_compute” estimate a buffer size in their first execution. The sample “CSR SpGEMM - Sparse Matrix-Sparse Matrix Multiplication” validates this understanding. However, it seems that the buffer size and the buffer created from “cusparseSpGEMM_workEstimation” was never used in the code. I am wondering what is the purpose of routine “cusparseSpGEMM_workEstimation”.