Skip to content

Commit d16ef4b

Browse files
Lallapalloozadanpovey
authored andcommitted
[src] Change smart ptr copy to move sematics, avoid cost of atomic incr/decr (kaldi-asr#2514)
1 parent 42a673a commit d16ef4b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/nnet3bin/nnet3-xvector-compute.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ static void RunNnetComputation(const MatrixBase<BaseFloat> &features,
4444
output_spec.indexes.resize(1);
4545
request.outputs.resize(1);
4646
request.outputs[0].Swap(&output_spec);
47-
std::shared_ptr<const NnetComputation> computation = compiler->Compile(request);
47+
std::shared_ptr<const NnetComputation> computation(std::move(compiler->Compile(request)));
4848
Nnet *nnet_to_update = NULL; // we're not doing any update.
4949
NnetComputer computer(NnetComputeOptions(), *computation,
5050
nnet, nnet_to_update);

0 commit comments

Comments
 (0)