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...
Type: Posts; User: rasta_freak
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...
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,...
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...
http://gcc.gnu.org/onlinedocs/gcc/Variadic-Macros.html#Variadic-Macros
(## removes comma if va_args is empty)
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...
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...
Did you try "unsigned long long" ? (64-bit unsinged. Maybe (just maybe) it will be enough).
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...
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...
You need to reset j to 0 after that commented-out while loop...
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...
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).
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...
http://www.rhide.com/preview.html
(IDE around gcc)
Now, I'm impressed :D
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...
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...
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...
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...
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"...
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...
Maybe using big fat file to hold array? Could solve storage problem.
(EDIT: "fat" as opposite of skinny)
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...
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.
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...