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
{{ message }}
This repository has been archived by the owner on Dec 28, 2023. It is now read-only.
Sorry for the slow reply. Not really sure what's going on here. It builds fine on my machine and in CI. Perhaps a difference between gcc 8 and 9. I could imagine that 9 stopped inferring the template parameters or something. I'll have a try at building it with gcc-9 when I get a chance.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
compiling with g++ 9.2.1 on Ubuntu 16.04 I get the following compiler error; any ideas what might
output of make command:
Scanning dependencies of target cpprl
[ 1%] Building CXX object CMakeFiles/cpprl.dir/src/storage.cpp.o
[ 1%] Building CXX object CMakeFiles/cpprl.dir/src/observation_normalizer.cpp.o
/home/dimid/Documents/misc/pytorch-cpp-rl/src/observation_normalizer.cpp: In member function ‘std::vector<float, std::allocator > cpprl::ObservationNormalizerImpl::get_mean() const’:
/home/dimid/Documents/misc/pytorch-cpp-rl/src/observation_normalizer.cpp:79:30: error: expected primary-expression before ‘(’ token
79 | return std::vector(mean.data_ptr(), mean.data_ptr() + mean.numel());
| ^
/home/dimid/Documents/misc/pytorch-cpp-rl/src/observation_normalizer.cpp:79:45: error: expected primary-expression before ‘float’
79 | return std::vector(mean.data_ptr(), mean.data_ptr() + mean.numel());
| ^~~~~
/home/dimid/Documents/misc/pytorch-cpp-rl/src/observation_normalizer.cpp:79:69: error: expected primary-expression before ‘float’
79 | return std::vector(mean.data_ptr(), mean.data_ptr() + mean.numel());
| ^~~~~
/home/dimid/Documents/misc/pytorch-cpp-rl/src/observation_normalizer.cpp: In member function ‘std::vector<float, std::allocator > cpprl::ObservationNormalizerImpl::get_variance() const’:
/home/dimid/Documents/misc/pytorch-cpp-rl/src/observation_normalizer.cpp:85:30: error: expected primary-expression before ‘(’ token
85 | return std::vector(variance.data_ptr(), variance.data_ptr() + variance.numel());
| ^
/home/dimid/Documents/misc/pytorch-cpp-rl/src/observation_normalizer.cpp:85:49: error: expected primary-expression before ‘float’
85 | return std::vector(variance.data_ptr(), variance.data_ptr() + variance.numel());
| ^~~~~
/home/dimid/Documents/misc/pytorch-cpp-rl/src/observation_normalizer.cpp:85:77: error: expected primary-expression before ‘float’
85 | return std::vector(variance.data_ptr(), variance.data_ptr() + variance.numel());
| ^~~~~
CMakeFiles/cpprl.dir/build.make:75: recipe for target 'CMakeFiles/cpprl.dir/src/observation_normalizer.cpp.o' failed
make[2]: *** [CMakeFiles/cpprl.dir/src/observation_normalizer.cpp.o] Error 1
CMakeFiles/Makefile2:285: recipe for target 'CMakeFiles/cpprl.dir/all' failed
make[1]: *** [CMakeFiles/cpprl.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
The text was updated successfully, but these errors were encountered: