From: "Jan Simon" <>
Newsgroups: comp.soft-sys.matlab
Subject: Re: How to make the function 'norm' treat its input as vectors?
Date: Thu, 14 Oct 2010 16:05:07 +0000 (UTC)
Organization: Universit&#228;t Heidelberg
Lines: 15
Message-ID: <i979nj$arb$>
References: <i938ok$smb$> <i93kdo$o8f$> <i94def$3h4$> <i94mh3$9c3$> <i94v8c$r8p$> <i958vn$cjb$> <i95ak3$srq$> <i96neg$hsc$> <i96r2q$d0f$> <i96sss$c0c$> <i970h5$dlh$>
Reply-To: "Jan Simon" <>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1287072307 11115 (14 Oct 2010 16:05:07 GMT)
NNTP-Posting-Date: Thu, 14 Oct 2010 16:05:07 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 869888
Xref: comp.soft-sys.matlab:678480

Dear Matt,

> But that is not the approach I proposed in Message 8! (it was the mtimesx approach).

It is really hard for me to find message 8, obviously. I'm reading CSSM thrugh the MathWorks pages with Firefox on a 366MHz Pentium-II laptop with 1024*768 pixels. Scrolling is not smooth and 60% of the screen width are wasted by *fancy* empty space. I think this is a combination of peephole optimization and data hiding.
Especially the grey borders on the sides are really free of sense and information.

> No, and even mtimesx doesn't provide a way to do anything but column-wise norms with maximum efficiency (that I can see).  So, your DNorm2 really ought to be the lead contender when it comes to norming along other dimensions.

Let's wait and see. I think the OMP-parallelization of MTIMESX is hard to beat on a 4-core processor. Perhaps somebody could omp my program, too.

I've just a few experiences with mutli-threading fSGolayFilt using Windows-threads. It took me some days to develop a (finally trivial) method to determine the optimal number of threads: starting 8 threads to filter a [20 x 8] matrix wastes time. A general [M x N] array can be split horizontally or vertically for the different threads. If I split a [M x 3] matrix on a dualcore processor to a [M x 2] and a [M x 1] array, one thread is bored 50% of the time, so splitting to two [M/2 x 3] arrays is better.
Finally I spent 40h in the optimization to get my program accelerated by 2 seconds. But this was efficient, because the total processing time was reduced from 6 to 4 seconds, while 5 seconds is the magic psychological limit of causing stress for the users. After 5 seconds the user looses the feeling that the computer reacts to a his action. 

Bye, Jan