svenevs / exhale

Automatic C++ library api documentation generation: breathe doxygen in and exhale it out.
BSD 3-Clause "New" or "Revised" License
217 stars 51 forks source link

Unable to resolve function #170

Open njzjz opened 2 years ago

njzjz commented 2 years ago

I am not sure whether the issue comes from exhale or breathe. The generated page shows the following warning:

image

Warning

doxygenfunction: Unable to resolve function “deepmd::prod_env_mat_a_nvnmd_quantize_cpu” with arguments (FPTYPE, FPTYPE, FPTYPE, int, const FPTYPE, const int, const InputNlist&, const int, const FPTYPE, const FPTYPE, const int, const int, const float, const float, const std::vector, const FPTYPE) in doxygen xml output for project “core” from directory: _build/core/xml/. Potential matches:

  • template void prod_env_mat_a_nvnmd_quantize_cpu(FPTYPE em, FPTYPE em_deriv, FPTYPE rij, int nlist, const FPTYPE coord, const int type, const InputNlist &inlist, const int max_nbor_size, const FPTYPE avg, const FPTYPE std, const int nloc, const int nall, const float rcut, const float rcut_smth, const std::vector sec, const FPTYPE precs[3])

The generated rst file is

.. _exhale_function_prod__env__mat__nvnmd_8h_1a1be869e417f686dbc2667b4e012ee2fd:

Template Function deepmd::prod_env_mat_a_nvnmd_quantize_cpu
===========================================================

- Defined in :ref:`file_source_lib_include_prod_env_mat_nvnmd.h`

Function Documentation
----------------------

.. doxygenfunction:: deepmd::prod_env_mat_a_nvnmd_quantize_cpu(FPTYPE *, FPTYPE *, FPTYPE *, int *, const FPTYPE *, const int *, const InputNlist&, const int, const FPTYPE *, const FPTYPE *, const int, const int, const float, const float, const std::vector<int>, const FPTYPE)
   :project: core

The original C++ code from prod_env_mat_nvnmd.h:

namespace deepmd{
template<typename FPTYPE>
void prod_env_mat_a_nvnmd_quantize_cpu(
    FPTYPE * em, 
    FPTYPE * em_deriv, 
    FPTYPE * rij, 
    int * nlist, 
    const FPTYPE * coord, 
    const int * type, 
    const InputNlist & inlist,
    const int max_nbor_size,
    const FPTYPE * avg, 
    const FPTYPE * std, 
    const int nloc, 
    const int nall, 
    const float rcut, 
    const float rcut_smth, 
    const std::vector<int> sec,
    const FPTYPE precs[3]);

XML file: prodenvmat__nvnmd_8h.xml

svenevs commented 2 years ago

Hmmm. Related to #106, it looks like breathe 4.34 came out recently, does 4.33 or 4.32 work?

It looks like it wants the parameter names now. I am away for some time but hopefully an older version will work. The rules on what's wanted keep changing and aren't really documented.

There may be a way to hack it to get the right thing but this is a pain point for exhale that I'm sorry to say has come to find you :(