[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

08/16/2002 at 05:19AM PDT, ID: 20337349
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.2

help on C++ optimization

Asked by qocarlos in C++ Programming Language

Tags: optimization, row

I'm doing some specialized processing on data matrices.
 Typically, I use to
 allocate one dimensional arrays for my 2D matrices and then I
 just need to
 use pointer arithmetic to access to any element in the
 matrix. For example,
 in the case of a matrix of nRows and nCols, the matrix is allocated as
 follows:
 
  loat* fM = new float[nCols * nRows];
 
  Then, for example, to modify all the elements of row #5 of a
  matrix, the
  code could be something like this:
 
  int nOffset = 5 * nCols;
  float*f = fM + nOffset;
  for (register int i = 0; i < nCols; i++, f++)
       *f = whatever;
 
  On the other hand, in order to modify all the elements of a
  given column
  (i.e. column # 5) the code would be:
 
  float*f = fM + 5;
  for (register int i = 0; i < nRows; i++, f += nRows)
       *f = whatever;
 
  I found that operations performed along rows are much faster than
  operations performed along the columns. I understand that
  this is because  elements on rows are contiguous in memory whilst elements in
  columns are  separated by the number of columns of each row. Perhaps the CPU is caching memory so that it is faster to access nearby
memory locations.
  I would like to speed up the processing along columns. I have read
  somewhere that one way would be to process 8 columns together. This is
  effective if the processor contains 64 registers, which I
  guess most modern
  processors have. However, I can't find that information
  anymore and I can't  figure out how to process 8 columns at the same time. Do you have any
  experience on this sort of optimizations issues?
  Thanks for your help,
[+][-]08/16/02 10:03 AM, ID: 7225206

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/16/02 11:37 AM, ID: 7225357

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/17/02 02:49 AM, ID: 7226109

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/17/02 02:51 AM, ID: 7226111

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/19/02 01:40 PM, ID: 7229287

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/20/02 08:03 AM, ID: 7230992

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/20/02 10:54 AM, ID: 7231468

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/20/02 01:02 PM, ID: 7231819

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/20/02 04:21 PM, ID: 7232271

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: C++ Programming Language
Tags: optimization, row
Sign Up Now!
Solution Provided By: DanRollins
Participating Experts: 3
Solution Grade: A
 
 
[+][-]08/20/02 05:04 PM, ID: 7232312

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/20/02 06:07 PM, ID: 7232386

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/22/02 10:59 AM, ID: 7236740

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/22/02 11:57 AM, ID: 7236887

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/22/02 12:50 PM, ID: 7236971

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20090824-EE-VQP-74