Issue with passing NULL as argument in 4.8.5

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
There is a code as below
typename GraphT::SizeT Validate_Results(
    util::Parameters &parameters, GraphT &graph, typename GraphT::VertexT src,
    LabelT *h_labels, typename GraphT::VertexT *h_preds,
    LabelT *ref_labels = (LabelT*)NULL, 
    typename GraphT::VertexT *ref_preds = NULL,
    bool verbose = true) {

which is called like this:
      SizeT num_errors = app::bfs::Validate_Results(
          parameters, graph, src, h_labels, h_preds,
          ref_labels == NULL ? NULL : ref_labels[run_num % num_srcs], 
          NULL,
          false);


However, gcc 4.8.5 has problem with passing NULL with the 7th argument.


/home/mahmood/gunrock-1.0/examples/bfs/test_bfs.cu:120:62:   required from here
/home/mahmood/gunrock-1.0/gunrock/app/bfs/bfs_app.cu:114:166: error: no matching function for call to ‘Validate_Results(gunrock::util::Parameters&, gunrock::app::TestGraph<long unsigned int, long unsigned int, unsigned int, 768u, 0u>&, VertexT&, long unsigned int*&, VertexT*&, long unsigned int*, NULL, bool)’
       SizeT num_errors = app::bfs::Validate_Results(
                                                                                                                                                                      ^
/home/mahmood/gunrock-1.0/gunrock/app/bfs/bfs_app.cu:114:166: note: candidate is:
/home/mahmood/gunrock-1.0/gunrock/app/bfs/bfs_test.cuh:132:1: note: template<class GraphT, class LabelT> typename GraphT::SizeT gunrock::app::bfs::Validate_Results(gunrock::util::Parameters&, GraphT&, typename GraphT::VertexT, LabelT*, typename GraphT::VertexT*, LabelT*, typename GraphT::VertexT*, bool)
 typename GraphT::SizeT Validate_Results(
 ^
/home/mahmood/gunrock-1.0/gunrock/app/bfs/bfs_test.cuh:132:1: note:   template argument deduction/substitution failed:
/home/mahmood/gunrock-1.0/gunrock/app/bfs/bfs_app.cu:114:166: note:   mismatched types ‘typename GraphT::VertexT*’ and ‘long int’
       SizeT num_errors = app::bfs::Validate_Results(
                                                                                                                                                                      ^



I have confused on how to solve that. Any idea?



Regards,
Mahmood



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux