Search:

Type: Posts; User: rasta_freak

Page 1 of 6 1 2 3 4

Search: Search took 0.01 seconds.

  1. You could generate temp .c file and...

    You could generate temp .c file and compile/execute it... or maybe there's some "library" for compiling code...
    EDIT: or compile into shared library, and dlopen() it in current context...
  2. Replies
    5
    Views
    3,776

    You can debug that stuff pretty easily with...

    You can debug that stuff pretty easily with strace.
    I was just looking at it, here's the output of previos code:


    ioctl(4, SIOCGIFNAME, {ifr_index=1, ifr_name="lo"}) = 0
    ioctl(4, SIOCGIFNAME,...
  3. When you type: "myprog.exe a*", shell (cmd.exe in...

    When you type: "myprog.exe a*", shell (cmd.exe in your case) will search for all files in current directory and replace "a*" with all files starting with "a" and call your program like this...
  4. Replies
    88
    Views
    14,092

    http://gcc.gnu.org/onlinedocs/gcc/Variadic-Macros....

    http://gcc.gnu.org/onlinedocs/gcc/Variadic-Macros.html#Variadic-Macros
    (## removes comma if va_args is empty)
  5. Replies
    88
    Views
    14,092

    And i would just say that 0 is perfectly legal...

    And i would just say that 0 is perfectly legal memory address (in virtual & pyshical sense) as far as CPU is concerned (unless it has some built-in protection for virtual). I've been using 0th memory...
  6. You know that shell does wildcard expansion?...

    You know that shell does wildcard expansion? ("cmd /?" or "man bash") If you want to do it yourself, you can define your own wildcards/patterns as you like because you're gonna have to scan for every...
  7. Replies
    11
    Views
    2,632

    Did you try "unsigned long long" ? (64-bit...

    Did you try "unsigned long long" ? (64-bit unsinged. Maybe (just maybe) it will be enough).
  8. Replies
    15
    Views
    2,219

    You call sched_yield() for manual, cooperative...

    You call sched_yield() for manual, cooperative multitasking - you return control to scheduler and it then schedules (runs) next process/thread. I'd place one call in thread #2 & #3 as last line in...
  9. Replies
    5
    Views
    2,189

    You may have given him "proper" way of doing it,...

    You may have given him "proper" way of doing it, but i just pointed out (to him) "error" in his way...(not saying it's "proper" or good)

    EDIT: actually, I'm totaly wrong (;)), because I thought he...
  10. Replies
    5
    Views
    2,189

    You need to reset j to 0 after that commented-out...

    You need to reset j to 0 after that commented-out while loop...
  11. Replies
    15
    Views
    2,219

    That confused me :) But, would sched_yield()...

    That confused me :)

    But, would sched_yield() be too much of "wasting cpu time"? It is a waste, but minimal...
    EDIT: actually, it's a "delay", not "waste". And these are serial ports after all...
  12. Replies
    15
    Views
    2,219

    Does GetCricketDist() block on read? If so, then...

    Does GetCricketDist() block on read? If so, then you should manually alternate between threads, i think.
    EDIT: ah, sorry, i thought 2nd thread is more often than 3rd (not 1st more than 2nd & 3rd).
  13. Replies
    37
    Views
    7,135

    If you have string like "char data[100];", or...

    If you have string like "char data[100];", or "char *data = malloc(100);", you can check individual characters with "index" operator. In both cases, data[0] is 1st letter, data[1] second, and so on...
  14. Replies
    5
    Views
    1,080

    http://www.rhide.com/preview.html (IDE around...

    http://www.rhide.com/preview.html
    (IDE around gcc)
  15. Replies
    9
    Views
    2,461

    Now, I'm impressed :D

    Now, I'm impressed :D
  16. I might suggest (sorry if i'm borring) that if...

    I might suggest (sorry if i'm borring) that if partial swapping of array data (between disk and ram) in-between loops around [x] might be too ineffiecient, maybe there's a USB flash disk, memory...
  17. If you need to do this calculations often (or few...

    If you need to do this calculations often (or few times), you could also benefit from async I/O, or using another thread to do loading/saving. That way you would do math and I/O at a same time...
  18. Yes, i expect swapping to be far more optimized...

    Yes, i expect swapping to be far more optimized too. But it does interest me, i must confess. I tryed alloc()ing 3GB on linux with 2GB, and it halted pretty strong for one minute before it crashed (I...
  19. But if you let OS do the swapping, it will most...

    But if you let OS do the swapping, it will most probably swap out pretty much everything it can (including itself partialy), so good custom file approach might be more efficient on 3-4 GB machines...
  20. If i had that problem as OP, i'd do it ;) EDIT:...

    If i had that problem as OP, i'd do it ;)
    EDIT: OS will most probably use swap file anyway, which gives you same "performance"...
  21. Replies
    6
    Views
    4,546

    Maybe you should generate some statictics about...

    Maybe you should generate some statictics about this function, like generate some random matrices and insert loop counters. Then isolate cases when loop counters get highest values and see which...
  22. Maybe using big fat file to hold array? Could...

    Maybe using big fat file to hold array? Could solve storage problem.
    (EDIT: "fat" as opposite of skinny)
  23. I can't tell for sure, but I know color prompts...

    I can't tell for sure, but I know color prompts caused trouble in terminals with long lines from day 0 (at least for me). Maybe the problem is in "\033[0m" which resets stuff. Try replacing it with...
  24. Replies
    39
    Views
    14,125

    Try "-L/opt/intel/fc/9.0/lib/" switch to tell...

    Try "-L/opt/intel/fc/9.0/lib/" switch to tell compiler where libraries are, specify it before -lifcore. If that won't work, maybe library is not 32-bit.
  25. Replies
    37
    Views
    7,135

    But, when people deviate from forum rules, and...

    But, when people deviate from forum rules, and are learning about english, knowledge, behaviour and hormone control, isn't that nice opporunity for others to practice something else (anything you...
Results 1 to 25 of 138
Page 1 of 6 1 2 3 4