Search Results - CodeGuru Forums
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: S@rK0Y

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    44
    Views
    1,326

    Re: Difficult Algorithm!

    i think it's more practical to have minimum distance for farthest item in each group :cool:


    Ceffa, each group has closest items to each other: if A has, for eg, minimal max_dist -- you have no...
  2. Replies
    44
    Views
    1,326

    Re: Difficult Algorithm!

    very goal of balance to exclude the farthest items from a group. if two groups ain't neighbors, they cannot affect each other because their items are to far from one another. keep in mind, if you...
  3. Replies
    44
    Views
    1,326

    Re: Difficult Algorithm!

    Ye need to test ABmid & BCmid to choose the best balance. it's enough to balance each group Just once, then go to next one. if about complexity, seems C*M*lg2(N) -- C - const, M is number of groups &...
  4. Replies
    44
    Views
    1,326

    Re: Difficult Algorithm!

    oops, sorry for typo, 'c(m)' has to be 'c(w)' :)
  5. Replies
    44
    Views
    1,326

    Re: Difficult Algorithm!

    each group is sorted list of distances from 0-checkpoint per se. So, you can try new edges for given group in binary search. for example:

    1. we have three groups (A, B, C).
    2. A has n items, B --...
  6. Replies
    44
    Views
    1,326

    Re: Difficult Algorithm!

    run binary search to balance neighbors. if groups have a lot of items, it will be useful to speed up.
  7. Replies
    44
    Views
    1,326

    Re: Difficult Algorithm!

    well, let's run example. for instance, we have:

    #1 group: {15, 27, 31}
    #2: { 34, 47, 51}
    #3: {57, 65, 90}

    ****
    max distance for #1: 31 - 15 = 16
    #2: 17
    #3: 33
  8. Replies
    44
    Views
    1,326

    Re: Difficult Algorithm!

    you must deal w/ Just edges of the group, i. e. farthest villages. actually, correction may run the following way:

    1. take group w/ longest distance between edges.
    2. move edges to neighboring...
  9. Replies
    44
    Views
    1,326

    Re: Difficult Algorithm!

    well, let's dip deeper:

    1. take list of villages sorted by distances from zero-checkpoint.
    2. divide that list in M groups.
    3. for each group, take the two villages w/ maximal distance between...
  10. Replies
    44
    Views
    1,326

    Re: Difficult Algorithm!

    divide N villages into M groups & place each hospital for each group.

    PS

    each group consists of most closest villages to one another. ;)
  11. Replies
    52
    Views
    4,471

    Re: IF-free conception.

    OReubens, would ye like to post full listing of output? this part seems to me as standard 3OE approach. And it doesn't contradict w/ my words about:

    ucomisd (%rax), %xmm1
  12. Replies
    52
    Views
    4,471

    Re: IF-free conception.

    2kaud, actually, i put 'pivot' & some of other vars in xmmXX & mmX -- quite useful to reduce data flow. In fact, loops must be so light as possible. by the way, these lines:


    ...
  13. Replies
    52
    Views
    4,471

    Re: IF-free conception.

    OReubens, performance of any algo is:

    1. data-dependent.
    2. hardware-dependent.
    ---------------------------------------
    in true HPC, we can't rely Just upon some kind of math abstraction.

    ...
  14. Replies
    52
    Views
    4,471

    Re: IF-free conception.

    Superbonzo, at most, Optimization doesn't need a genius programmer, it needs long standard routines to analyze existed bottlenecks & possible bypasses. and i gonna repeat for yet another time: modern...
  15. Replies
    52
    Views
    4,471

    Re: IF-free conception.

    Superbonzo, well, i'd like to share my view: i think practice always has the last word. Everyone can say everything, but only Goddess Practice can determine who is right or wrong ;) in the practice,...
  16. Replies
    52
    Views
    4,471

    Re: IF-free conception.

    Superbonzo, optimized code ain't gambling at all. it's Just clear understanding of your very goal & the methods to achieve it. theoretically, we can use...
  17. Replies
    52
    Views
    4,471

    Re: IF-free conception.

    Razzle, through prism of HPC, you need to lessen the number of threads as far as ye can do it: in the best scenario, MT algos boost performance linearly. For instance, performance of 4 000 000 of...
  18. Replies
    52
    Views
    4,471

    Re: IF-free conception.

    Razzle, in fact, true HPC was destroyed by GHz in CPUs. who cares about optimization, if new "stone" will give more GHz muscle??? some years ago, many "experts" dreamed of 10 Ghz "stone". But such...
  19. Replies
    52
    Views
    4,471

    Re: IF-free conception.

    2 OReubens


    Ye're Absolutely Right about #1 & i Absolutely don't share your #2: at large scale, highly-optimized code takes times lower ticks (at least) to accomplish the same task. Big Data...
  20. Replies
    52
    Views
    4,471

    Re: IF-free conception.

    2 Razzle

    actually, from the very start, i've suggested nothing. i just have shared the code to test it onto different intel-based machines.


    this solution is the cpu-hosted code, it's...
  21. Replies
    52
    Views
    4,471

    Re: IF-free conception.

    D Drmmr, i did run optimized code. however, there could be problems w/ smarty modes of compilers because algo has used rXX, xmmXX & mmX registers as global vars. nevertheless nothing prevents us to...
  22. Replies
    52
    Views
    4,471

    Re: IF-free conception.

    Razzle, IT has no magic pills. even if to say about sorting algos, the're a lot of 'minors':

    1. data structures (array has low performance at the rest of possible operations).
    2. number of items...
  23. Replies
    52
    Views
    4,471

    Re: IF-free conception.

    Razzle, we can dispute up to Infinity & Beyond :) i'd like to see real benchmarks, you could run fsort(no-if) onto your intel-based machine(s) & only this can be the last word for such discussions.
    ...
  24. Replies
    52
    Views
    4,471

    Re: IF-free conception.

    Razzle, yes, multi-threading can be exploited w/o low-level programming. however, MT has a lot of troubles for developers: you have to sync concurrently-running objects & this moment (in many cases)...
  25. Replies
    52
    Views
    4,471

    Re: IF-free conception.

    well, Razzle, let's try to cross our t's at least for a little of possible ones. state-of-the-art hardware has 6-way approach to speed-up algos:

    1. multi-threading.
    2. 3OE (out-of-order...
Results 1 to 25 of 32
Page 1 of 2 1 2


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center