Main Content

comm.gpu.BlockDeinterleaver

Restore original ordering of block interleaved sequence with GPU

To use this object, you must install Parallel Computing Toolbox™ and have access to a supported GPU. If the host computer has a GPU configured, processing uses the GPU. Otherwise, processing uses the CPU. For more information about GPUs, see GPU Computing (Parallel Computing Toolbox).

Description

The comm.gpu.BlockDeinterleaver System object™ restores the original ordering of a sequence that was interleaved using the block interleaver System object.

To deinterleave the input vector:

  1. Create the comm.gpu.BlockDeinterleaver object and set its properties.

  2. Call the object with arguments, as if it were a function.

To learn more about how System objects work, see What Are System Objects?

Creation

Description

gpublockdeinterleaver = comm.gpu.BlockDeinterleaver creates a GPU-based block deinterleaver System object that restores the original ordering of a sequence that was block interleaved.

gpublockdeinterleaver = comm.gpu.BlockDeinterleaver(Name=Value) creates a GPU-based block deinterleaver object and sets properties using one or more name-value arguments. For example, gpublockinterleaver = comm.gpu.BlockDeinterleaver(PermutationVector=[2;1;4;3]) specifies the permutation vector for a four-element input signal.

gpublockdeinterleaver = comm.gpu.BlockDeinterleaver(permvec) creates a GPU-based block deinterleaver object and sets the PermutationVector property to permvec.

example

Properties

expand all

Unless otherwise indicated, properties are nontunable, which means you cannot change their values after calling the object. Objects lock when you call them, and the release function unlocks them.

If a property is tunable, you can change its value at any time.

For more information on changing property values, see System Design in MATLAB Using System Objects.

This property is read-only.

Permutation vector source, specified as 'Property'.

Permutation vector, specified as a column vector of integers. This input vector specifies the mapping used to permute the input signal. The permutation vector length must equal the input signal length and contain each integer in the range [1 length(x)].

Data Types: double

Usage

Description

y = gpublockdeinterleaver(x) restores the original ordering of the input signal, which was interleaved using a block interleaver as specified by the PermutationVector property.

example

Input Arguments

expand all

Input signal, specified as column vector.

Data Types: single | double | int8 | int16 | int32 | uint8 | uint16 | uint32 | logical | fi
Complex Number Support: Yes

Output Arguments

expand all

Output signal, returned as a column vector with the same length and data type as the input signal, x. The output contains the element from the input signal mapped as y(PermutationVector(k)) = x(k) for each integer k in the range [1 length(x)].

Object Functions

To use an object function, specify the System object as the first input argument. For example, to release system resources of a System object named obj, use this syntax:

release(obj)

expand all

stepRun System object algorithm
releaseRelease resources and allow changes to System object property values and input characteristics

Examples

collapse all

Create GPU-based interleaver and deinterleaver objects.

Set Specific Permutation Vector

interleaver = comm.gpu.BlockInterleaver([3 4 1 2]');
deinterleaver = comm.gpu.BlockDeinterleaver([3 4 1 2]');

Pass random data through the interleaver and deinterleaver. The length of the input data vector must equal the length of the PermutationVector property. Generate a 4-by-1 column vector of input data filled with integer values in the range [1, 7] by using the randi function.

data = randi(7,length(interleaver.PermutationVector),1);
intData = interleaver(data);
deintData = deinterleaver(intData);

Display the original sequence, interleaved sequence, and restored sequence.

[data intData deintData]
ans = 4×3

     6     1     6
     7     7     7
     1     6     1
     7     7     7

Confirm that the original and deinterleaved data are identical.

isequal(data,deintData)
ans = logical
   1

Set Random Permutation Vector

Generate a random 8-by-1 vector of unique integers to use as the permutation vector by using the randperm function.

permVec = randperm(8)';

Specify permVec as the permutation vector for GPU-based interleaver and deinterleaver objects.

interleaver = comm.gpu.BlockInterleaver(permVec);
deinterleaver = comm.gpu.BlockDeinterleaver(permVec);

Pass random data through the interleaver and deinterleaver.

data = randi(10,length(interleaver.PermutationVector),1);
intData = interleaver(data);
deintData = deinterleaver(intData);

Display the original sequence, interleaved sequence, and restored sequence.

[data intData deintData]
ans = 8×3

    10     5    10
     5     8     5
     9     9     9
     2     2     2
     5    10     5
    10     5    10
     8    10     8
    10    10    10

Confirm that the original and deinterleaved data are identical.

isequal(data,deintData)
ans = logical
   1

More About

expand all

Extended Capabilities

Version History

Introduced in R2012a