Is there a way to compute residuals multi-threads, like Solver::Options::num_threads for jacobians ?

31 views
Skip to first unread message

3658...@qq.com

unread,
Dec 29, 2017, 11:39:20 AM12/29/17
to Ceres Solver
I know that "Solver::Options::num_threads" can compute jacobians by multi-threads very efficiently and it works pretty well in my program.

But I found in my summay that now the residual computation time is dominant. I wonder if there is a way similar that can compute residuals by multi-threads too ?



Sameer Agarwal

unread,
Dec 29, 2017, 11:40:57 AM12/29/17
to ceres-...@googlegroups.com
The same threading mechanism is used for jacobian and residual computation.
Sameer


On Fri, Dec 29, 2017 at 10:09 PM <3658...@qq.com> wrote:
I know that "Solver::Options::num_threads" can compute jacobians by multi-threads very efficiently and it works pretty well in my program.

But I found in my summay that now the residual computation time is dominant. I wonder if there is a way similar that can compute residuals by multi-threads too ?



--
You received this message because you are subscribed to the Google Groups "Ceres Solver" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ceres-solver...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/07ea65c1-3f40-4cbd-a423-039531959110%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

3658...@qq.com

unread,
Dec 29, 2017, 11:43:01 AM12/29/17
to Ceres Solver
Here is what I found on the website:
int Solver::Options::num_threads

Default: 1

Number of threads used by Ceres to evaluate the Jacobian.


Thanks, Do you mean that it can also evaluate residuals? If thats the case, I would suggest make it clear on the API document too.

Sameer Agarwal

unread,
Dec 29, 2017, 11:44:54 AM12/29/17
to ceres-...@googlegroups.com
yes that is what I mean. 
residual evaluation is usually dominated by the jacobian evaluation that we did not think it was worth mentioning. I will update the docs.
Sameer


3658...@qq.com

unread,
Dec 29, 2017, 11:48:10 AM12/29/17
to Ceres Solver
Thank you. Because I have thousands of laser points and so many blocks. So adding up the residuals also took lots of time. After setting the option, time of jacobian evaluation is less than residuals evaluation. Thats why I wonder.

Sameer Agarwal

unread,
Dec 29, 2017, 12:03:36 PM12/29/17
to ceres-...@googlegroups.com
Status::FullReport() or it didn't happen :)
Sameer


Sameer Agarwal

unread,
Dec 29, 2017, 12:03:42 PM12/29/17
to ceres-...@googlegroups.com
Summary::FullReport() I mean.
Reply all
Reply to author
Forward
0 new messages