comm.gpu.BlockDeinterleaver

Restore original ordering of block interleaved sequence with GPU

Description

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

Note

To use this object, you must install a Parallel Computing Toolbox™ license and have access to an appropriate GPU. For more about GPUs, see GPU Computing (Parallel Computing Toolbox).

A GPU-based System object accepts typical MATLAB® arrays or objects created using the gpuArray class. A GPU-based System object supports input signals with double- or single-precision data types. The output signal inherits its data type from the input signal.

  • If the input signal is a MATLAB array, the System object handles data transfer between the CPU and the GPU. The output signal is a MATLAB array.

  • If the input signal is a gpuArray, the data remains on the GPU. The output signal is a gpuArray. When the object is given a gpuArray, calculations take place entirely on the GPU, and no data transfer occurs. Passing gpuArray arguments provides increased performance by reducing simulation time. For more information, see Establish Arrays on a GPU (Parallel Computing Toolbox).

To deinterleave the input vector:

  1. Define and set up your block deinterleaver object. See Construction.

  2. Call step to rearrange the elements of the input vector according to the properties of comm.gpu.BlockDeinterleaver. The behavior of step is specific to each object in the toolbox.

Note

Starting in R2016b, instead of using the step method to perform the operation defined by the System object, you can call the object with arguments, as if it were a function. For example, y = step(obj,x) and y = obj(x) perform equivalent operations.

Construction

H = comm.gpu.BlockDeinterleaver creates a GPU-based block deinterleaver System object, H. This object restores the original ordering of a sequence that was interleaved using the BlockInterleaver System object

H = comm.gpu.BlockDeinterleaver(Name,Value) creates a GPU-based block deinterleaver object, H, with the specified property name set to the specified value.

H = comm.gpu.BlockDeinterleaver(PERMVEC) creates a GPU-based block deinterleaver object, H, with the PermutationVector property set to PERMVEC.

Properties

PermutationVector

Permutation vector

Specify the mapping used to permute the input symbols as a column vector of integers. The default is [5;4;3;2;1]. The mapping is a vector where the number of elements is equal to the length, N, of the input to the step method. Each element must be an integer between 1 and N, with no repeated values.

Methods

stepDeinterleave input sequence
Common to All System Objects
release

Allow System object property value changes

Algorithm

This object uses the same algorithm as the comm.BlockDeinterleaver System object. See Algorithms on the comm.BlockDeinterleaver help page for details.

Examples

expand all

Create interleaver and deinterleaver objects.

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

Pass random data through the interleaver and deinterleaver.

data = randi(7,4,1);
intData = interleaver(data);
deIntData = deinterleaver(intData);

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

[data intData deIntData]
ans =

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

Confirm the original and deinterleaved data are identical.

isequal(data,deIntData)
ans =

     1

Generate a random vector of unique integers as a permutation vector.

permVec = randperm(7)';

Specify permVec as the permutation vector for the 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,7,1);
intData = interleaver(data);
deIntData = deinterleaver(intData);

Confirm the original and deinterleaved data are identical.

isequal(data,deIntData)
ans =

     1

Extended Capabilities

Introduced in R2012a