You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the following code, I'm attempting to create a vector of vectors of double futures, but am getting an error when trying to push the vector of double futures onto the parent vector. I talked with Samuel about it, and he thinks that it is an HPX problem, so I'm putting it up here to let you guys know about it.
Here's the code:
#include <hpx/hpx_main.hpp>
#include <hpx/include/lcos.hpp>
#include <hpx/include/actions.hpp>
#include <vector>
double get_rand() {
return (double)(rand() % 100);
}
HPX_PLAIN_ACTION(get_rand, get_rand_action);
int main(int argc, char* argv[])
{
hpx::naming::id_type here = hpx::find_here();
std::vector< std::vector< hpx::lcos::future<double> > > futuresParent;
for (int i = 0; i < 10; i++)
{
std::vector< hpx::lcos::future<double> > futures;
for (int j = 0; j < 10; j++)
{
futures.push_back(hpx::async<get_rand_action>(here));
}
futuresParent.push_back(futures); // This line causes the error
}
return 0;
}
Here's the error:
Severity Code Description Project File Line Suppression State
Error C2248 'hpx::lcos::future::future': cannot access private member declared in class 'hpx::lcos::future' matrix_matrix_hpx_single_file_error_exe C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xmemory0 655
As the error points out, I'm working on this with Visual Studio (2015), on Windows 7.
By the way, my name is Maxwell Reeser, and I'm an undergrad working at CCT on Chancellor's Student Aid.
The text was updated successfully, but these errors were encountered:
The line causing the error is trying to copy a vector<future>, which cannot be done as futures are not copyable. Presumably the code should move the local vector into the parent vector, rather than attempting to insert a copy and then discarding the original.
In the following code, I'm attempting to create a vector of vectors of double futures, but am getting an error when trying to push the vector of double futures onto the parent vector. I talked with Samuel about it, and he thinks that it is an HPX problem, so I'm putting it up here to let you guys know about it.
Here's the code:
Here's the error:
As the error points out, I'm working on this with Visual Studio (2015), on Windows 7.
By the way, my name is Maxwell Reeser, and I'm an undergrad working at CCT on Chancellor's Student Aid.
The text was updated successfully, but these errors were encountered: