|
I know about mmx, by this word I mean all multemedia extensions, it is SSE with floating points which I wonder about for my application if you need me to be more exact.
I can do it my self easely but dont want to waste time if some one done it before an got speed improvement, which I mean:
timemmx = [mem move from classes in vector<> array] + [SSE ops]
timefloat = [standart floating multiplications]
timemmx << timefloat! ??
Otherwise I will need to make much bigger changes in my code to get floating values from my vector<class> to align them in memory, which I'm reluctant.
9ine
|
|
|
|
|
i'm not sure anyone could say for sure without actually trying.
but, items in a vector are stored contiguously in memory, so you can treat them as a plain C++ array. (this is part of the 2003 C++ standard, IIRC - and all implementations store data that way regardless). so, you should be able to load the SSE registers directly from the contents of your vector.
Cleek | Image Toolkits | Thumbnail maker
|
|
|
|
|
actually not the floating points are stored in vector but class instances with floating numbers
class CTest
{
public:
CTest();
~CTest();
float val1;
float val2;
}
and we get this vector<CTest *> array and we need to
for(i=0; i<array.size(); i++)
res += array[i]->val1 * array[i]->val2;
if we can try it keeping in mind that data in vector is stored lineary hence val1 and val2 stored with the same stride in memory?
9ine
-- modified at 9:42 Wednesday 7th December, 2005
|
|
|
|
|
16:00 IST
Good Afternoon to all of you,
My problem is based on changing the mouse pointer at the button click .
Like in ms-paint on clicking the the line button the mouse icon gets changed.
I would be highly obliged for the early response
Thanks and regards
|
|
|
|
|
pankajgarg11 wrote: Like in ms-paint on clicking the the line button the mouse icon gets changed.
Is SetCursor Api is of any help?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
I am using VC 6.0. I am writing an MFC application where I use strings with the _T("") macro.(Character set neutral). Is there any way to convert from a LPTSTR to a float value. I noticed that the function _ttof does not exist in VC 6.0. Does anybody know how this conversion can be done.
Thx.
|
|
|
|
|
Hi
Use _tstof()
Bye,
Cool Ju
Dream Ur Destiny
|
|
|
|
|
_tstof() doesn't work.
C:\Projects\PCnt\XLConvDlg.cpp(835) : error C2065: '_tstof' : undeclared identifier
Thx
|
|
|
|
|
Hi,
Add math.h and stdlib.h
Bye,
Cool Ju
Dream Ur Destiny
|
|
|
|
|
Doesn't work. Same error.
|
|
|
|
|
|
Yes, but I want to use a character neutral set function.
Thx
|
|
|
|
|
paper67 wrote: Is there any way to convert from a LPTSTR to a float value.
what about _tcstod function
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
-- modified at 6:54 Tuesday 6th December, 2005
|
|
|
|
|
That's the one I need.
Thx a lot.
|
|
|
|
|
paper67 wrote: Thx a lot.
My Pleasure
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
How about the old standby, sscanf ? There is also a wide-character version, swscanf . If you've eliminated the whitespace around the string-represented floating-point value, then the following will work:
float fValue;
int nResult = sscanf((LPCTSTR)sData, "%f", &fValue);
if( nResult != 1 )
{
}
Bob Ciora
|
|
|
|
|
wcstod() contained in <stdlib.h >
~RaGE();
|
|
|
|
|
Is there ready lib or dll for VC++ to capture video from usb camera with available function to get a single captured frame to Memory Array in different types of byte stream (rgb,gray,yuv, etc...) or just in any one type?
9ine
|
|
|
|
|
if what cam ur using
if u r using logitech web cam
the sdk is avaliable in logitech site
u need to install driver first
any how ,if u r using any other u have lot many no of open sources
like vision, and lot many, search in google u will get lot many
All the best
bye
kattavictor
|
|
|
|
|
I found that windows sound recoder could show the "Sound Selection" dialog to let user set the format and attributes of the recorded audio file, some other programs could show the dialog too.
So I think there must be a windows API that could call this Dialog, I need it
in my program. Does anyone know how to call it?
http://www.yesalbum.com/v001/aisonbert/sound_selection_dlg.jpg[^]
Thanks in advance!
Bert
-- modified at 4:39 Tuesday 6th December, 2005
|
|
|
|
|
You can use some of the control panel functions and thus invoke it directly.
See this MSDN topic : Executing Control Panel Items
|
|
|
|
|
hi
i want to copy a variant into void* variable i.e.
void* voidpvar;
VARIANT varvar;
i cant do voidpvar=varvar or varvar=voidpvar
What to do?
thanks
|
|
|
|
|
|
i want to terminate any running programme. is any API call. pls tell me
|
|
|
|
|
TerminateProcess is what you are looking for.
|
|
|
|