-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
In the GroupwiseRegistration::optimization function, the cost_function is not used hence the warning reported below.
Indeed, if we trace the flow, there functions are called:
GroupwiseRegistration::optimization -> min_newuoa -> min_newuoa -> newuoa_ -> newuob_ -> biglag_ -> no use of "func"
void GroupwiseRegistration::optimization(void)
{
cost_function costFunc(this);
int prev = 0;
int step = 1;
while (m_degree_inc < m_degree)
{
nIter = 0;
int n = (m_degree_inc + 1) * (m_degree_inc + 1) * m_nSubj * 2 - prev;
min_newuoa(n, &m_coeff[prev], costFunc, 1.0f, 1e-5f, m_maxIter);
prev = (m_degree_inc + 1) * (m_degree_inc + 1) * m_nSubj * 2;
m_degree_inc = min(m_degree_inc + step, m_degree);
}
// the entire optimization together
nIter = 0;
min_newuoa(m_csize * 2, m_coeff, costFunc, 1.0f, 1e-6f, m_maxIter);
}
In file included from /home/jcfr/Projects/SlicerSALT-Release-Qt5/GROUPS/Modules/CLI/Groups/GroupwiseRegistration.cpp:19:0:
/home/jcfr/Projects/SlicerSALT-Release-Qt5/GROUPS/Modules/CLI/Groups/newuoa.h: In instantiation of ‘int biglag_(int, int, TYPE*, TYPE*, TYPE*, TYPE*, int*, int*, int*, TYPE*, TYPE*, TYPE*, TYPE*, TYPE*, TYPE*, TYPE*, TYPE*, Func&) [with TYPE = float; Func = cost_function]’:
/home/jcfr/Projects/SlicerSALT-Release-Qt5/GROUPS/Modules/CLI/Groups/newuoa.h:1311:10: required from ‘TYPE newuob_(int, int, TYPE*, TYPE, TYPE, int*, int, TYPE*, TYPE*, TYPE*, TYPE*, TYPE*, TYPE*, TYPE*, TYPE*, TYPE*, TYPE*, int*, TYPE*, TYPE*, TYPE*, Func&) [with TYPE = float; Func = cost_function]’
/home/jcfr/Projects/SlicerSALT-Release-Qt5/GROUPS/Modules/CLI/Groups/newuoa.h:1709:16: required from ‘TYPE newuoa_(int, int, TYPE*, TYPE, TYPE, int*, int, TYPE*, Func&) [with TYPE = float; Func = cost_function]’
/home/jcfr/Projects/SlicerSALT-Release-Qt5/GROUPS/Modules/CLI/Groups/newuoa.h:1720:15: required from ‘TYPE min_newuoa(int, TYPE*, Func&, TYPE, TYPE, int) [with TYPE = float; Func = cost_function]’
/home/jcfr/Projects/SlicerSALT-Release-Qt5/GROUPS/Modules/CLI/Groups/GroupwiseRegistration.cpp:1263:65: required from here
/home/jcfr/Projects/SlicerSALT-Release-Qt5/GROUPS/Modules/CLI/Groups/newuoa.h:59:42: warning: unused parameter ‘func’ [-Wunused-parameter]
TYPE *gd, TYPE *s, TYPE *w, Func &func)
^
Metadata
Metadata
Assignees
Labels
No labels