Search:

Type: Posts; User: DrSnuggles

Page 1 of 7 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    0
    Views
    1,766

    Get number of threads in PPL

    Hi, I'm learning to use the Parallel Patterns Library. How do I get how many threads have been created by PPL at any given moment?
  2. Replies
    8
    Views
    11,816

    I found an answer here, pointer functionality is...

    I found an answer here, pointer functionality is indeed included in unordered_set:

    And in a thread about unordered_set here:
  3. Replies
    8
    Views
    11,816

    Ok in any case, all the pointers will point to...

    Ok in any case, all the pointers will point to objects in the same array so that should not be an issue, right? Back to the initial question... will unordered_set handle the pointer...
  4. Replies
    8
    Views
    11,816

    Yes... Since two calls two new can never return...

    Yes... Since two calls two new can never return the same memory adress you could of course never compare them and return true. But I don't get how that is relevant. A comparison would still return...
  5. Replies
    8
    Views
    11,816

    The pointers will all point to the same class...

    The pointers will all point to the same class type. Since pointer comparison just compares adresses, which boils down to something like an integer comparison, I'm guessing that such comparisons are...
  6. Replies
    8
    Views
    11,816

    unordered_set with pointers

    Hi, I'm figuring out how to work with std::unordered_set.

    Some sites indicate that you need to create custom hashing and comparison functions when using unordered_set with custom classes but is...
  7. Got the same behavior as you. SendInput solved...

    Got the same behavior as you.

    SendInput solved the issue so I think I'll go with that. Thanks a lot!

    For reference, I now do this at startup after window creation:

    INPUT input={0};...
  8. Issue: GetAsyncKeyState with left mouse button returns true until first click

    Hi, I'm using this code to determine if the left mouse button is currently pressed:


    bool leftMouseDown = GetAsyncKeyState(VK_LBUTTON) & 0x8000 ? true : false;

    ..but it returns true until the...
  9. Replies
    25
    Views
    3,001

    That could very well be the case. Not sure about...

    That could very well be the case. Not sure about what memory bandwidth I have. It would be interesting to try asm though but perhaps it is not trivial. Perhaps I can go bug some people in an assembly...
  10. Replies
    25
    Views
    3,001

    Yes in my example I'm only doing one thing,...

    Yes in my example I'm only doing one thing, assigning memory. Obviously the loop cases where I'm blending colors will take longer than just assigning the colors but that is a separate issue. In this...
  11. Replies
    25
    Views
    3,001

    It is sufficient. If the whole loop takes as an...

    It is sufficient. If the whole loop takes as an example 16 milliseconds and when I run only the assigning memory part it takes 15 milliseconds then I'm smart enough to figure out what is taking the...
  12. Replies
    25
    Views
    3,001

    You are asking me to profile my whole program?...

    You are asking me to profile my whole program? That is not what I'm asking for. How is timing how long something takes not profiling? I have profiled and come to the conclusion that it is the part in...
  13. Replies
    25
    Views
    3,001

    Well if I'm only doing one thing in the loop that...

    Well if I'm only doing one thing in the loop that that is what is slow. Like I said I have run the basic loop separately and found it takes too much time.
  14. Replies
    25
    Views
    3,001

    I have said I have timed different versions of...

    I have said I have timed different versions of the code, you are just going to have to take my word for it. Go with the example in the initial post if you find the if statements in the other example...
  15. Replies
    25
    Views
    3,001

    I have already tested and timed pretty much all...

    I have already tested and timed pretty much all different scenarios and not found significant improvements. Like I said I have tested to run the code with just plain loops so the if statements are...
  16. Replies
    25
    Views
    3,001

    When I tested I put the if statement outside the...

    When I tested I put the if statement outside the loops and did the background layer seperately. The timing was pretty much the same. One if statement did not change much. I'm not asking you to...
  17. Replies
    25
    Views
    3,001

    grumpy, I have tested to remove all the...

    grumpy, I have tested to remove all the conditional statements (only one for the background layer) and the time is pretty much the same so it is obvious that it is the accessing and assigning of...
  18. Replies
    25
    Views
    3,001

    Thanks for the replies. Yes I should have...

    Thanks for the replies. Yes I should have included what the COLOR class is, it is a very basic 4 byte structure and looks like this:

    class COLOR
    {
    public:
    BYTE b;
    BYTE g;
    BYTE r;
    BYTE a;...
  19. Replies
    25
    Views
    3,001

    Fast(est) way to manipulate memory

    Hi, I'm trying to get updating the pixels of an image as fast as possible. I'm wondering if there is some C++ magic I can apply to make it faster. Or some other kind of magic...

    Right now I'm...
  20. Replies
    3
    Views
    1,267

    Optimization possible? - Screenshot

    Hi, I have this function for taking a screenshot and extracting the pixels, it is working but I have a feeling it could be optimized and I don't really know what all the commands do. Can you spot any...
  21. Replies
    4
    Views
    1,610

    cyberfish, the m_fd pointer was indeed NULL....

    cyberfish, the m_fd pointer was indeed NULL. Should have checked that...

    Anyway, the file creation itself is failing when using japanese characters when I have the system set to use japanese...
  22. Replies
    4
    Views
    1,610

    It seem that the problem could be occuring...

    It seem that the problem could be occuring earlier in the code when the file is created, related to the file name in japanese. I'll be back after some checking.:)
  23. Replies
    4
    Views
    1,610

    fwrite failing with japanese language

    Hi I'm trying to write a binary file (PSD) and have japanese language turned on on my computer right now. The program crashes when using fwrite, I think it has to do with that the system is using...
  24. Replies
    7
    Views
    2,600

    Thanks a lot, those works to get the size when...

    Thanks a lot, those works to get the size when the DPI has changed. There is another, perhaps more common way, to change the character size in the display properties though and that does not get...
  25. Replies
    7
    Views
    2,600

    Thanks, it seems that what you get from...

    Thanks, it seems that what you get from GetTextExtentPoint32 is not affected by changing the size of the text that is used in window captions and menus though so it is not what I'm looking for....
Results 1 to 25 of 166
Page 1 of 7 1 2 3 4