Search:

Type: Posts; User: DerekC

Search: Search took 0.01 seconds.

  1. more info: I have a c++ function declared as ...

    more info:

    I have a c++ function declared as

    unsigned char** classify

    I am using the following inteface file in SWIG


    %module PWrap
  2. Using SWIG to wrap a C++ class for use in Java

    Hello,

    Has anyone here ever used SWIG before to get your C++ library to java?

    I have a method that is declared like so

    unsigned char** classify()

    and I want to be able to use this method...
  3. Replies
    2
    Views
    1,464

    I think I figured it out. I thought memalign was...

    I think I figured it out. I thought memalign was something standard (it's in stdlib) but it is only for the IRIX platform. It is made to allocated the space with a certain alignment. I am going to...
  4. Replies
    2
    Views
    1,464

    MIPS to ICC endian problem

    Hi all. I have a program that I have been compiling using MIPS compiler. I have recently been tasked to port this to our new Intel system using icc.

    It compiles fine, but when I run it, I get...
  5. Replies
    1
    Views
    3,479

    contiguous 3d array

    In C, I want to loop through an array in this order

    for(int z = 0; z < NZ; z++)
    for(int x = 0; x < NX; Z++)
    for(int y = 0; y < NY; y++)
    3Darray[x][y][z] = 100;

    ...
  6. Replies
    3
    Views
    7,026

    I discovered that my problem was that I did not...

    I discovered that my problem was that I did not have my arrays defined contiguously. That being said, if I want to loop in this order:
    for z =...
    for x =...
    for y =...

    and access everything...
  7. Replies
    2
    Views
    7,241

    Thanks for the suggestions, I will check into it...

    Thanks for the suggestions, I will check into it monday when i get access back to the compiler/system.
  8. Replies
    2
    Views
    7,241

    Extract 2D subarray using MPI_Type_vector()

    Hi all. The following code (which I am typing in, excuse my typos please) is not working as expected.




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

    int main(int argc, char...
  9. Replies
    3
    Views
    7,026

    Dynamically Allocated arrays and MPI

    Hi all,

    I am looking to find some resources online that show how you might send/recv portions of a 3D array in MPI using C.

    Basically, I want to be able to send each 2D layer of the 3D matrix...
  10. Thread: malloc 2D array

    by DerekC
    Replies
    10
    Views
    9,573

    Ah. I tracked it down. I had to include stdio.h...

    Ah. I tracked it down. I had to include stdio.h and stdlib.h to supress the errors about casting the malloc as a (double**) and get the correct return. Thanks for the help..I didnt think I needed that
  11. Thread: malloc 2D array

    by DerekC
    Replies
    10
    Views
    9,573

    I actually tried exactly what you in that main...

    I actually tried exactly what you in that main function, all by itself,and didnt get a correct answer. Let me double check one last time, and I will be back in a sec.
  12. Thread: malloc 2D array

    by DerekC
    Replies
    10
    Views
    9,573

    malloc 2D array

    hi all

    I am using the following code, which is printing a value of 0.0 instead of 212.0. What am I doing wrong?




    double **u;
    int N = 52;
    int i;
  13. Replies
    1
    Views
    2,515

    There are a lot of profilers that will measure...

    There are a lot of profilers that will measure memory access. Speedshop, totalview, etc
  14. Replies
    6
    Views
    1,895

    So, I think here is the crux of the problem: How...

    So, I think here is the crux of the problem: How do you optimize a forward and backward looking loop? I am not too concerned with memory here, so I had an idea.

    The problem has n total nodes in...
  15. Replies
    6
    Views
    1,895

    I will check it out. Thanks!

    I will check it out. Thanks!
  16. Replies
    6
    Views
    1,895

    Parallel Programming In C. Chap. IX...

    Parallel Programming In C. Chap. IX

    This is not exactly like what I am doing, but it may give you an idea of the 2D problem.
  17. Replies
    6
    Views
    1,895

    So the red black method could be used where the...

    So the red black method could be used where the east/west/north/south neighbors are needed in a 2D grid to update the n'th member of the grid. I am trying to find out what people use when we are now...
  18. Replies
    6
    Views
    1,895

    Red/black for 2D..what for 3D?

    I am trying to find an algorithm that is an efficient way to update the 6 "neighbors" of a point in threespace.
    Is this enough information to explain the problem? I suppose it is referred to as an...
  19. Replies
    9
    Views
    2,004

    Thanks, I will see what I can do about posting a...

    Thanks, I will see what I can do about posting a compilable example with the proper characteristics. There is a lot of other work being done in the outer loops, which is why they cannot be removed....
  20. Replies
    9
    Views
    2,004

    I wanted to post up better psuedo code the...

    I wanted to post up better psuedo code the reflects what I think is the real problem with this code.





    typedef struct{
    double *xp;
    double cp;
    } SV_FDIndx
  21. Replies
    9
    Views
    2,004

    Quite the opposite actually...I KNOW this code is...

    Quite the opposite actually...I KNOW this code is slow. I think I figured out what the one other problem is. There was a typedef defined that points to the structure. Deep down in a set of loops,...
  22. Replies
    9
    Views
    2,004

    It is quite a large code. I will see if I can...

    It is quite a large code. I will see if I can work up a compilable example, or at least get the exact layout of what is currently happening posted tomorrow. Sleep for now!
  23. Replies
    9
    Views
    2,004

    theObject = (typeNamep)...

    theObject = (typeNamep) some_function_returning_data();

    I did just realize i had a slight error with this line. I will get back to you guys with real code when I get a chance (hard to get...
  24. Replies
    9
    Views
    2,004

    Optimize array access

    Hello all. Forgive me if I do not post any real code snippets just yet. This is my first post, so I'm just mostly saying hello for now. Until I get a chance to get a look at the code I am working...
Results 1 to 24 of 24