Skip to content

Commit

Permalink
fix uninitialized variable when built without CUDA
Browse files Browse the repository at this point in the history
  • Loading branch information
redpony committed Oct 7, 2017
1 parent c9cc4c7 commit 78b6135
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions dynet/init.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@ using namespace std;
namespace dynet {

DynetParams::DynetParams() : random_seed(0), mem_descriptor("512"), weight_decay(0), autobatch(0), autobatch_debug(0),
shared_parameters(false)
#if HAVE_CUDA
, ngpus_requested(false), ids_requested(false), cpu_requested(false), requested_gpus(-1)
#endif
shared_parameters(false), ngpus_requested(false), ids_requested(false), cpu_requested(false), requested_gpus(-1)
{
#if HAVE_CUDA
gpu_mask = std::vector<int>(MAX_GPUS, 0);
Expand Down

0 comments on commit 78b6135

Please sign in to comment.