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

Search:

Type: Posts; User: poolisfun

Page 1 of 4 1 2 3 4

Search: Search took 0.01 seconds.

  1. Re: Optimizing getPixel() calls for 1bpp vs 8bpp?

    The algorithm is different for grayscale and black-and-white, so it would not really help to keep all pixels in 1 byte increments. Also, I think having 8 pixels in 1 bit reduces memory access (and...
  2. Re: Optimizing getPixel() calls for 1bpp vs 8bpp?

    Well, this image class is being used for a specialized purpose of computer vision. So, I am optimizing certain features for this purpose.

    I am layering on top of .NET Bitmaps.
  3. Re: Optimizing getPixel() calls for 1bpp vs 8bpp?

    Hmm.. very interesting.

    I think the iterators are a good idea.
    I would wait until profiling to optimize but the problem is that I am kind of designing it now...

    Sorry I have this habit of...
  4. Re: Optimizing getPixel() calls for 1bpp vs 8bpp?

    About the "micro optimization", I think it actually slows things down due to the possible extra memory access. Either way, I think the compiler can optimize it as best as possible.

    About knowing...
  5. Re: Optimizing getPixel() calls for 1bpp vs 8bpp?

    Hmm.. thanks for the feedback.

    I am really just calling getPixelDirect in most cases to either count the number of black pixels or to detect 2 or more contiguous black pixels. However, I am also...
  6. Re: Optimizing getPixel() calls for 1bpp vs 8bpp?

    Thanks for help.

    I don't have a benchmark or profiler, but the getPixel is called millions of times.
    Thinking back, I think there was something like hardware if-branch prediction, so I'll try to...
  7. Optimizing getPixel() calls for 1bpp vs 8bpp?

    Hi,

    So, I have an image class. However, pixels can be stored either in 1 bit per pixel or 8 bits per pixel (black-and-white vs grayscale). The pixels are stored in a pixel buffer of size...
  8. Re: Search for public members that should be private?

    thanks anyways
  9. Re: Search for public members that should be private?

    Thanks, but is there any open source/free solution? Better yet, a feature in msvc++?
  10. Search for public members that should be private?

    Hi,

    I was wondering if there was any way for msvc++ to automatically search my code for all public members that could be private without causing any compiler errors.
    For example,

    class hello...
  11. Re: Avoiding 'float' to 'double' conversion errors

    What I mean is that the compiler has the option of choosing the more efficient method for the target processor, so I do not need to worry about it.

    Correct me if I am wrong on this, but the...
  12. Re: Avoiding 'float' to 'double' conversion errors

    Efficiency. By me specifying float, the compiler has a chance to upgrade to double if it deems it more efficient. It cannot do the opposite.
  13. Re: Avoiding 'float' to 'double' conversion errors

    Okay, thanks!
  14. Re: Avoiding 'float' to 'double' conversion errors

    Thanks!

    Just to double check, is this platform independent?
  15. Avoiding 'float' to 'double' conversion errors

    Hi,

    I was just wondering what is the best way for me to eliminate these warning messages:

    1>(197) : warning C4305: 'initializing' : truncation from 'double' to 'float'
    1>(197) : warning C4305:...
  16. Replies
    27
    Views
    11,976

    Op

    Thanks for your responses all....

    I read this article and am now thinking that trying to optimize std::vector is not worth the time and code confusion :X

    I'll probably try to optimize other...
  17. Replies
    27
    Views
    11,976

    Re: STL fixed size vectors?

    Yeah, that was my original intention. Now if only STL defined some way to reserve a certain amount of space in a vector via stack it would be easier...
  18. Replies
    27
    Views
    11,976

    Re: STL fixed size vectors?

    Sounds like a good idea thanks!
  19. Replies
    27
    Views
    11,976

    Re: STL fixed size vectors?

    Thanks, but why is it not possible to use .push_back() with tr1::arrays? Like, do I need to manually keep track of the number of elements I store? Basically, I want to avoid dynamic allocation...
  20. Replies
    27
    Views
    11,976

    STL fixed size vectors?

    Hi,

    I was wondering if there was any easy way to define a fixed size vector in C++.
    Basically, I am trying to avoid the inefficiency of dynamic allocations without having to deal with handling...
  21. Replies
    12
    Views
    1,289

    Re: C++0x fails: no multiple return values

    Okay, thanks for telling me about Boost/TR1's tuples.

    I guess since the comma operator is overloadable, this the best that can be done...
  22. Replies
    12
    Views
    1,289

    Re: C++0x fails: no multiple return values

    The compiler just needs to convert the return values implicitly into pointers passed as parameters.


    Sorry, I meant that they should add multiple return values directly to C++'s syntax. Too bad...
  23. Replies
    12
    Views
    1,289

    Re: C++0x fails: no multiple return values

    Yeah, but Boost tuple kind of makes the other method with passing pointers more convenient...

    Well, I guess if they don't want to add tuples to C++ they won't, but I don't see any problems with...
  24. Replies
    12
    Views
    1,289

    C++0x fails: no multiple return values

    I am kind of annoyed that C++0x doesn't support multiple return values as such:

    int, int GetValues(int x, int y)
    {
    return (x), (y);
    }

    int main()
    {
    int x;
  25. Re: Windows 7: Windows key + D (minimize to desktop) not working

    Nevermind thanks for the link.
Results 1 to 25 of 91
Page 1 of 4 1 2 3 4


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center