Skip to content

compare_memory_blockCompareMemoryBlockCompareMemoryBlockcompare_memory_blockT_compare_memory_block🔗

Short description🔗

compare_memory_blockCompareMemoryBlockCompareMemoryBlockcompare_memory_blockT_compare_memory_block — Compare contents of memory blocks regarding equality.

Signature🔗

compare_memory_block( memory_block MemoryBlocks1, memory_block MemoryBlocks2, out integer IsEqual )void CompareMemoryBlock( const HTuple& MemoryBlocks1, const HTuple& MemoryBlocks2, HTuple* IsEqual )static void HOperatorSet.CompareMemoryBlock( HTuple memoryBlocks1, HTuple memoryBlocks2, out HTuple isEqual )def compare_memory_block( memory_blocks_1: MaybeSequence[HHandle], memory_blocks_2: MaybeSequence[HHandle] ) -> int

Herror T_compare_memory_block( const Htuple MemoryBlocks1, const Htuple MemoryBlocks2, Htuple* IsEqual )

Description🔗

The operator compare_memory_blockCompareMemoryBlock compares the contents of two memory block tuples and returns the comparison result in IsEqualisEqualis_equal. Therefore, each memory block in the tuple MemoryBlocks1memoryBlocks1memory_blocks_1 is compared to the respective block in the tuple MemoryBlocks2memoryBlocks2memory_blocks_2 with the same index. IsEqualisEqualis_equal is set to TRUE if the number of elements of the two tuples matches and if the length and byte content of each pair of memory blocks coincides, otherwise to FALSE.

Attention🔗

Note that compare_memory_blockCompareMemoryBlock compares the memory blocks regarding their actual byte content, not their location in memory.

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

Parameters🔗

MemoryBlocks1memoryBlocks1memory_blocks_1 (input_control) memory_block(-array) → (handle)HTuple (HHandle)HMemoryBlock, HTuple (IntPtr)MaybeSequence[HHandle]Htuple (handle)

Tuple of reference memory blocks.

MemoryBlocks2memoryBlocks2memory_blocks_2 (input_control) memory_block(-array) → (handle)HTuple (HHandle)HMemoryBlock, HTuple (IntPtr)MaybeSequence[HHandle]Htuple (handle)

Tuple of test memory blocks.

IsEqualisEqualis_equal (output_control) integer → (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Boolean result value.

Result🔗

The operator compare_memory_blockCompareMemoryBlock returns the value 2 (H_MSG_TRUE) if the passed handles are valid. Otherwise, an exception is raised.

Combinations with other operators🔗

Combinations

Possible predecessors

create_memory_block_externCreateMemoryBlockExtern, create_memory_block_extern_copyCreateMemoryBlockExternCopy, image_to_memory_blockImageToMemoryBlock, read_memory_blockReadMemoryBlock

Module🔗

Foundation