Convolutionally encode binary data with GPU
The GPU ConvolutionalEncoder
object encodes a sequence
of binary input vectors to produce a sequence of binary output vectors.
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 convolutionally encode a binary signal:
Define and set up your convolutional encoder object. See Construction.
Call step
to encode a sequence of binary input
vectors to produce a sequence of binary output vectors according to the properties of
comm.gpu.ConvolutionalEncoder
. 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.
H = comm.gpu.ConvolutionalEncoder
creates a System object, H
, that convolutionally encodes binary data.
H = comm.gpu.ConvolutionalEncoder(
creates a convolutional encoder object, Name
,Value
)H
, with each specified property
set to the specified value. You can specify additional name-value pair arguments in any order
as
(Name1
,Value1
,...,NameN
,ValueN
).
H = comm.gpu.ConvolutionalEncoder(TRELLIS,
creates a convolutional encoder object, Name
,Value
)H
. This object has the TrellisStructure
property set to TRELLIS
, and the
other specified properties set to the specified values.
|
Trellis structure of convolutional code Specify the trellis as a MATLAB structure that contains the trellis description of
the convolutional code. The default is the result of |
|
Termination method of encoded frame Specify how the encoded frame is terminated as one of When you set this property to When you set this property to When you set this property to |
|
Enable encoder reset input You cannot reset this encoder object using an input port. The only valid property
setting is |
|
Delay output reset You cannot reset this encoder object using an input port. The only valid property
setting is |
|
You cannot set the initial state of this encoder object. The only valid property
setting is |
|
You cannot output the final state of this encoder object. The only valid property
setting is |
|
Source of puncture pattern Specify the source of the puncture pattern as one of |
|
Puncture pattern vector Specify the puncture pattern that the object uses to puncture the encoded data as a
column vector. The default is |
|
Number of independent frames present in the input and output data vectors. Specify the number of independent frames contained in a single data input/output
vector. The default value of this property is |
reset | Reset states of the convolutional encoder object |
step | Convolutionally encode binary data |
Common to All System Objects | |
---|---|
release | Allow System object property value changes |
This object implements the algorithm, inputs, and outputs described on the Convolutional Encoder block reference page. The object properties correspond to the block parameters.
comm.ConvolutionalEncoder
| comm.gpu.ConvolutionalDeinterleaver
| comm.gpu.ConvolutionalInterleaver
| comm.gpu.ViterbiDecoder