- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here is my code:
#include <CL/sycl.hpp>
#include <vector>
#include <iostream>
#include <oneapi/dpl/algorithm>
#include <algorithm>
using namespace sycl;
int main(int argc, char* argv[]) {
std::vector<int> a;
a.resize(100);
oneapi::dpl::fill(oneapi::dpl::execution::par_unseq,a.begin(),a.end(),3);
return 0;
}
error LNK2019: unresolved external symbol "void __cdecl oneapi::dpl::fill<class oneapi::dpl::execution::v1::parallel_unsequenced_policy const &,class std::_Vector_iterator<class std::_Vector_val<struct std::_Simple_types<int> > >,int>(class oneapi::dpl::execution::v1::parallel_unsequenced_policy const &,class std::_Vector_iterator<class std::_Vector_val<struct std::_Simple_types<int> > >,class std::_Vector_iterator<class std::_Vector_val<struct std::_Simple_types<int> > >,int const &)" (??$fill@AEBVparallel_unsequenced_policy@v1@execution@dpl@oneapi@@V?$_Vector_iterator@V?$_Vector_val@U?$_Simple_types@H@std@@@std@@@std@@H@dpl@oneapi@@YAXAEBVparallel_unsequenced_policy@v1@execution@01@V?$_Vector_iterator@V?$_Vector_val@U?$_Simple_types@H@std@@@std@@@std@@1AEBH@Z) referenced in function main
my programing environment :
VS2017
oneAPI DPC++ Compiler (2021.3.0)
windows 10
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
problem solved. must contain the <dpl/excution>header, Besides, the tbb.lib also requires to be linked. I didn't found this point mentioned in the tutorial. o_o
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
problem solved. must contain the <dpl/excution>header, Besides, the tbb.lib also requires to be linked. I didn't found this point mentioned in the tutorial. o_o
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Thanks for reaching out to us.
Glad to know your issue is resolved. It would be a great help if you let us know the tutorial document you are referring.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Before You Begin (intel.com) I see from here, Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
You can get the detailed steps in the below URL
As your issue is resolved, we are going ahead and closing this thread. If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.
Thanks!
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page