mirror of
https://github.com/marian-nmt/marian.git
synced 2024-11-27 10:33:14 +03:00
split out args for functor. Get ready for half2
This commit is contained in:
parent
f1334cace0
commit
55ac6ae8fb
@ -220,8 +220,13 @@ __global__ void gBroadcast(Functor functor,
|
||||
// in2Wrap[beamIdx * cols + stateIdx]);
|
||||
//outWrap[id] = functor(in1Wrap(indices[0], indices[1], 0, batchIdx),
|
||||
// in2Wrap(indices[2], indices[1], 0, 0));
|
||||
outWrap(srcId, stateIdx, beamIdx, 0) = functor(in1Wrap(srcId, stateIdx, 0, batchIdx),
|
||||
in2Wrap(beamIdx, stateIdx, 0, 0));
|
||||
//outWrap(srcId, stateIdx, beamIdx, 0) = functor(in1Wrap(srcId, stateIdx, 0, batchIdx),
|
||||
// in2Wrap(beamIdx, stateIdx, 0, 0));
|
||||
const half *in1 = &in1Wrap(srcId, stateIdx, 0, batchIdx);
|
||||
const half *in2 = &in2Wrap(beamIdx, stateIdx, 0, 0);
|
||||
half *out = &outWrap(srcId, stateIdx, beamIdx, 0);
|
||||
*out = functor(*in1, *in2);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user