.. index:: 
  !MrzReader.processingUnit Property

.. _id3_document_mrz_reader_processing_unit_class_member:

===============================================================================
MrzReader.processingUnit Property
===============================================================================

Module: :ref:`MrzReader<id3_document_mrz_reader_class>`

Type: :ref:`ProcessingUnit<id3_document_processing_unit_enum>`

Definition
----------

Processing unit where to run the detection process.

.. hint:: Default value is CPU.


.. tab-set::

  .. tab-item:: Python
    :sync: Python

    .. code:: Python

      processing_unit: ProcessingUnit


    **Exceptions**

      .. line-block::

        :ref:`DocumentException<id3_document_document_exception>`
        An error has occurred during Document Library execution.

  .. tab-item:: Dart
    :sync: Dart

    .. code:: Dart

      ProcessingUnit get processingUnit => getProcessingUnit();
      set processingUnit(ProcessingUnit value) => setProcessingUnit(value);


    **Exceptions**

      .. line-block::

        :ref:`DocumentException<id3_document_document_exception>`
        An error has occurred during Document Library execution.

  .. tab-item:: C#
    :sync: C#

    .. code:: C#

      public ProcessingUnit processingUnit
      {
          get => GetprocessingUnit();
          set => SetprocessingUnit(ref value);
      }


    **Exceptions**

      .. line-block::

        :ref:`DocumentException<id3_document_document_exception>`
        An error has occurred during Document Library execution.

  .. tab-item:: Java
    :sync: Java

    .. code:: Java

      public ProcessingUnit getProcessingUnit() throws DocumentException
      public void setProcessingUnit(ProcessingUnit processingUnit) throws DocumentException


    **Exceptions**

      .. line-block::

        :ref:`DocumentException<id3_document_document_exception>`
        An error has occurred during Document Library execution.

  .. tab-item:: Swift
    :sync: Swift

    .. code:: Swift

      public var processingUnit: ProcessingUnit
          get {
              return try! getProcessingUnit()
          }
      }


    **Exceptions**

      .. line-block::

        :ref:`DocumentException<id3_document_document_exception>`
        An error has occurred during Document Library execution.

  .. tab-item:: C
    :sync: C

    .. code:: C

      int id3DocumentMrzReader_GetProcessingUnit (ID3_DOCUMENT_MRZ_READER hMrzReader, id3DocumentProcessingUnit * eProcessingUnit)
      int id3DocumentMrzReader_SetProcessingUnit (ID3_DOCUMENT_MRZ_READER hMrzReader, id3DocumentProcessingUnit eProcessingUnit)

    **Returns**
   
      .. line-block::

        ``int``
        An error code.
        See :ref:`id3DocumentError<id3_document_document_error_enum>` file for the list of possible error codes.

