Search:

Type: Posts; User: Fede

Search: Search took 0.01 seconds.

  1. Effectively the problem was the uint32 was...

    Effectively the problem was the uint32 was overflowing when calculating the buffer size: (d*(d-1))/2 ) with d~500000
    A mistake I do constantly :D
    Thanks for the replies!
  2. Thanks for the replies. I don't care...

    Thanks for the replies.



    I don't care about not recovering from the exception but I would like to have warnings printed to std::cerr. The implementation would be to include the try block...
  3. Catch std::bad_alloc of a vector constructed inside a member initializer list

    Hi!
    I am dealing with a problem in which I have to allocate a huge distance matrix (~600 GB on a cluster node). In order to save some memory, since the matrix is symmetric, I defined an upper...
  4. Replies
    4
    Views
    9,041

    The binary file is data generated by a colleague...

    The binary file is data generated by a colleague with a pre-defined format: raw array of NormalizedPair.
    It was not clear in my first post but I am actually using a std::vector<NormalizedPair>. The...
  5. Replies
    4
    Views
    9,041

    Read binary file into std::vector

    Hi,
    I am having a hard time finding the cleanest solution for the following problem.
    I want to read a binary file into an std::vector.
    Checking online I found the following solution:

    ifstream...
  6. I found out what the error was. It was actually a...

    I found out what the error was. It was actually a rounding error that the .txt file didn't show because it was truncating the results.
    So, as usual, it was 100% my mistake :D.
    In any case thanks!
  7. The MatchedPair is a struct: struct...

    The MatchedPair is a struct:

    struct MatchedPair
    {
    uint32_t ID2;
    double distance;
    MatchedPair(): ID2(0), distance(0) {}
    MatchedPair(uint32_t id2, double d): ID2(id2),...
  8. std::ofstream strange behavior when writing binary

    Hi,
    I have a code that outputs the content of an array of std::maps in binary format.


    auto outfile = std::fstream(output, std::ios::out | std::ios::binary);
    MatchedPair tmp;
    for (int i = 0;...
  9. Thread: Binary Radix Sort

    by Fede
    Replies
    6
    Views
    7,835

    As soon as I have time I'll make a version of the...

    As soon as I have time I'll make a version of the threaded code using gnu pthread library and post it here just in case it is useful for someone.
    Once again thanks for all the really useful...
  10. Thread: Binary Radix Sort

    by Fede
    Replies
    6
    Views
    7,835

    First of all thanks for sharing your code and...

    First of all thanks for sharing your code and knowledge, it's been a huge help for me.

    I ran some tests using 107 unsigned 32 bit integers and your serial code outperforms bash sort parallel...
  11. Thread: Binary Radix Sort

    by Fede
    Replies
    6
    Views
    7,835

    Binary Radix Sort

    Hi,

    I need some help with implementing a Radix Sort Algorithm. I found a related thread posted by @rcgldr (don't know how to @user) that although really useful it is now closed.
    My question is if...
Results 1 to 11 of 11