BRL-CAD will optionally leverage SSE instructions for some operations but SSE-support is set at compile-time. If you attempt to perform SSE instructions on non-SSE hardware, it'll basically halt the application with an illegal instruction exception. That's a fancy way of saying it crashes. This task involves implementing a function (that will go into our LIBBU utility library) to reports whether SSE support is available at runtime. The most prevalent method for doing this is demonstrated by the Mesa folks where you set up an exception handler for SIGILL and attempt an SSE instruction. That's obviously a non-solution for Windows platforms, but is better than nothing and more useful than a Windows-only solution. Even better if you can handle both or implement a cross-platform solution. You'll implement a bu_sse_init() function that returns an error if SSE is not available at runtime. Code:
|
File name/URL | File size | Date submitted | |
---|---|---|---|
foo.txt | 1 byte | January 14 2013 02:53 UTC |
I would like to work on this task.
This task has been assigned to Silvrous. You have 48 hours to complete this task, good luck!
Melange has detected that the initial deadline has passed and it has set the task status to ActionNeeded. The student has 24 hours to submit the work before the task is reopened and sent back to the pool for other students to claim.
Melange has detected that the final deadline has passed and it has reopened the task.
I would like to work on this task.
This task has been assigned to Skriptkid. You have 48 hours to complete this task, good luck!
libbu/simd.c already has a function for runtime detection of SSE. Where should this be implemented? Or rather, where is SSE being used?
Would dynamic loading be the right path here? I've done reasearch for 5 hours, but I've found nothing that can help in toggling headers.
Need an extension. Please. Was not able to work on this yesteray and today. Started about 6 hours ago and still waiting for some help.
Melange has detected that the initial deadline has passed and it has set the task status to ActionNeeded. The student has 24 hours to submit the work before the task is reopened and sent back to the pool for other students to claim.
The deadline of the task has been extended with 1 days and 0 hours.
Dynamic loading would be a viable solution, but generally not desired. Better to just compile both the sse and non-see interface and toggle on it (e.g., in dvec) based on sse availability instead of using inheritance.
Should subclassing be done here? Since the definitions of members of dvec are different but prototypes are same, overloading is not possible. How else can they be toggled?
I guess I'm dropping this. I don't know C++, especially OOP in it, so no point breaking my head over this when i can do some other task, since this is the last day.
The work on this task is ready to be reviewed.
How can I unclaim?! There's no "Unclaim" option!
Congratulations, this task has been completed successfully.
As you noted, we technically have an implementation of runtime detection and you identifeid that feature available. You've also researched the classes involved in using the runtime detection (for considerable time), reaffirming that this is a complex task that will undoubtedly take substantial time (beyond the scope of gci). Thanks for your efforts. If you have any insights to share about what you found, you're welcome to comment here or via IRC.
The Melange interface apparently has several bugs when the final 24 hours approaches. The system seems to have stopped sending e-mails, tasks can't be published .. or claimed .. or unclaimed (yeah, wtf?) .. or edited. Some sort of lame duck status instead of just letting everything proceed up to the deadline.
Subclassing might be a good idea. You have the main(base) dvec class. Create two subclasses which inhert it. One for x86 and one for FPU. You have all the methods of dvec, but you're defining them seperately in each case and using them conditionally during runtime. But of course, this might need code changes in many places, and I don't know if derived classes can have multiple definitions for prototypes in parent class.(As I said, I dont know OOP in C++) But that's just one idea I have.
BTW, are you on IRC? I see no activity, considering there's only 10 hours left.