Excessively long error messages

Excessively long error messages

I recently started utilize ArBB in a computer vision project. The performance improvement is amazing.However, there is an annoying issue that I would like to see a way to address. When doing arbb::call or arbb::map, if there is a minor error in the argument, it would produce error messages of a mile length (I am using gcc 4.6.0), such as

gauss.cpp:198:4: error: no matching function for call to call()gauss.cpp:198:4: note: candidates are:/opt/intel/arbb/1.0.0.022/include/arbb/cpp/detail/call_template.hpp:41:25: note: arbb_2::closure arbb_2::call(void (*)())...... (omitting many lines ...)/opt/intel/arbb/1.0.0.022/include/arbb/cpp/detail/call_template.hpp:69:62: note: template arbb_2::closure arbb_2::call(const arbb_2::closure&)

I understand the long messages result from many versions of overloading of these functions to support up to 35 arguments.When there is something wrong, the template resolution mechanism would trigger a scan of all such functions, leading to excessively long messages.I am wondering whether there is some way to at least alleviate this problem, otherwise it would be just a headache for both the compiler and the author of the program.Note that C++0x supports variadic template. By exploiting this feature, those 35 or 36 overloads for a function can be possibly merged into one. Variadic template has been supported by latest versions of GCC and CLang. Just a quick thought: might be good idea to set a preprocessing switch or something, such that the user is allowed to turn on variadic template interfaces instead of many-overloads, when the his compiler supports it.

2 posts / novo 0
Último post
Para obter mais informações sobre otimizações de compiladores, consulte Aviso sobre otimizações.

Hi

Thanks for the suggestion about variadic template. It should help simplify C++ compiler error messages. We will gradually adopt C++0x standards and will keep users updated when we do so.

Thanks for using Intel ArBB. We're happy you observed amazing performance improvement. It will be more interesting to know the details of your project, whenever you're ready to share.

Cheers!

Deixar um comentário

Faça login para adicionar um comentário. Não é membro? Inscreva-se hoje mesmo!