You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Doxygen无法为未文档化命名空间中带参数列表的C++函数自动链接

我尝试通过指定参数生成指向特定版本函数的链接。若仅使用纯函数名fn(),Doxygen可自动链接到其中一个版本的函数;但如果包含参数列表,则无法生成任何链接。

Doxygen官方说明支持以下两种链接格式:

  1. "("")"
  2. "()"

参考Doxygen官方手册自动链接相关说明。

完整示例如下(Run.hpp):

// Copyright (c) 2021 Graphcore Ltd. All rights reserved.
/** \file
 *  循环神经网络(RNN)相关函数
 */

#ifndef popnn_Rnn_hpp
#define popnn_Rnn_hpp


/** 创建RNN所有循环步骤使用的状态张量
 *
 * 测试情况:
 *
 * 无参数的createOutputTensor()可以生成链接,但以下带参数的版本均无法生成链接:
 * See createOutputTensor(int graph, const int params,
 *                  unsigned numShards,
 *                  const int debugContext)
 *
 * See createOutputTensor(int graph, const int params,
 *                  unsigned multiple, unsigned numShards,
 *                  const int debugContext)
 *
 * 单行写法同样无效:createOutputTensor(int, const int, unsigned, unsigned, const int)
 *
 */
void createInitialState();


/** 创建张量
 *
 * \param graph           图对象
 * \param params          RNN参数
 * \param numShards       分片数量
 * \param debugContext    调试信息
 *
 * \return 形状为{timeSteps, batchSize, outputSize}的张量
 */
void createOutputTensor(int graph, const int params,
                   unsigned numShards,
                   const int debugContext);

/** 按指定大小创建张量
 *
 * \param graph           图对象
 * \param params          RNN参数
 * \param multiple        标准输出张量的整数倍系数
 * \param numShards       分片数量
 * \param debugContext    调试信息
 *
 * \return 形状为{timeSteps * multiple, batchSize, outputSize}的张量
 */
void createOutputTensor(int graph, const int params,
                   unsigned multiple, unsigned numShards,
                   const int debugContext);

#endif // #ifndef popnn_Rnn_hpp

所用Doxygen版本及配置信息:

$ doxygen --version
1.9.2

$ doxygen -x
# 与Doxyfile 1.9.2默认配置的差异
PROJECT_NAME           = "Poplar and PopLibs"
OUTPUT_DIRECTORY       = ./doxygen
INPUT                  = ./include
GENERATE_LATEX         = NO

内容的提问来源于stack exchange,提问作者James Random

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.10.02 23:48:01