Path: news.mathworks.com!not-for-mail From: "Jan Simon" <matlab.THIS_YEAR@nMINUSsimon.de> 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ät Heidelberg Lines: 15 Message-ID: <i979nj$arb$1@fred.mathworks.com> References: <i938ok$smb$1@fred.mathworks.com> <i93kdo$o8f$1@fred.mathworks.com> <i94def$3h4$1@fred.mathworks.com> <i94mh3$9c3$1@fred.mathworks.com> <i94v8c$r8p$1@fred.mathworks.com> <i958vn$cjb$1@fred.mathworks.com> <i95ak3$srq$1@fred.mathworks.com> <i96neg$hsc$1@fred.mathworks.com> <i96r2q$d0f$1@fred.mathworks.com> <i96sss$c0c$1@fred.mathworks.com> <i970h5$dlh$1@fred.mathworks.com> Reply-To: "Jan Simon" <matlab.THIS_YEAR@nMINUSsimon.de> NNTP-Posting-Host: webapp-05-blr.mathworks.com Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: fred.mathworks.com 1287072307 11115 172.30.248.35 (14 Oct 2010 16:05:07 GMT) X-Complaints-To: news@mathworks.com NNTP-Posting-Date: Thu, 14 Oct 2010 16:05:07 +0000 (UTC) X-Newsreader: MATLAB Central Newsreader 869888 Xref: news.mathworks.com 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