Class BatchTranslator

Class Documentation

class BatchTranslator

Public Functions

BatchTranslator(DeviceId const device, Vocabs &vocabs, Ptr<Options> options, const AlignedMemory *modelMemory, const AlignedMemory *shortlistMemory)

Initialise the marian translator.

Parameters
  • device: DeviceId that performs translation. Could be CPU or GPU

  • vocabs: Vector that contains ptrs to two vocabs

  • options: Marian options object

  • modelMemory: byte array (aligned to 256!!!) that contains the bytes of a model.bin. Provide a nullptr if not used.

  • shortlistMemory: byte array of shortlist (aligned to 64)

std::string _identifier()
void translate(Batch &batch)
void initialize()