From 6ada9e3c000c5b1723f7ef884950a608b32ca6b8 Mon Sep 17 00:00:00 2001 From: drowe67 Date: Thu, 19 Apr 2018 06:40:08 +0000 Subject: [PATCH] up to date CML patch, terminates early etc git-svn-id: https://svn.code.sf.net/p/freetel/code@3505 01035d8c-6547-0410-b346-abe4f91aad63 --- codec2-dev/octave/cml.patch | 101 ++++++++++++++++++++++++++++++++++-- 1 file changed, 98 insertions(+), 3 deletions(-) diff --git a/codec2-dev/octave/cml.patch b/codec2-dev/octave/cml.patch index cb517a45..998058cc 100644 --- a/codec2-dev/octave/cml.patch +++ b/codec2-dev/octave/cml.patch @@ -1,5 +1,6 @@ +diff -ruN -x '*~' -x -q cml-orig/CmlStartup.m cml/CmlStartup.m --- cml-orig/CmlStartup.m 2007-09-08 23:12:26.000000000 +0930 -+++ cml/CmlStartup.m 2016-09-19 10:30:08.673767127 +0930 ++++ cml/CmlStartup.m 2018-04-12 16:38:31.966825321 +0930 @@ -20,7 +20,7 @@ addpath( strcat( cml_home, '\mex'), ... strcat( cml_home, '\mat'), ... @@ -25,7 +26,101 @@ -save( save_directory, save_flag, 'cml_home' ); \ No newline at end of file +save( save_directory, save_flag, 'cml_home' ); +diff -ruN -x '*~' -x -q cml-orig/mat/CreateConstellation.m cml/mat/CreateConstellation.m +--- cml-orig/mat/CreateConstellation.m 2007-12-27 21:36:24.000000000 +1030 ++++ cml/mat/CreateConstellation.m 2018-04-15 10:21:35.325168186 +0930 +@@ -58,7 +58,7 @@ + % Optional argument: Label Type + if (length(varargin)>=2) + label_type = varargin{2}; +- if ~isstr( label_type ) ++ if ~ischar( label_type ) + if (length( label_type ) ~= M ) + error( 'Length of label_type must be M' ); + elseif (sum( sort( label_type ) ~= [0:M-1] ) > 0) +diff -ruN -x '*~' -x -q cml-orig/mat/InitializeWiMaxLDPC.m cml/mat/InitializeWiMaxLDPC.m +--- cml-orig/mat/InitializeWiMaxLDPC.m 2007-07-21 08:18:04.000000000 +0930 ++++ cml/mat/InitializeWiMaxLDPC.m 2018-04-15 10:19:59.487185664 +0930 +@@ -134,7 +134,7 @@ + H(cnt1:cnt1+z-1, cnt2:cnt2+z-1)= eye(z); + end + if (Hbm(i, j) >0) +- if ((rate ==2/3)&(ind ==0)) ++ if ((rate ==2/3)&&(ind ==0)) + H(cnt1:cnt1+z-1, cnt2:cnt2+z-1)=circshift( eye(z),[0,mod(Hbm(i,j),z)]); + else + H(cnt1:cnt1+z-1, cnt2:cnt2+z-1)= circshift( eye(z),[0,floor(Hbm(i,j)*z/z0)]); +@@ -146,7 +146,7 @@ + end + + P =eye(z); +-if ((rate ==3/4) & (ind ==1)) ++if ((rate ==3/4) && (ind ==1)) + P=inv(circshift( eye(z),[0,floor(80*z/z0)])); + end + +diff -ruN -x '*~' -x -q cml-orig/source/matrix.h cml/source/matrix.h --- cml-orig/source/matrix.h 1970-01-01 09:30:00.000000000 +0930 -+++ cml/source/matrix.h 2016-09-19 10:25:58.009761169 +0930 -@@ -0,0 +1 @@ ++++ cml/source/matrix.h 2018-04-12 16:38:31.966825321 +0930 +@@ -0,0 +1,1 @@ +#include +diff -ruN -x '*~' -x -q cml-orig/source/MpDecode.c cml/source/MpDecode.c +--- cml-orig/source/MpDecode.c 2007-08-06 14:44:24.000000000 +0930 ++++ cml/source/MpDecode.c 2018-04-15 07:28:51.092724038 +0930 +@@ -53,6 +53,7 @@ + #include + #include + #include ++#include + + /* Input Arguments */ + #define INPUT prhs[0] +@@ -332,8 +333,10 @@ + int sign; + float temp_sum; + float Qi; +- ++ int ssum; ++ + for (iter=0;iter