├── .cproject
├── .gitignore
├── .project
├── .pydevproject
├── LICENSE
├── Makefile.am
├── bindings
├── Makefile.am
├── __init__.py
├── channels.i
├── codes
│ ├── Makefile.am
│ ├── __init__.py
│ ├── codes.i
│ ├── codes_workaround.i
│ ├── fountain.i
│ ├── ldpc.i
│ ├── null.i
│ ├── spinal
│ │ ├── Makefile.am
│ │ ├── __init__.py
│ │ └── spinal.i
│ ├── strider.i
│ └── turbo.i
├── common.i
├── demappers.i
├── demappers_workaround.i
├── general.i
├── itpp
│ ├── Makefile.am
│ ├── __init__.py
│ ├── base_sparse.i
│ ├── base_vec.i
│ ├── ldpc.i
│ ├── llr.i
│ └── modulator.i
├── mappers.i
├── mappers_workaround.i
├── misc.i
├── numpy.i
├── protocols.i
└── util
│ ├── Makefile.am
│ ├── __init__.py
│ ├── config.i
│ ├── hashes.i
│ └── inference.i
├── build-aux
└── m4
│ ├── m4_ax_check_compile_flag.m4
│ ├── m4_ax_pkg_swig.m4
│ ├── m4_ax_python_devel.m4
│ ├── m4_ax_swig_enable_cxx.m4
│ └── m4_ax_swig_python.m4
├── configure.ac
├── data
├── Makefile.am
└── ldpc
│ ├── LDPC_1024.it
│ ├── LDPC_2048.it
│ ├── LDPC_256.it
│ ├── LDPC_256_rate0.5.it
│ ├── LDPC_256_rate0.74.it
│ ├── LDPC_3072.it
│ ├── LDPC_4096.it
│ └── LDPC_9500.it
├── doc
├── .gitignore
├── Doxyfile
├── doxygen-footer.html
└── modules.h
├── include
├── CodeBench.h
├── ComposedTransformation.h
├── CrcDetector.h
├── CrcPacketGenerator.h
├── Makefile.am
├── OracleDetector.h
├── PacketGenerator.h
├── TransformationAdaptor.h
├── channels
│ ├── AwgnChannel.h
│ ├── AwgnChannel.hh
│ ├── AwgnNoiseGenerator.h
│ ├── BscChannel.h
│ ├── CoherenceCoeffGenerator.h
│ ├── CoherenceFading.h
│ ├── CoherenceFading.hh
│ ├── CompositeChannel.h
│ ├── CompositeChannel.hh
│ ├── MimoChannel.h
│ ├── TransparentCoherenceFading.h
│ └── TransparentCoherenceFading.hh
├── codes
│ ├── DecodeResult.h
│ ├── EncoderMultiplexer.h
│ ├── IDecoder.h
│ ├── IEncoder.h
│ ├── ILLRDecoder.h
│ ├── IMultiStreamDecoder.h
│ ├── IMultiStreamEncoder.h
│ ├── InterleavedDecoder.h
│ ├── InterleavedDecoder.hh
│ ├── InterleavedEncoder.h
│ ├── MultiToSingleStreamDecoder.h
│ ├── MultiToSingleStreamDecoder.hh
│ ├── MultiToSingleStreamEncoder.h
│ ├── RandomPermutationGenerator.h
│ ├── SymbolToLLRDecoderAdaptor.h
│ ├── SymbolToLLRDecoderAdaptor.hh
│ ├── archive
│ │ ├── CachedEncoder.h
│ │ ├── CachedEncoder.hh
│ │ ├── CachedMultiDecoder.h
│ │ ├── CachedMultiDecoder.hh
│ │ ├── IMultiDecoder.h
│ │ ├── IMultiEncoder.h
│ │ ├── LinearCheckNodeUpdater.cpp
│ │ └── LinearCheckNodeUpdater.h
│ ├── fountain
│ │ ├── LTDecoder.h
│ │ ├── LTParityNeighborGenerator.h
│ │ ├── ParityEncoder.h
│ │ ├── RaptorDecoder.h
│ │ └── RaptorEncoder.h
│ ├── ldpc
│ │ ├── LinearCheckNodeUpdater.h
│ │ ├── MatrixLDPCCode.h
│ │ ├── MatrixLDPCDecoder.h
│ │ ├── MatrixLDPCEncoder.h
│ │ ├── MatrixLDPCNeighborGenerator.h
│ │ ├── SparseMatrix.h
│ │ ├── SparseMatrix.hh
│ │ ├── WifiLDPC.h
│ │ ├── WordWidthTransformer.h
│ │ └── WordWidthTransformer.hh
│ ├── null
│ │ ├── NullDecoder.h
│ │ └── NullEncoder.h
│ ├── puncturing
│ │ ├── IPuncturingSchedule.h
│ │ ├── RepeatingPuncturingSchedule.h
│ │ ├── RoundRobinPuncturingSchedule.h
│ │ ├── StaticPuncturingSchedule.h
│ │ └── StridedPuncturingSchedule.h
│ ├── spinal
│ │ ├── CodeFactory.h
│ │ ├── Composites.h
│ │ ├── FlatSymbolStorage.h
│ │ ├── FlatSymbolStorage.hh
│ │ ├── HashDecoder.h
│ │ ├── HashDecoder.hh
│ │ ├── HashEncoder.h
│ │ ├── HashEncoder.hh
│ │ ├── IHashDecoder.h
│ │ ├── SpinalBranchEvaluator.h
│ │ ├── StubHashDecoder.h
│ │ └── protocols
│ │ │ ├── SequentialProtocol.h
│ │ │ ├── SequentialProtocol.hh
│ │ │ └── StridedProtocol.h
│ ├── strider
│ │ ├── LayerManipulator.h
│ │ ├── LayerSuperposition.h
│ │ ├── LayeredDecoder.h
│ │ ├── LayeredDecoder.hh
│ │ ├── LayeredEncoder.h
│ │ ├── StriderFactory.h
│ │ ├── StriderGeneratorMatrix.h
│ │ ├── StriderInterleaver.h
│ │ └── StriderTurboCode.h
│ └── turbo
│ │ ├── TurboCodec.h
│ │ ├── TurboDecoder.h
│ │ └── TurboEncoder.h
├── demappers
│ ├── BitwiseDemapper.h
│ ├── BitwiseDemapper.hh
│ ├── BscDemapper.h
│ ├── IDemapper.h
│ ├── ItppDemapper.h
│ ├── ItppDemapper.hh
│ └── NullDemapper.h
├── mappers
│ ├── ComplexLinearMapper.h
│ ├── GaussianMapper.h
│ ├── GrayMapper.h
│ ├── IMapper.h
│ ├── LinearMapper.h
│ ├── NormalDistribution.h
│ ├── QPSKMapper.h
│ ├── QamMapper.h
│ ├── SoftMapper.h
│ └── TruncatedNormalDistribution.h
├── protocols
│ ├── OneTryProtocol.h
│ └── RateApproxProtocol.h
└── util
│ ├── BitStatCounter.h
│ ├── BlockStatCounter.h
│ ├── ItppUtils.h
│ ├── MTRand.h
│ ├── Utils.h
│ ├── crc.h
│ ├── hashes
│ ├── BitwiseXor.h
│ ├── Lookup3Hash.h
│ ├── OneAtATimeHash.h
│ ├── SWIGHash.h
│ ├── SalsaHash.h
│ ├── ShiftRegisterAdaptorHash.h
│ ├── SingleSymbolFunction.h
│ ├── UnlimitedHash.h
│ ├── UnlimitedHash.hh
│ ├── ecrypt-config.h
│ ├── ecrypt-machine.h
│ ├── ecrypt-portable.h
│ └── salsa20.h
│ └── inference
│ ├── bp
│ ├── BPMessage.h
│ ├── BipartiteBP.h
│ ├── BipartiteGraph.h
│ ├── ElementHeap.h
│ ├── LinearVariableNodeUpdater.h
│ ├── MessagePassingDecoder.h
│ ├── MessagePassingDecoder.hh
│ ├── MultiStack.h
│ ├── MultiVector.h
│ └── NodeUpdater.h
│ └── hmm
│ ├── Backtracker.h
│ ├── BeamSearch.h
│ ├── BestK.h
│ ├── DualPool.h
│ ├── IPruner.h
│ ├── LookaheadAdaptor.h
│ ├── LookaheadBeamSearch.h
│ └── ParallelBestK.h
├── lablog
├── .project
├── .pydevproject
├── Makefile.am
├── configure.ac
├── python
│ ├── Distribute.py
│ ├── ExperimentRepository.py
│ ├── Results.py
│ ├── SqliteExperimentRepository.py
│ └── __init__.py
└── test
│ ├── DistributeTests.py
│ ├── ExperimentRepositoryTests.py
│ └── ResultsTests.py
├── python
├── Makefile.am
├── codes
│ ├── __init__.py
│ └── spinal
│ │ ├── __init__.py
│ │ └── reference
│ │ ├── Decoder.py
│ │ ├── Encoder.py
│ │ ├── Example1.py
│ │ ├── Hash.py
│ │ ├── Lookup3Hash.py
│ │ ├── RNG.py
│ │ ├── SalsaHash.py
│ │ ├── SymbolMapper.py
│ │ └── __init__.py
├── protocols
│ ├── MultipleTryProtocol.py
│ └── __init__.py
├── simulator
│ ├── FactoryCollection.py
│ ├── SanityTest.py
│ ├── Simulator.py
│ ├── __init__.py
│ ├── default_configuration.py
│ └── factories
│ │ ├── ChannelFactory.py
│ │ ├── DemapFactory.py
│ │ ├── DetectorFactory.py
│ │ ├── MapFactory.py
│ │ ├── PacketGenFactory.py
│ │ ├── ProtocolFactory.py
│ │ ├── StatisticsFactory.py
│ │ ├── __init__.py
│ │ └── codes
│ │ ├── FadingStriderFactory.py
│ │ ├── LTFactory.py
│ │ ├── LdpcFactory.py
│ │ ├── MultiplexedFactory.py
│ │ ├── NullFactory.py
│ │ ├── RaptorFactory.py
│ │ ├── SpinalFactory.py
│ │ ├── StriderFactory.py
│ │ ├── TurboFactory.py
│ │ └── __init__.py
├── statistics
│ ├── ErrorLocationStatistics.py
│ ├── ErrorRateStatistics.py
│ ├── FirstErrorStatistics.py
│ └── __init__.py
└── util
│ └── serialization
│ ├── __init__.py
│ └── results.proto
├── src
├── CrcPacketGenerator.cpp
├── Makefile.am
├── PacketGenerator.cpp
├── channels
│ ├── BscChannel.cpp
│ ├── CoherenceCoeffGenerator.cpp
│ └── MimoChannel.cpp
├── codes
│ ├── EncoderMultiplexer.cpp
│ ├── InterleavedEncoder.cpp
│ ├── MultiToSingleStreamEncoder.cpp
│ ├── RandomPermutationGenerator.cpp
│ ├── fountain
│ │ ├── LTDecoder.cpp
│ │ ├── LTParityNeighborGenerator.cpp
│ │ ├── RaptorDecoder.cpp
│ │ └── RaptorEncoder.cpp
│ ├── ldpc
│ │ ├── LinearCheckNodeUpdater.cpp
│ │ ├── MatrixLDPCCode.cpp
│ │ ├── MatrixLDPCDecoder.cpp
│ │ ├── MatrixLDPCEncoder.cpp
│ │ ├── MatrixLDPCNeighborGenerator.cpp
│ │ └── WifiLDPC.cpp
│ ├── null
│ │ ├── NullDecoder.cpp
│ │ └── NullEncoder.cpp
│ ├── puncturing
│ │ ├── RepeatingPuncturingSchedule.cpp
│ │ ├── RoundRobinPuncturingSchedule.cpp
│ │ ├── StaticPuncturingSchedule.cpp
│ │ └── StridedPuncturingSchedule.cpp
│ ├── spinal
│ │ ├── CodeFactory.cpp
│ │ ├── SpinalBranchEvaluator.cpp
│ │ ├── StubHashDecoder.cpp
│ │ └── protocols
│ │ │ └── StridedProtocol.cpp
│ ├── strider
│ │ ├── LayerManipulator.cpp
│ │ ├── LayerSuperposition.cpp
│ │ ├── LayeredEncoder.cpp
│ │ ├── StriderFactory.cpp
│ │ ├── StriderGeneratorMatrix.cpp
│ │ ├── StriderInterleaver.cpp
│ │ └── StriderTurboCode.cpp
│ └── turbo
│ │ ├── TurboCodec.cpp
│ │ ├── TurboDecoder.cpp
│ │ └── TurboEncoder.cpp
├── demappers
│ ├── BscDemapper.cpp
│ └── NullDemapper.cpp
├── mappers
│ ├── ComplexLinearMapper.cpp
│ ├── GaussianMapper.cpp
│ ├── GrayMapper.cpp
│ ├── LinearMapper.cpp
│ ├── NormalDistribution.cpp
│ ├── QPSKMapper.cpp
│ ├── QamMapper.cpp
│ ├── SoftMapper.cpp
│ └── TruncatedNormalDistribution.cpp
├── protocols
│ ├── OneTryProtocol.cpp
│ └── RateApproxProtocol.cpp
└── util
│ ├── BitStatCounter.cpp
│ ├── BlockStatCounter.cpp
│ ├── ItppUtils.cpp
│ ├── Utils.cpp
│ ├── crc.cpp
│ ├── hashes
│ ├── BitwiseXor.cpp
│ ├── Lookup3Hash.cpp
│ ├── OneAtATimeHash.cpp
│ ├── SalsaHash.cpp
│ └── salsa20.cpp
│ └── inference
│ └── bp
│ ├── BipartiteBP.cpp
│ └── LinearVariableNodeUpdater.cpp
├── test
├── UtilsTests.py
├── codes
│ ├── InterleavedEncoderTests.py
│ ├── fountain
│ │ └── ParityEncoderTests.py
│ ├── ldpc
│ │ ├── MatrixLDPCDecodingTests.py
│ │ ├── MatrixLDPCNeighborGeneratorTests.py
│ │ └── WordWidthTransformerTests.py
│ ├── spinal
│ │ ├── CachedHashEncoderTests.py
│ │ ├── EncoderDecoderTests.py
│ │ ├── PuncturedEncoderTests.py
│ │ ├── PuncturingScheduleTests.py
│ │ ├── RepeatingPuncturingScheduleTests.py
│ │ ├── StridedProtocolTests.py
│ │ └── StridedPuncturingScheduleTests.py
│ ├── strider
│ │ ├── LayerSuperpositionTests.py
│ │ ├── StriderEncoderTests.py
│ │ ├── StriderTurboTests.py
│ │ ├── strider-message.dat
│ │ ├── strider_packets_doubles_imag.dat
│ │ ├── strider_packets_doubles_real.dat
│ │ ├── turbo-interleaved-1530.dat
│ │ └── turbo-message-1530.dat
│ └── turbo
│ │ ├── TurboCodecTests.py
│ │ ├── test-codeword-1530.dat
│ │ └── test-message-1530.dat
└── demappers
│ └── BitwiseDemapperTests.py
└── util
├── GenerateCrcCode.py
├── GenerateRaptorLDPC.py
├── MatrixLDPC.py
└── TurboPuncturing.py
/.gitignore:
--------------------------------------------------------------------------------
1 | aclocal.m4
2 | config.h.in
3 | configure
4 | Makefile.in
5 | MANIFEST.in
6 | autom4te.cache
7 | build-aux
8 | install-sh
9 | missing
10 | py-compile
11 | release/
12 |
--------------------------------------------------------------------------------
/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | wireless
4 |
5 |
6 |
7 |
8 |
9 | org.python.pydev.PyDevBuilder
10 |
11 |
12 |
13 |
14 | org.eclipse.ui.externaltools.ExternalToolBuilder
15 | full,incremental,
16 |
17 |
18 | LaunchConfigHandle
19 | <project>/.externalToolBuilders/org.eclipse.cdt.managedbuilder.core.genmakebuilder (1).launch
20 |
21 |
22 |
23 |
24 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder
25 | full,incremental,
26 |
27 |
28 |
29 |
30 |
31 | org.eclipse.cdt.core.cnature
32 | org.eclipse.cdt.core.ccnature
33 | org.eclipse.cdt.managedbuilder.core.managedBuildNature
34 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature
35 | org.python.pydev.pythonNature
36 |
37 |
38 |
--------------------------------------------------------------------------------
/.pydevproject:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Default
6 | python 2.7
7 |
8 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | With some exceptions, the contents are licensed under the following license (the MIT license):
2 |
3 | Copyright (c) 2012 Jonathan Perry
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6 |
7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
10 |
11 |
12 | Notable exceptions:
13 | ====================
14 | include/util/MTRand.h
15 | based on a "BSD New"-licensed file by Makoto Matsumoto, Takuji Nishimura, and Richard J. Wagner.
16 | see the source code for more information.
17 |
18 | src/util/crc.cpp
19 | based on a CRC implementation generated by the MIT-licensed crcmod
20 |
21 | src/util/salsa20.cpp
22 | Based on D.J.Bernstein's salsa in the public domain; modifications also in the public domain.
23 | include/util/ecrypt-config.h
24 | include/util/ecrypt-machine.h
25 | include/util/ecrypt-portable.h
26 | From eSTREAM software performance testing platform, used for Salsa implementation
27 |
--------------------------------------------------------------------------------
/Makefile.am:
--------------------------------------------------------------------------------
1 | SUBDIRS = python src bindings data lablog include
2 |
3 | ACLOCAL_AMFLAGS = -I build-aux/m4
4 |
5 | EXTRA_DIST = LICENSE
6 |
--------------------------------------------------------------------------------
/bindings/__init__.py:
--------------------------------------------------------------------------------
1 | import util
2 |
3 | import general
4 | import channels
5 | import mappers
6 | import demappers
7 | import codes
8 | import codes.strider
9 | import codes.turbo
10 | import codes.ldpc
11 | import codes.fountain
12 | import codes.spinal
13 | import codes.null
14 |
15 | import misc
16 | import statistics
17 | import protocols
18 |
19 | from general import *
20 | from misc import *
21 |
22 |
--------------------------------------------------------------------------------
/bindings/codes/Makefile.am:
--------------------------------------------------------------------------------
1 | # bindings/codes Makefile
2 |
3 | SUBDIRS = spinal
4 |
5 | ## Flags and commands
6 | # use python flags; add project-wide include directory; only shared libraries are required.
7 | AM_CPPFLAGS += $(AX_SWIG_PYTHON_CPPFLAGS) -I$(top_srcdir)/include
8 | AM_CXXFLAGS += -shared
9 | AM_LDFLAGS += $(PYTHON_EXTRA_LDFLAGS) -module
10 | SWIG_CMD = $(SWIG) $(AX_SWIG_PYTHON_OPT) $(AX_SWIG_PYTHON_CPPFLAGS) $(AM_CPPFLAGS) -I$(srcdir) -I$(srcdir)/.. -DHAVE_CONFIG_H
11 |
12 | # Libraries made in this directory
13 | codes_execdir = ${pkgpyexecdir}/codes
14 | codes_pythondir = ${pkgpythondir}/codes
15 |
16 | codes_exec_LTLIBRARIES = _codes.la _fountain.la _strider.la _turbo.la _ldpc.la _null.la
17 |
18 | codes_python_PYTHON = __init__.py
19 |
20 | codes_python_PYTHON += codes.py
21 | _codes_la_SOURCES = codes.i
22 | _codes_la_LIBADD = -L../../src -lwireless
23 |
24 | codes_python_PYTHON += fountain.py
25 | _fountain_la_SOURCES = fountain.i
26 | _fountain_la_LIBADD = -L../../src -lwireless
27 |
28 | codes_python_PYTHON += strider.py
29 | _strider_la_SOURCES = strider.i
30 | _strider_la_LIBADD = -L../../src -lwireless
31 |
32 | codes_python_PYTHON += turbo.py
33 | _turbo_la_SOURCES = turbo.i
34 | _turbo_la_LIBADD = -L../../src -lwireless
35 |
36 | codes_python_PYTHON += ldpc.py
37 | _ldpc_la_SOURCES = ldpc.i
38 | _ldpc_la_LIBADD = -L../../src -lwireless
39 |
40 | codes_python_PYTHON += null.py
41 | _null_la_SOURCES = null.i
42 | _null_la_LIBADD = -L../../src -lwireless
43 |
44 | .i.cpp:
45 | $(SWIG_CMD) -o $@ $<
46 |
--------------------------------------------------------------------------------
/bindings/codes/__init__.py:
--------------------------------------------------------------------------------
1 | from codes import *
2 |
--------------------------------------------------------------------------------
/bindings/codes/codes_workaround.i:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2012 Jonathan Perry
3 | * This code is released under the MIT license (see LICENSE file).
4 | */
5 |
6 | %{
7 | #include "codes/SymbolToLLRDecoderAdaptor.h"
8 | #include "codes/InterleavedEncoder.h"
9 | #include "codes/EncoderMultiplexer.h"
10 | #include "codes/puncturing/IPuncturingSchedule.h"
11 | #include "codes/puncturing/StridedPuncturingSchedule.h"
12 | #include "codes/puncturing/StaticPuncturingSchedule.h"
13 | #include "codes/puncturing/RepeatingPuncturingSchedule.h"
14 | #include "codes/puncturing/RoundRobinPuncturingSchedule.h"
15 | #include "codes/MultiToSingleStreamEncoder.h"
16 | #include "codes/MultiToSingleStreamDecoder.h"
17 |
18 | // demappers:
19 | #include
20 | using namespace itpp;
21 | #include "demappers/ItppDemapper.h"
22 |
23 | // mappers:
24 | #include "mappers/QPSKMapper.h"
25 | #include "mappers/QamMapper.h"
26 |
27 | %}
28 |
--------------------------------------------------------------------------------
/bindings/codes/fountain.i:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2012 Jonathan Perry
3 | * This code is released under the MIT license (see LICENSE file).
4 | */
5 | %module(package="wireless.codes") fountain
6 |
7 | %include "common.i"
8 | %include "codes/codes_workaround.i"
9 | %import "codes/codes.i"
10 |
11 | // Fix import problem in hashes
12 | %include "carrays.i"
13 | %array_class(unsigned int, uint32_Array)
14 | %import "util/hashes.i"
15 |
16 |
17 | %shared_ptr(LTDecoder)
18 | %shared_ptr(RaptorDecoder)
19 |
20 | %{
21 | #include "util/hashes/BitwiseXor.h"
22 |
23 | #include "codes/fountain/LTParityNeighborGenerator.h"
24 | #include "codes/fountain/ParityEncoder.h"
25 | #include "codes/fountain/LTDecoder.h"
26 | #include "codes/fountain/RaptorEncoder.h"
27 | #include "codes/fountain/RaptorDecoder.h"
28 |
29 | %}
30 |
31 | %include "codes/fountain/LTParityNeighborGenerator.h"
32 | %include "codes/fountain/ParityEncoder.h"
33 | %include "codes/fountain/LTDecoder.h"
34 | %include "codes/fountain/RaptorEncoder.h"
35 | %include "codes/fountain/RaptorDecoder.h"
36 |
37 | %template(LTEncoder) ParityEncoder;
38 |
--------------------------------------------------------------------------------
/bindings/codes/ldpc.i:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2012 Jonathan Perry
3 | * This code is released under the MIT license (see LICENSE file).
4 | */
5 | %module(package="wireless.codes") ldpc
6 |
7 | %include "common.i"
8 | %include "codes/codes_workaround.i"
9 | %import "codes/codes.i"
10 |
11 | /////////////////
12 | // Smart pointers
13 | /////////////////
14 | %shared_ptr(MatrixLDPCEncoder)
15 |
16 |
17 | %{
18 | #include "codes/ldpc/WordWidthTransformer.h"
19 | #include "codes/ldpc/SparseMatrix.h"
20 | #include "codes/ldpc/MatrixLDPCCode.h"
21 | #include "codes/ldpc/MatrixLDPCEncoder.h"
22 | #include "codes/ldpc/MatrixLDPCDecoder.h"
23 | #include "codes/ldpc/WifiLDPC.h"
24 | %}
25 |
26 | %include "codes/ldpc/WordWidthTransformer.h"
27 | %include "codes/ldpc/SparseMatrix.h"
28 | %include "codes/ldpc/MatrixLDPCCode.h"
29 | %include "codes/ldpc/MatrixLDPCEncoder.h"
30 | %include "codes/ldpc/MatrixLDPCDecoder.h"
31 | %include "codes/ldpc/WifiLDPC.h"
32 |
33 | %template(UcharSparseMatrix) SparseMatrix;
34 |
--------------------------------------------------------------------------------
/bindings/codes/null.i:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2012 Jonathan Perry
3 | * This code is released under the MIT license (see LICENSE file).
4 | */
5 | %module(package="wireless.codes") null
6 |
7 | %include "common.i"
8 | %include "codes/codes_workaround.i"
9 | %import "codes/codes.i"
10 |
11 | // Fix import problem in hashes
12 | %include "carrays.i"
13 | %array_class(unsigned int, uint32_Array)
14 | %import "util/hashes.i"
15 |
16 |
17 | %shared_ptr(NullEncoder)
18 | %shared_ptr(NullDecoder)
19 |
20 | %{
21 | #include "codes/null/NullEncoder.h"
22 | #include "codes/null/NullDecoder.h"
23 | %}
24 |
25 | %include "codes/null/NullEncoder.h"
26 | %include "codes/null/NullDecoder.h"
27 |
--------------------------------------------------------------------------------
/bindings/codes/spinal/Makefile.am:
--------------------------------------------------------------------------------
1 | # bindings/codes/spinal Makefile
2 |
3 | ## Flags and commands
4 | # use python flags; add project-wide include directory; only shared libraries are required.
5 | AM_CPPFLAGS += $(AX_SWIG_PYTHON_CPPFLAGS) -I$(top_srcdir)/include
6 | AM_CXXFLAGS += -shared
7 | AM_LDFLAGS += $(PYTHON_EXTRA_LDFLAGS) -module
8 | SWIG_CMD = $(SWIG) $(AX_SWIG_PYTHON_OPT) $(AX_SWIG_PYTHON_CPPFLAGS) $(AM_CPPFLAGS) -I$(srcdir) -I$(srcdir)/../.. -DHAVE_CONFIG_H
9 |
10 | # Libraries made in this directory
11 | spinal_execdir = ${pkgpyexecdir}/codes/spinal
12 | spinal_pythondir = ${pkgpythondir}/codes/spinal
13 |
14 | spinal_exec_LTLIBRARIES = _spinal.la
15 |
16 | spinal_python_PYTHON = __init__.py
17 |
18 | spinal_python_PYTHON += spinal.py
19 | _spinal_la_SOURCES = spinal.i
20 | _spinal_la_LIBADD = -L../../../src -lspinal
21 |
22 | .i.cpp:
23 | $(SWIG_CMD) -o $@ $<
24 |
--------------------------------------------------------------------------------
/bindings/codes/spinal/__init__.py:
--------------------------------------------------------------------------------
1 | from spinal import *
2 | import reference
3 |
--------------------------------------------------------------------------------
/bindings/codes/strider.i:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2012 Jonathan Perry
3 | * This code is released under the MIT license (see LICENSE file).
4 | */
5 | %module(package="wireless.codes") strider
6 |
7 | %include "common.i"
8 | %include "codes/codes_workaround.i"
9 | %import "codes/codes.i"
10 | %include "mappers_workaround.i"
11 | %import "mappers.i"
12 |
13 | /////////////////
14 | // numpy
15 | ////////////////
16 |
17 | %numpy_typemaps(std::complex, NPY_CDOUBLE , int);
18 | %apply (std::complex* IN_ARRAY2, int DIM1, int DIM2) {(std::complex* matrixG,
19 | int rowsG,
20 | int colsG)}
21 | %apply (std::complex* INPLACE_ARRAY2, int DIM1, int DIM2) {(std::complex* outMatrixG,
22 | int rowsG,
23 | int colsG)}
24 |
25 | /////////////////
26 | // Smart pointers
27 | /////////////////
28 | %shared_ptr(LayeredEncoder)
29 | %shared_ptr(LayeredDecoder)
30 |
31 |
32 | %{
33 | #include "codes/strider/LayeredEncoder.h"
34 | #include "codes/strider/LayerSuperposition.h"
35 | #include "codes/strider/StriderTurboCode.h"
36 | #include "codes/strider/LayeredDecoder.h"
37 | #include "codes/strider/StriderGeneratorMatrix.h"
38 | #include "codes/strider/StriderFactory.h"
39 | %}
40 |
41 | %include "codes/strider/LayeredEncoder.h"
42 | %include "codes/strider/LayerSuperposition.h"
43 | %include "codes/strider/StriderTurboCode.h"
44 | %include "codes/strider/LayeredDecoder.h"
45 | %include "codes/strider/StriderGeneratorMatrix.h"
46 | %include "codes/strider/StriderFactory.h"
47 |
48 |
49 | %template(ComplexLayeredDecoder) LayeredDecoder;
50 |
--------------------------------------------------------------------------------
/bindings/codes/turbo.i:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2012 Jonathan Perry
3 | * This code is released under the MIT license (see LICENSE file).
4 | */
5 | %module(package="wireless.codes") turbo
6 |
7 | %include "common.i"
8 | %include "codes/codes_workaround.i"
9 | %import "codes/codes.i"
10 |
11 | %shared_ptr(TurboEncoder)
12 | %shared_ptr(TurboDecoder)
13 | %shared_ptr(InterleavedDecoder)
14 |
15 | %{
16 | #include "codes/turbo/TurboEncoder.h"
17 | #include "codes/turbo/TurboDecoder.h"
18 | #include "codes/InterleavedDecoder.h"
19 | %}
20 |
21 | %include "codes/turbo/TurboEncoder.h"
22 | %include "codes/turbo/TurboDecoder.h"
23 | %include "codes/InterleavedDecoder.h"
24 |
25 | %template(InterleavedTurboDecoder) InterleavedDecoder;
--------------------------------------------------------------------------------
/bindings/common.i:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2012 Jonathan Perry
3 | * This code is released under the MIT license (see LICENSE file).
4 | */
5 |
6 | ///////////////////////
7 | // Exception handling
8 | ///////////////////////
9 | %include exception.i
10 |
11 | %{
12 | #include
13 | %}
14 |
15 | %exception {
16 | try {
17 | $function
18 | } catch(const std::exception& err) {
19 | SWIG_exception(SWIG_RuntimeError, err.what());
20 | } catch(...) {
21 | SWIG_exception(SWIG_RuntimeError, "Unknown exception");
22 | }
23 | }
24 |
25 | /////////////////
26 | // numpy
27 | ////////////////
28 | %{
29 | // numpy initialization
30 | #define SWIG_FILE_WITH_INIT
31 | %}
32 | %include "numpy.i"
33 |
34 | %init %{
35 | import_array();
36 | %}
37 |
38 | /////////////////
39 | // Smart pointers
40 | /////////////////
41 | #define SWIG_SHARED_PTR_SUBNAMESPACE tr1
42 | %include
43 | %{
44 | #include
45 | %}
46 |
47 |
--------------------------------------------------------------------------------
/bindings/demappers.i:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2012 Jonathan Perry
3 | * This code is released under the MIT license (see LICENSE file).
4 | */
5 | %module(package="wireless") demappers
6 |
7 | %include "common.i"
8 | %import "general.i"
9 | %import "mappers.i"
10 | %include "mappers_workaround.i"
11 | %import "itpp/modulator.i"
12 |
13 | /////////////////
14 | // numpy
15 | ////////////////
16 |
17 | %apply (unsigned int* INPLACE_ARRAY1, int DIM1) {(unsigned int* const seed,
18 | int seedSize)}
19 |
20 |
21 | %{
22 | #include "demappers/IDemapper.h"
23 | #include "demappers/BitwiseDemapper.h"
24 | #include "demappers/BscDemapper.h"
25 | #include "demappers/NullDemapper.h"
26 | #include "demappers/ItppDemapper.h"
27 |
28 | // For GrayDemapper typedef
29 | #include "mappers/GrayMapper.h"
30 |
31 | // Workaround for %import problem
32 | using namespace itpp;
33 | %}
34 |
35 | %include "demappers/IDemapper.h"
36 | %include "demappers/BitwiseDemapper.h"
37 | %include "demappers/BscDemapper.h"
38 | %include "demappers/NullDemapper.h"
39 | %include "demappers/ItppDemapper.h"
40 |
41 | %shared_ptr(IDemapper)
42 | %template(template_IDemapper_Symbol) IDemapper;
43 |
44 | %shared_ptr(IDemapper)
45 | %template(template_IDemapper_ComplexSymbol) IDemapper;
46 | %template(GrayDemapper) BitwiseDemapper;
47 |
48 | %shared_ptr(ItppDemapper)
49 | %template(ItppComplexDemapper) ItppDemapper;
50 |
--------------------------------------------------------------------------------
/bindings/demappers_workaround.i:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2012 Jonathan Perry
3 | * This code is released under the MIT license (see LICENSE file).
4 | */
5 |
6 | %include "mappers_workaround.i"
7 |
8 | %{
9 | #include
10 | #include "demappers/ItppDemapper.h"
11 | %}
--------------------------------------------------------------------------------
/bindings/general.i:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2012 Jonathan Perry
3 | * This code is released under the MIT license (see LICENSE file).
4 | */
5 | %module(package="wireless") general
6 |
7 | %include "common.i"
8 |
9 | //////////////////
10 | // STL
11 | //////////////////
12 | %include "std_string.i"
13 | %include "std_vector.i"
14 | %include "std_complex.i"
15 | %include "stdint.i"
16 |
17 | %{
18 | #include
19 | #include
20 | #include
21 | #include "CodeBench.h"
22 | #include "util/MTRand.h"
23 | %}
24 |
25 | %include "CodeBench.h"
26 | %include "util/MTRand.h"
27 |
28 | %pythoncode %{
29 | Symbol = int
30 | SoftSymbol = float
31 | N0_t = float
32 | FadingMagnitude = float
33 | LLRValue = float
34 | ComplexSymbol = complex
35 | %}
36 |
37 |
38 | %template(FadingSymbol) FadingSymbolTuple;
39 | %template(FadingComplexSymbol) FadingSymbolTuple;
40 |
41 |
42 | // VECTOR TYPES
43 | namespace std {
44 | %template(vectori) vector;
45 | %template(vectorcf) vector< std::complex >;
46 | %template(vectorcd) vector< std::complex >;
47 | %template(vectorui) vector;
48 | %template(vectorus) vector;
49 | %template(vectors) vector;
50 | %template(vectorul) vector;
51 | %template(vectorull) vector;
52 | %template(vectorb) vector;
53 | %template(vectorf) vector;
54 | %template(vectorstr) vector;
55 |
56 | %template(vector_fadingsymbol) vector;
57 | %template(vector_fading_csymbol) vector;
58 | };
59 |
60 |
61 | %pythoncode %{
62 | vector_csymbol = vectorcd
63 | vector_symbol = vectori
64 | vector_softsymbol = vectorf
65 | vector_llr = vectorf
66 | %}
--------------------------------------------------------------------------------
/bindings/itpp/Makefile.am:
--------------------------------------------------------------------------------
1 | # bindings/itpp Makefile
2 |
3 | ## Flags and commands
4 | # use python flags; add project-wide include directory; only shared libraries are required.
5 | AM_CPPFLAGS += $(AX_SWIG_PYTHON_CPPFLAGS) -I$(top_srcdir)/include
6 | AM_CXXFLAGS += -shared
7 | AM_LDFLAGS += $(PYTHON_EXTRA_LDFLAGS) -module
8 | SWIG_CMD = $(SWIG) $(AX_SWIG_PYTHON_OPT) $(AM_CPPFLAGS) -I$(srcdir) -I$(srcdir)/.. -DHAVE_CONFIG_H
9 |
10 | # Directories
11 | itpp_execdir = ${pkgpyexecdir}/itpp
12 | itpp_pythondir = ${pkgpythondir}/itpp
13 |
14 | # Libraries made in this directory
15 | itpp_exec_LTLIBRARIES = _base_sparse.la _base_vec.la _ldpc.la _llr.la _modulator.la
16 | itpp_python_PYTHON = __init__.py
17 |
18 | itpp_python_PYTHON += base_sparse.py
19 | _base_sparse_la_SOURCES = base_sparse.i
20 | _base_sparse_la_LIBADD = $(ITPP_LIBS)
21 |
22 | itpp_python_PYTHON += base_vec.py
23 | _base_vec_la_SOURCES = base_vec.i
24 | _base_vec_la_LIBADD = $(ITPP_LIBS)
25 |
26 | itpp_python_PYTHON += ldpc.py
27 | _ldpc_la_SOURCES = ldpc.i
28 | _ldpc_la_LIBADD = $(ITPP_LIBS)
29 |
30 | itpp_python_PYTHON += llr.py
31 | _llr_la_SOURCES = llr.i
32 | _llr_la_LIBADD = $(ITPP_LIBS)
33 |
34 | itpp_python_PYTHON += modulator.py
35 | _modulator_la_SOURCES = modulator.i
36 | _modulator_la_LIBADD = $(ITPP_LIBS)
37 |
38 | .i.cpp:
39 | $(SWIG_CMD) -o $@ $<
40 |
--------------------------------------------------------------------------------
/bindings/itpp/__init__.py:
--------------------------------------------------------------------------------
1 | from base_vec import *
2 | from base_sparse import *
3 | from modulator import *
4 | from ldpc import *
5 | from llr import *
--------------------------------------------------------------------------------
/bindings/itpp/ldpc.i:
--------------------------------------------------------------------------------
1 | %module(package="wireless.itpp") ldpc
2 |
3 | ///////////////////////
4 | // Exception handling
5 | ///////////////////////
6 | %include exception.i
7 |
8 | %exception {
9 | try {
10 | $action
11 | }
12 | SWIG_CATCH_STDEXCEPT
13 | catch (...) {
14 | SWIG_exception(SWIG_UnknownError, "Unknown exception");
15 | }
16 | }
17 |
18 | /////////////////
19 | // Smart pointers
20 | /////////////////
21 | #define SWIG_SHARED_PTR_SUBNAMESPACE tr1
22 | %include
23 | %{
24 | #include
25 | %}
26 |
27 |
28 | //////////////////
29 | // General code-related
30 | //////////////////
31 | %{
32 | #include
33 | #include
34 | using namespace itpp;
35 | %}
36 |
37 | %import "base_vec.i"
38 | %import "base_sparse.i"
39 |
40 | %include
41 |
42 |
43 | %ignore operator<<(std::ostream &os, const LDPC_Code &C);
44 |
45 | %include
46 |
--------------------------------------------------------------------------------
/bindings/itpp/llr.i:
--------------------------------------------------------------------------------
1 | %module(package="wireless.itpp") llr
2 |
3 | ///////////////////////
4 | // Exception handling
5 | ///////////////////////
6 | %include exception.i
7 |
8 | %exception {
9 | try {
10 | $action
11 | }
12 | SWIG_CATCH_STDEXCEPT
13 | catch (...) {
14 | SWIG_exception(SWIG_UnknownError, "Unknown exception");
15 | }
16 | }
17 |
18 | /////////////////
19 | // Smart pointers
20 | /////////////////
21 | #define SWIG_SHARED_PTR_SUBNAMESPACE tr1
22 | %include
23 | %{
24 | #include
25 | %}
26 |
27 |
28 | //////////////////
29 | // General code-related
30 | //////////////////
31 | %{
32 | #include
33 | using namespace itpp;
34 | %}
35 |
36 |
37 | %ignore operator<<(std::ostream &os, const LLR_calc_unit &l);
38 | %include
39 |
40 |
41 |
--------------------------------------------------------------------------------
/bindings/mappers.i:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2012 Jonathan Perry
3 | * This code is released under the MIT license (see LICENSE file).
4 | */
5 | %module(package="wireless") mappers
6 |
7 | %include "common.i"
8 | %import "general.i"
9 |
10 | /////////////////
11 | // numpy
12 | ////////////////
13 |
14 | /////////////////
15 | // Smart pointers
16 | /////////////////
17 | %shared_ptr(IMapper)
18 | %shared_ptr(QPSKMapper)
19 | %shared_ptr(QamMapper)
20 | %shared_ptr(LinearMapper)
21 |
22 |
23 | %{
24 | #include "mappers/IMapper.h"
25 | #include "mappers/LinearMapper.h"
26 | #include "mappers/GrayMapper.h"
27 | #include "mappers/GaussianMapper.h"
28 | #include "mappers/NormalDistribution.h"
29 | #include "mappers/TruncatedNormalDistribution.h"
30 | #include "mappers/QPSKMapper.h"
31 | #include "mappers/SoftMapper.h"
32 | #include "mappers/ComplexLinearMapper.h"
33 | #include "mappers/QamMapper.h"
34 | %}
35 |
36 | %include "mappers/IMapper.h"
37 | %template(IComplexMapper) IMapper;
38 |
39 | %include "mappers/LinearMapper.h"
40 | %include "mappers/GrayMapper.h"
41 | %include "mappers/GaussianMapper.h"
42 | %include "mappers/TruncatedNormalDistribution.h"
43 | %include "mappers/NormalDistribution.h"
44 | %include "mappers/QPSKMapper.h"
45 | %include "mappers/SoftMapper.h"
46 | %include "mappers/ComplexLinearMapper.h"
47 | %include "mappers/QamMapper.h"
48 |
49 |
--------------------------------------------------------------------------------
/bindings/mappers_workaround.i:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2012 Jonathan Perry
3 | * This code is released under the MIT license (see LICENSE file).
4 | */
5 |
6 | %{
7 | #include "mappers/QPSKMapper.h"
8 | #include "mappers/QamMapper.h"
9 | %}
10 |
11 |
--------------------------------------------------------------------------------
/bindings/misc.i:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2012 Jonathan Perry
3 | * This code is released under the MIT license (see LICENSE file).
4 | */
5 | %module(package="wireless") misc
6 |
7 | %include "common.i"
8 | %import "general.i"
9 | %include "codes/codes_workaround.i"
10 | %import "codes/codes.i"
11 |
12 | /////////////////
13 | // numpy
14 | ////////////////
15 |
16 | %apply (unsigned int* INPLACE_ARRAY1, int DIM1) {(unsigned int* const seed,
17 | int seedSize)}
18 |
19 |
20 | %{
21 | #include "PacketGenerator.h"
22 | #include "CrcPacketGenerator.h"
23 |
24 | #include "OracleDetector.h"
25 | #include "CrcDetector.h"
26 | #include "ComposedTransformation.h"
27 |
28 | // For DefaultOracleDetector
29 | #include "codes/IDecoder.h"
30 | %}
31 |
32 | %include "PacketGenerator.h"
33 | %include "CrcPacketGenerator.h"
34 |
35 | %include "OracleDetector.h"
36 | %include "CrcDetector.h"
37 | %include "ComposedTransformation.h"
38 |
39 | %template(DefaultOracleDetector) OracleDetector;
40 | %template(DefaultCrcDetector) CrcDetector;
41 |
42 |
43 | // Utils class
44 | %{
45 | #include "util/Utils.h"
46 | %}
47 | %include "util/Utils.h"
48 | %template(BlockifyUint32) Utils::blockify;
49 |
50 | // Extra utils:
51 | %{
52 | #include "util/BitStatCounter.h"
53 | #include "util/BlockStatCounter.h"
54 | %}
55 | %include "util/BitStatCounter.h"
56 | %include "util/BlockStatCounter.h"
57 |
--------------------------------------------------------------------------------
/bindings/protocols.i:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2012 Jonathan Perry
3 | * This code is released under the MIT license (see LICENSE file).
4 | */
5 | %module(package="wireless.protocols") protocols
6 |
7 | %include "common.i"
8 | %import "general.i"
9 | %include "codes/codes_workaround.i"
10 | %import "codes/codes.i"
11 |
12 | /////////////////
13 | // numpy
14 | ////////////////
15 |
16 | %apply (unsigned int* INPLACE_ARRAY1, int DIM1) {(unsigned int* const seed,
17 | int seedSize)}
18 |
19 | //////////////////
20 | // General code-related
21 | //////////////////
22 | %{
23 | #include "protocols/RateApproxProtocol.h"
24 | #include "protocols/OneTryProtocol.h"
25 | %}
26 |
27 | %include "protocols/RateApproxProtocol.h"
28 | %include "protocols/OneTryProtocol.h"
29 |
--------------------------------------------------------------------------------
/bindings/util/Makefile.am:
--------------------------------------------------------------------------------
1 | # bindings/util Makefile
2 |
3 | ## Flags and commands
4 | # use python flags; add project-wide include directory; only shared libraries are required.
5 | AM_CPPFLAGS += $(AX_SWIG_PYTHON_CPPFLAGS) -I$(top_srcdir)/include
6 | AM_CXXFLAGS += -shared -DDATA_PATH='"$(datadir)"'
7 | AM_LDFLAGS += $(PYTHON_EXTRA_LDFLAGS) -module
8 | SWIG_CMD = $(SWIG) $(AX_SWIG_PYTHON_OPT) $(AM_CPPFLAGS) -I$(srcdir) -I$(srcdir)/.. -I${top_builddir} -DHAVE_CONFIG_H
9 |
10 | # Directories
11 | util_execdir = ${pkgpyexecdir}/util
12 | util_pythondir = ${pkgpythondir}/util
13 |
14 | # Libraries made in this directory
15 | util_exec_LTLIBRARIES = _hashes.la _inference.la _config.la
16 | util_python_PYTHON = __init__.py
17 |
18 | util_python_PYTHON += hashes.py
19 | _hashes_la_SOURCES = hashes.i
20 | _hashes_la_LIBADD = -L../../src -lwireless
21 |
22 | util_python_PYTHON += inference.py
23 | _inference_la_SOURCES = inference.i
24 | _inference_la_LIBADD = -L../../src -lwireless
25 |
26 | util_python_PYTHON += config.py
27 | _config_la_SOURCES = config.i
28 | _config_la_LIBADD = -L../../src -lwireless
29 |
30 | .i.cpp:
31 | $(SWIG_CMD) -o $@ $<
32 |
--------------------------------------------------------------------------------
/bindings/util/__init__.py:
--------------------------------------------------------------------------------
1 | import hashes
2 | import inference
3 | import config
4 |
--------------------------------------------------------------------------------
/bindings/util/config.i:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2012 Jonathan Perry
3 | * This code is released under the MIT license (see LICENSE file).
4 | */
5 | %module(package="wireless.util") config
6 |
7 | %include "std_string.i"
8 |
9 | %{
10 | #include "config.h"
11 |
12 | std::string get_data_dir() {
13 | return DATA_PATH;
14 | }
15 | %}
16 |
17 | %include "config.h"
18 |
19 | std::string get_data_dir();
--------------------------------------------------------------------------------
/bindings/util/hashes.i:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2012 Jonathan Perry
3 | * This code is released under the MIT license (see LICENSE file).
4 | */
5 | %module(package="wireless.util") hashes
6 |
7 | %include exception.i
8 | %include stdint.i
9 |
10 | ///////////////////////
11 | // Exception handling
12 | ///////////////////////
13 |
14 | %{
15 | #include
16 | %}
17 |
18 | %exception {
19 | try {
20 | $function
21 | } catch(const std::exception& err) {
22 | SWIG_exception(SWIG_RuntimeError, err.what());
23 | } catch(...) {
24 | SWIG_exception(SWIG_RuntimeError, "Unknown exception");
25 | }
26 | }
27 |
28 |
29 | %{
30 | #include "util/hashes/salsa20.h"
31 | #include "util/hashes/SalsaHash.h"
32 | #include "util/hashes/Lookup3Hash.h"
33 | #include "util/hashes/OneAtATimeHash.h"
34 | #include "util/hashes/UnlimitedHash.h"
35 | #include "util/hashes/BitwiseXor.h"
36 | #include "util/hashes/SingleSymbolFunction.h"
37 | #include "util/hashes/SWIGHash.h"
38 |
39 | #include "util/hashes/ShiftRegisterAdaptorHash.h"
40 | %}
41 |
42 | %include "util/hashes/salsa20.h"
43 | %include "util/hashes/SalsaHash.h"
44 | %include "util/hashes/Lookup3Hash.h"
45 | %include "util/hashes/OneAtATimeHash.h"
46 | %include "util/hashes/UnlimitedHash.h"
47 | %include "util/hashes/BitwiseXor.h"
48 | %include "util/hashes/SingleSymbolFunction.h"
49 | %include "util/hashes/SWIGHash.h"
50 |
51 | //%include "util/hashes/ShiftRegisterAdaptorHash.h"
52 |
53 | %template(BitwiseXorSymbolFunction) SingleSymbolFunction;
54 |
55 | %template(Lookup3UnlimitedHash) UnlimitedHash;
56 | %template(SalsaUnlimitedHash) UnlimitedHash;
57 |
58 | %template(Lookup3) SWIGHash;
59 |
60 | // Make types available
61 | %include "carrays.i"
62 |
63 | %array_class(unsigned int, uint32_Array)
64 |
65 | %pythoncode %{
66 | # SALSA TYPES
67 | def SalsaState():
68 | return uint32_Array(16)
69 | %}
70 |
--------------------------------------------------------------------------------
/data/Makefile.am:
--------------------------------------------------------------------------------
1 | # data/ Makefile.am
2 |
3 | # distribute contents of data directory
4 | nobase_dist_data_DATA = \
5 | ./ldpc/LDPC_3072.it \
6 | ./ldpc/LDPC_9500.it \
7 | ./ldpc/LDPC_256_rate0.5.it \
8 | ./ldpc/LDPC_2048.it \
9 | ./ldpc/LDPC_1024.it \
10 | ./ldpc/LDPC_4096.it \
11 | ./ldpc/LDPC_256_rate0.74.it \
12 | ./ldpc/LDPC_256.it
13 |
--------------------------------------------------------------------------------
/data/ldpc/LDPC_1024.it:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yonch/wireless/5e5a081fcf3cd49d901f25db6c4c1fabbfc921d5/data/ldpc/LDPC_1024.it
--------------------------------------------------------------------------------
/data/ldpc/LDPC_2048.it:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yonch/wireless/5e5a081fcf3cd49d901f25db6c4c1fabbfc921d5/data/ldpc/LDPC_2048.it
--------------------------------------------------------------------------------
/data/ldpc/LDPC_256.it:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yonch/wireless/5e5a081fcf3cd49d901f25db6c4c1fabbfc921d5/data/ldpc/LDPC_256.it
--------------------------------------------------------------------------------
/data/ldpc/LDPC_256_rate0.5.it:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yonch/wireless/5e5a081fcf3cd49d901f25db6c4c1fabbfc921d5/data/ldpc/LDPC_256_rate0.5.it
--------------------------------------------------------------------------------
/data/ldpc/LDPC_256_rate0.74.it:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yonch/wireless/5e5a081fcf3cd49d901f25db6c4c1fabbfc921d5/data/ldpc/LDPC_256_rate0.74.it
--------------------------------------------------------------------------------
/data/ldpc/LDPC_3072.it:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yonch/wireless/5e5a081fcf3cd49d901f25db6c4c1fabbfc921d5/data/ldpc/LDPC_3072.it
--------------------------------------------------------------------------------
/data/ldpc/LDPC_4096.it:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yonch/wireless/5e5a081fcf3cd49d901f25db6c4c1fabbfc921d5/data/ldpc/LDPC_4096.it
--------------------------------------------------------------------------------
/data/ldpc/LDPC_9500.it:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yonch/wireless/5e5a081fcf3cd49d901f25db6c4c1fabbfc921d5/data/ldpc/LDPC_9500.it
--------------------------------------------------------------------------------
/doc/.gitignore:
--------------------------------------------------------------------------------
1 | html/
2 |
--------------------------------------------------------------------------------
/doc/doxygen-footer.html:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
14 |
15 |
30 |