需要帮助破译 gprof 输出
我很确定这与 void 函数指针向量有关,但我无法真正从中得到任何东西。
有人可以帮我解决这个问题吗?
__gnu_cxx::__normal_iterator<unsigned long long const*, std::vector<unsigned long long, std::allocator<unsigned long long> > >::difference_type __gnu_cxx::operator-<unsigned long long const*, unsigned long long const*, std::vector<unsigned long long, std::allocator<unsigned long long> ...> >(__gnu_cxx::__normal_iterator<unsigned long long const*, std::vector<unsigned long long, std::allocator<unsigned long long> > > const&, __gnu_cxx::__normal_iterator<unsigned long long const*, std::vector<unsigned long long, std::allocator<unsigned long long> > > const&)
I am pretty sure this has something to do with a vector of void function pointers, but I can't really make anything out of it.
Can someone break this down for me?
__gnu_cxx::__normal_iterator<unsigned long long const*, std::vector<unsigned long long, std::allocator<unsigned long long> > >::difference_type __gnu_cxx::operator-<unsigned long long const*, unsigned long long const*, std::vector<unsigned long long, std::allocator<unsigned long long> ...> >(__gnu_cxx::__normal_iterator<unsigned long long const*, std::vector<unsigned long long, std::allocator<unsigned long long> > > const&, __gnu_cxx::__normal_iterator<unsigned long long const*, std::vector<unsigned long long, std::allocator<unsigned long long> > > const&)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果我是正确的,这可以粗略地翻译为:
所以,它可能指的是计算向量的两个迭代器之间的差(=距离)的函数。无论如何,当优化器启用此类函数时,实际上应该将其转换为简单的内联指针比较。
If I am correct, this could be roughly translated to:
So, probably it is referring to the function that computes the difference (=distance) between two iterators of a vector. Anyhow, when the optimizer is on such function should actually be turned in a simple inlined pointers comparison.
它似乎与减去两个 std::vector::iterator 有关。
It appears to be related to subtracting two
std::vector<unsigned long long>::iterator
s.这是减法运算符 (
operator-
),用于将两个迭代器的差值放入unsigned long long
向量中。在普通 C++ 中,如果没有所有分配器和额外的模板参数,此函数签名将如下所示:其中
std::vector::iterator::difference_type
通常与ptrdiff_t
。This is the subtraction operator (
operator-
) for taking the difference of two iterators into vectors ofunsigned long long
s. In normal C++, without all of the allocators and extra template parameters, this function signature would look like this:Where
std::vector<unsigned long long>::iterator::difference_type
is normally the same asptrdiff_t
.