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

Search:

Type: Posts; User: dshawul

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    1
    Views
    1,032

    Re: include directories in VS

    Bug: http://connect.microsoft.com/VisualStudio/feedback/details/759134/vs-2012-will-not-automatically-use-property-sheet-changes-in-vs10-projects
  2. Replies
    1
    Views
    1,032

    include directories in VS

    I am trying to include library paths in VS 2012 through the new property pages.I downloaded and installed mpich2-64 bit libraries under "C:\Program Files\MPICH2\include" and set the include path in...
  3. Replies
    4
    Views
    572

    Re: template instantiation

    Thanks a lot for the thorough explanation. Now I understand perfectly.
    I have edited my original post with the source code that produces the error so that others understand
    your explanation. ...
  4. Replies
    4
    Views
    572

    Re: template instantiation

    Hi, thanks very much. Both methods work. What I don't understand is that the overloaded IO operators of Option class have different types than the default ones,so why should there be a conflict ?
    I...
  5. Replies
    4
    Views
    572

    namespace problems

    Hi, The simplified code compiles correctly under GCC but not MSVC. why ? If I put Option struct in its own named namespace or remove the namespace Util, it compiles correclty. How can I make it work...
  6. Replies
    4
    Views
    646

    Re: get return type of function

    You are a life saver. I will use the traits method for now.
    Scalar,vector and tensor are 1st,2nd and 3rd rank tensors but they are of completely different types represented by
    double, double[], and...
  7. Replies
    4
    Views
    646

    Re: get return type of function

    Thanks a lot.
    Unfortunately I am not using c++11 so I can not use those solutions.
    I get 'error C3861: 'decltype': identifier not found' for the second solution.
    Do you have the solution that...
  8. Replies
    4
    Views
    646

    get return type of function

    Hi,
    Say I have overloaded functions with different arguments AND return types. Each set of argument has only one corresponding return type.


    Vector grad(Scalar)
    Tensor grad(Vector)

    Later I...
  9. Replies
    6
    Views
    1,314

    Re: random partition in to k groups

    Hi nuzzle
    Sorry I didn't look back to this thread once I thought I had something working. Yes you are right there was something fishy about the code I posted. Running the code 10 times will reveal a...
  10. Replies
    6
    Views
    1,314

    Re: random partition in to k groups

    Well it seems the easiest approach of picking one at a time randomly works well.


    #include <stdlib.h>
    #include <stdio.h>

    void gen(int* r,int* rk,int Nk) {
    int N = 0;
    for(int j =...
  11. Replies
    6
    Views
    1,314

    Re: random partition in to k groups

    N can be very big (thousands or millions). Maybe I am looking at this problem from a wrong perspective so let me describe the actual problem.
    I have data of wins,draws,losses N = W + D + L. For...
  12. Replies
    6
    Views
    1,314

    random partition in to k groups

    How do you generate a random permutation of numbers from 0 to N without storing it in an array ?
    Note that duplicates are to be avoided so I can't use rand() calls to generate them.
    The problem I...
  13. Replies
    2
    Views
    380

    Re: malloc virtual memory

    Yes with address space of 2^64.
  14. Replies
    2
    Views
    380

    malloc virtual memory

    Hi
    When does malloc() return null ? I want to allocate a big virtual memory which can not possibly fit on RAM, so most of it will be stored on disk. I am going to access the data sequentially so at...
  15. Replies
    8
    Views
    610

    Re: intermediate file multi-process safety

    Yes another alternative would be to use an flock() but why use it when synchronization can be avoided. Anyway I like appending the output file name with an extension. And it works just fine.
    Thanks...
  16. Replies
    8
    Views
    610

    Re: intermediate file multi-process safety

    Yes I want to do a parallel compression of many files on linux cluster all residing in the same current directory. Creating a folder just to put in the temporary file would be problematic.
  17. Replies
    8
    Views
    610

    Re: intermediate file multi-process safety

    That seems to be a windows only solution. Is there something in c like remove?

    update: I got about 10 or so corrupt files so indeed the problem is there. Somehow I thought system would be 'process...
  18. Replies
    8
    Views
    610

    Re: intermediate file multi-process safety

    The temporary file is created in the same directory and it could stay alive for 10 seconds where there is conflict. I think I can solve it by giving different names to each temporary file (eg....
  19. Replies
    8
    Views
    610

    intermediate file multi-process safety

    Hi
    I have a compressor that takes a file and first compresses it to an intermediate file "temp.lz", before compressing it to the final format. Immediately after that the file be removed by calling...
  20. Replies
    2
    Views
    496

    Re: macro with in a macro

    Thanks I came up with an inline function solution but yours works too.


    //inline void l_barrier() {
    // #pragma omp barrier
    //}
    #define l_barrier() { \
    __pragma(omp barrier) \
    }
  21. Replies
    2
    Views
    496

    macro with in a macro

    Is it possible to define a macro with in a macro ? Any trick will do.
    I am trying to do quick conversion of cuda program to open mp by defining some macros at the top:


    #define __syncthreads() ...
  22. Replies
    4
    Views
    1,287

    Re: Using MPI in C++ Solution

    I think you got the message exchange between slaves and master right. Mpi starts the number of processors you specified at start up and sets them up for message passing. Any other process you fork or...
  23. Replies
    4
    Views
    1,287

    Re: Using MPI in C++ Solution

    If I understand you correctly, you want to execute PerformTask() by different processors, but you have other code that executes only once. You can put all that code in rank=0 to be executed only once...
  24. Replies
    7
    Views
    1,650

    Re: Help with chess engine

    I think you did really well. And I agree that first thing is to get it working.
    I sensed the amount of effort you put into your project which is why I "volunteered" to introduce you there. ]If you...
  25. Replies
    7
    Views
    1,650

    Re: Help with chess engine

    Hell veclock
    Welcome to the chess engine programming world. A group of smart chess programmers are ready to help you in developing your engine after I informed them of your question here. I hope you...
Results 1 to 25 of 39
Page 1 of 2 1 2


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center