kfdtest: fix SDMACopyParams build error on redhat 7.2 in KFDTestUtilQueue.cpp
In file included from /usr/include/c++/4.8.2/algorithm:62:0,
from /home/jenkins/libhsakmt/tests/kfdtest/src/KFDTestUtilQueue.cpp:24:
/usr/include/c++/4.8.2/bits/stl_algo.h: In instantiation of ‘_RandomAccessIterator std::__unguarded_partition(_RandomAccessIterator, _RandomAccessIterator, const _Tp&, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<SDMACopyParams*, std::vector<SDMACopyParams> >; _Tp = SDMACopyParams; _Compare = bool (*)(SDMACopyParams&, SDMACopyParams&)]’:
/usr/include/c++/4.8.2/bits/stl_algo.h:2296:78: required from ‘_RandomAccessIterator std::__unguarded_partition_pivot(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<SDMACopyParams*, std::vector<SDMACopyParams> >; _Compare = bool (*)(SDMACopyParams&, SDMACopyParams&)]’
/usr/include/c++/4.8.2/bits/stl_algo.h:2337:62: required from ‘void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<SDMACopyParams*, std::vector<SDMACopyParams> >; _Size = long int; _Compare = bool (*)(SDMACopyParams&, SDMACopyParams&)]’
/usr/include/c++/4.8.2/bits/stl_algo.h:5499:44: required from ‘void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<SDMACopyParams*, std::vector<SDMACopyParams> >; _Compare = bool (*)(SDMACopyParams&, SDMACopyParams&)]’
/home/jenkins/libhsakmt/tests/kfdtest/src/KFDTestUtilQueue.cpp:351:66: required from here
/usr/include/c++/4.8.2/bits/stl_algo.h:2263:35: error: invalid initialization of reference of type ‘SDMACopyParams&’ from expression of type ‘const SDMACopyParams’
while (__comp(*__first, __pivot))
^
/usr/include/c++/4.8.2/bits/stl_algo.h:2266:34: error: invalid initialization of reference of type ‘SDMACopyParams&’ from expression of type ‘const SDMACopyParams’
while (__comp(__pivot, *__last))
^
Change-Id: I0fce0c7e6d0a0ce93b1e6522ee8f216615765568
Signed-off-by: changzhu <Changfeng.Zhu@amd.com>
This commit is contained in:
@@ -323,7 +323,7 @@ class AsyncMPMQ {
|
||||
* SDMA queue helper functions.
|
||||
*/
|
||||
|
||||
bool sort_SDMACopyParams(SDMACopyParams &a1, SDMACopyParams &a2) {
|
||||
bool sort_SDMACopyParams(const SDMACopyParams &a1, const SDMACopyParams &a2) {
|
||||
if (a1.node != a2.node)
|
||||
return a1.node < a2.node;
|
||||
return a1.group < a2.group;
|
||||
|
||||
Reference in New Issue
Block a user