Skip to content

Instantly share code, notes, and snippets.

@roshanr95
Created July 31, 2014 13:16
Show Gist options
  • Save roshanr95/b3bb5bd5e3eb16617fa6 to your computer and use it in GitHub Desktop.
Save roshanr95/b3bb5bd5e3eb16617fa6 to your computer and use it in GitHub Desktop.
In file included from /Users/roshanraghupathy/Developer/compute/test/test_nth_element.cpp:15:
In file included from /Users/roshanraghupathy/Developer/compute/include/boost/compute/algorithm/copy_n.hpp:16:
In file included from /Users/roshanraghupathy/Developer/compute/include/boost/compute/algorithm/copy.hpp:23:
In file included from /Users/roshanraghupathy/Developer/compute/include/boost/compute/iterator/buffer_iterator.hpp:24:
/Users/roshanraghupathy/Developer/compute/include/boost/compute/detail/meta_kernel.hpp:907:12: error: non-const lvalue
reference to type 'boost::compute::detail::meta_kernel' cannot bind to a temporary of type 'const typename
boost::proto::detail::enable_binary<deduce_domain, deduce_domain::proto_grammar,
boost::mpl::or_<is_extension<const expression<basic_expr<shift_left, list2<const
expression<basic_expr<shift_left, list2<const expression<basic_expr<shift_left, list2<const
expression<basic_expr<shift_left, list2<const expression<basic_expr<shift_left,
list2<expression<basic_expr<terminal, term<meta_kernel &>, 0> >, const expression<expr<terminal,
term<placeholder<0> >, 0> > &>, 2> > &, expression<basic_expr<terminal, term<char const (&)[2]>, 0> > >, 2> > &,
expression<basic_expr<terminal, term<const basic_string<char> &>, 0> > >, 2> > &, expression<basic_expr<terminal,
term<char const (&)[2]>, 0> > >, 2> > &, expression<basic_expr<terminal, term<const int &>, 0> > >, 2> > >,
is_extension<char const (&)[3]> >, boost::proto::tag::shift_left, const expression<basic_expr<shift_left,
list2<const expression<basic_expr<shift_left, list2<const expression<basic_expr<shift_left, list2<const
expression<basic_expr<shift_left, list2<const expression<basic_expr<shift_left,
list2<expression<basic_expr<terminal, term<meta_kernel &>, 0> >, const expression<expr<terminal,
term<placeholder<0> >, 0> > &>, 2> > &, expression<basic_expr<terminal, term<char const (&)[2]>, 0> > >, 2> > &,
expression<basic_expr<terminal, term<const basic_string<char> &>, 0> > >, 2> > &, expression<basic_expr<terminal,
term<char const (&)[2]>, 0> > >, 2> > &, expression<basic_expr<terminal, term<const int &>, 0> > >, 2> > &, char
const (&&)[3]>::type' (aka 'const
expression<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::shift_left,
boost::proto::argsns_::list2<const
boost::compute::lambda::expression<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::shift_left,
boost::proto::argsns_::list2<const
boost::compute::lambda::expression<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::shift_left,
boost::proto::argsns_::list2<const
boost::compute::lambda::expression<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::shift_left,
boost::proto::argsns_::list2<const
boost::compute::lambda::expression<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::shift_left,
boost::proto::argsns_::list2<const
boost::compute::lambda::expression<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::shift_left,
boost::proto::argsns_::list2<boost::compute::lambda::expression<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal,
boost::proto::argsns_::term<boost::compute::detail::meta_kernel &>, 0> >, const
boost::compute::lambda::expression<boost::proto::exprns_::expr<boost::proto::tagns_::tag::terminal,
boost::proto::argsns_::term<boost::compute::lambda::placeholder<0> >, 0> > &>, 2> > &,
boost::compute::lambda::expression<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal,
boost::proto::argsns_::term<char const (&)[2]>, 0> > >, 2> > &,
boost::compute::lambda::expression<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal,
boost::proto::argsns_::term<const std::__1::basic_string<char> &>, 0> > >, 2> > &,
boost::compute::lambda::expression<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal,
boost::proto::argsns_::term<char const (&)[2]>, 0> > >, 2> > &,
boost::compute::lambda::expression<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal,
boost::proto::argsns_::term<const int &>, 0> > >, 2> > &,
boost::compute::lambda::expression<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal,
boost::proto::argsns_::term<char const (&)[3]>, 0> > >, 2> >')
return kernel << "((" << expr.arg1() << ")"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/roshanraghupathy/Developer/compute/include/boost/compute/functional/bind.hpp:132:14: note: in instantiation of
function template specialization
'boost::compute::detail::operator<<<boost::compute::lambda::expression<boost::proto::exprns_::expr<boost::proto::tagns_::tag::terminal,
boost::proto::argsns_::term<boost::compute::lambda::placeholder<0> >, 0> >, int, int>' requested here
return k << expr.m_function(expr.template get_nth_arg<0>(),
^
/Users/roshanraghupathy/Developer/compute/include/boost/compute/functional/bind.hpp:156:12: note: in instantiation of
function template specialization 'boost::compute::detail::apply_invoked_bound_function<boost::compute::less<int>,
boost::tuples::tuple<boost::compute::lambda::expression<boost::proto::exprns_::expr<boost::proto::tagns_::tag::terminal,
boost::proto::argsns_::term<boost::compute::lambda::placeholder<0> >, 0> >, int, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>,
boost::tuples::tuple<boost::compute::detail::buffer_iterator_index_expr<int,
boost::compute::detail::meta_kernel_variable<unsigned int> >, boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> >' requested here
return apply_invoked_bound_function(k, expr);
^
/Users/roshanraghupathy/Developer/compute/include/boost/compute/algorithm/copy_if.hpp:52:12: note: in instantiation of
function template specialization 'boost::compute::detail::operator<<<boost::compute::less<int>,
boost::tuples::tuple<boost::compute::lambda::expression<boost::proto::exprns_::expr<boost::proto::tagns_::tag::terminal,
boost::proto::argsns_::term<boost::compute::lambda::placeholder<0> >, 0> >, int, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>,
boost::tuples::tuple<boost::compute::detail::buffer_iterator_index_expr<int,
boost::compute::detail::meta_kernel_variable<unsigned int> >, boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> >' requested here
<< predicate(first[k1.get_global_id(0)]) << " ? 1 : 0;\n";
^
/Users/roshanraghupathy/Developer/compute/include/boost/compute/algorithm/copy_if.hpp:118:20: note: in instantiation of
function template specialization 'boost::compute::detail::copy_if_impl<boost::compute::buffer_iterator<int>,
boost::compute::buffer_iterator<int>, boost::compute::detail::bound_function<boost::compute::less<int>,
boost::tuples::tuple<boost::compute::lambda::expression<boost::proto::exprns_::expr<boost::proto::tagns_::tag::terminal,
boost::proto::argsns_::term<boost::compute::lambda::placeholder<0> >, 0> >, int, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> > >' requested here
return detail::copy_if_impl(first, last, result, predicate, false, queue);
^
/Users/roshanraghupathy/Developer/compute/include/boost/compute/algorithm/stable_partition.hpp:51:27: note: in
instantiation of function template specialization 'boost::compute::copy_if<boost::compute::buffer_iterator<int>,
boost::compute::buffer_iterator<int>, boost::compute::detail::bound_function<boost::compute::less<int>,
boost::tuples::tuple<boost::compute::lambda::expression<boost::proto::exprns_::expr<boost::proto::tagns_::tag::terminal,
boost::proto::argsns_::term<boost::compute::lambda::placeholder<0> >, 0> >, int, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> > >' requested here
::boost::compute::copy_if(tmp.begin(),
^
/Users/roshanraghupathy/Developer/compute/include/boost/compute/algorithm/partition.hpp:33:12: note: in instantiation
of function template specialization 'boost::compute::stable_partition<boost::compute::buffer_iterator<int>,
boost::compute::detail::bound_function<boost::compute::less<int>,
boost::tuples::tuple<boost::compute::lambda::expression<boost::proto::exprns_::expr<boost::proto::tagns_::tag::terminal,
boost::proto::argsns_::term<boost::compute::lambda::placeholder<0> >, 0> >, int, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> > >' requested here
return stable_partition(first, last, predicate, queue);
^
/Users/roshanraghupathy/Developer/compute/include/boost/compute/algorithm/nth_element.hpp:47:28: note: in instantiation
of function template specialization 'boost::compute::partition<boost::compute::buffer_iterator<int>,
boost::compute::detail::bound_function<boost::compute::less<int>,
boost::tuples::tuple<boost::compute::lambda::expression<boost::proto::exprns_::expr<boost::proto::tagns_::tag::terminal,
boost::proto::argsns_::term<boost::compute::lambda::placeholder<0> >, 0> >, int, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> > >' requested here
Iterator new_nth = partition(first, last, bind(compare, _1, value), queue);
^
/Users/roshanraghupathy/Developer/compute/include/boost/compute/algorithm/nth_element.hpp:90:5: note: in instantiation
of function template specialization 'boost::compute::nth_element<boost::compute::buffer_iterator<int>,
boost::compute::less<int> >' requested here
nth_element(first, nth, last, less_than, queue);
^
/Users/roshanraghupathy/Developer/compute/test/test_nth_element.cpp:29:21: note: in instantiation of function template
specialization 'boost::compute::nth_element<boost::compute::buffer_iterator<int> >' requested here
boost::compute::nth_element(
^
1 error generated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment