|
No, and it shouldn't really be a surprise. When Windows XP was designed (2001, remember!), multi-core processors (the whole idea of multiple independent processing units of one piece of silicon) hadn't been thought of, so Windows XP didn't include support for multi-core.
Adding support may sound easy at first glance, but it cuts across many different parts of the system, so isn't easy to do.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
ok fine. Is there anyway to find number of processor and number of cores using any freeware library.
I want to use it from windows 2000 onwards.
Give a good solution
|
|
|
|
|
|
You can use the cpuid assembly instruction to get this information, it will require some assembly knowledge. I wrote the following functions a few years ago, you may want to check that they return the correct values.
__inline BOOL IsHyperThreaded()
{
BOOL bHyperthread = 0;
__asm
{
xor eax, eax
cpuid
cmp eax, 1
jb end
xor eax, eax
inc eax
cpuid
test edx, 0x10000000
jz end
mov dword ptr [bHyperthread], 1
end:
}
return bHyperthread;
}
__inline unsigned int PhysicalCores()
{
unsigned int cores = 1;
__asm
{
xor eax, eax
cpuid
cmp eax, 4
jb end
mov eax, 4
xor ecx, ecx
cpuid
shr eax, 26
and eax, 0x1F
add eax, 1
mov dword ptr [cores], eax
end:
}
return cores;
}
__inline unsigned int CpuCores()
{
unsigned int cores = 0;
__asm
{
xor eax, eax
cpuid
cmp eax, 4
jl single
mov eax, 4
xor ecx, ecx
cpuid
mov cores, eax
jmp multi
single:
xor eax, eax
multi:
}
return (unsigned int)((cores & 0xFC000000) >> 26)+1;
}
__inline unsigned int LogicalCores()
{
unsigned int cores = 1;
__asm
{
xor eax, eax
cpuid
cmp eax, 1
jb end
xor eax, eax
inc eax
cpuid
test edx, 0x10000000
jz end
mov eax, ebx
and eax, 0x00FF0000
shr eax, 16
mov cores, eax
end:
}
return cores;
}
My code will not work on the MSVC 64 bit compiler, if you are creating a 64 bit application then you will need to use the CPUID intrinsics[^]
Best Wishes,
-David Delaune
|
|
|
|
|
dear sir/madam,
i m doing a project on " embedded matlab "
I have to convert matlab functions to C so i need c code of imresize(image resize) matlab function
Please forward me C codes . or guide me what I can do ?
kindly waiting for the reply
|
|
|
|
|
Follow the steps mentioned below.
1.read the forum guide lines first.
2.specify your problem very clearly.
3.if nobody answers you, it means that,
a>people who know the answer are not in the forum right now or
b>your question is not proper and understandable.
4.if it is not answered, then reposting your question multiple times would no way be helpful to you.
5. in this case, instead of reposting, try to put your question in a more elaborated way, such that you may get atleat clues to proceed further.
6.please delete the multiple posts. and retain only one. that will help you better.
hope you know how to delete and edit your posts. if not ask it here, i will guide you.
--------------------------------------------
Suggestion to the members:
Please prefix your main thread subject with [SOLVED] if it is solved.
thanks.
chandu.
|
|
|
|
|
ashish_24188 wrote: I have to convert matlab functions to C so i need c code of imresize(image resize) matlab function
What you really meant to say was "I have to convert matlab functions to C so i need to learn how to write c code from matlab function source code". The .m files for imrotate and imresize are included with Matlab. They are quite well documented and Matlab code isn't all that different from C.
In addition, you could use Google to search for something like "convert matlab code to c" - that's more likely to yield something of use than spamming CodeProject forums with ill thought out questions like you've been doing.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
I have installed the eVC4.0, But it can't start up
with message"Microsoft eMbedded Visual C++ has discovered no CE platform SDK
installed on the desktop. Please install at least one CE platform SDK before
launching Microsoft eMbedded Visual C++."
How can I do?
Thanks.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
"_$h@nky_" wrote: How can I do?
Have you seen here[^]?
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
|
Hi All
I am useing mysql and i am able to established the connection through this code.
CDatabase database;
try
{
if(database.OpenEx(_T("Driver={MySQL ODBC 5.1 Driver};Server=localhost;Database="";User=root; Password=root;Option=3;"), CDatabase::noOdbcDialog))
{
AfxMessageBox("Connection Successfully");
}
}
catch(CException *e)
{
AfxMessageBox("Connection Failed");
}
Now i want to fetch list all databases is ableble.
|
|
|
|
|
|
dear sir/madam,
i m doing a project on " embedded matlab "
I have to convert matlab functions to C so i need c code of imrotate(image rotate) matlab function
Please forward me C codes . or guide me what I can do ?
kindly waiting for the reply
|
|
|
|
|
Hello,
Read the guidelines[^] before you post anything further.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
hi sir/madam i need c code(c programing) of matlab function imrotate(image rotate)so plz help me
|
|
|
|
|
since the default user interface in visual c++ is not very good, I don't want to use the default the buttons, the combo box, the edit,...
how can i do? Are there some good article and codes that can be used?
modified on Monday, June 29, 2009 12:03 AM
|
|
|
|
|
You can always subclass the existing controls and create your own using bitmaps..there are lots of links on CodeProject itself.
|
|
|
|
|
thanks a lot, for visual c++ ,is there any specified link on codeproject for beginners? or the link of some good articles?
|
|
|
|
|
does any one knows it? thks a lot
|
|
|
|
|
Hi~ I'm a student from Korea. I don't know how to explain with Engilish well. sorry for that.
I would like to make a program that can prevent thef lap top.
For example, If someone lost lap top, the someone would like to find out and doesn't would like to be used it by thef.
You know what I mean?? sorry..
I would like to prevent format HDD.I don't know how to that. Could you tell me the method?
I had a idea,but I don't know that is possible.
that is if the program could prevent to enter CMOS and boot with CD,
the thef couldn't format HDD (my program) then the program would send mail with IP address.
I would like to make the program like that... Could I prevent format HDD with source ??
1. Could I set up bios password with source without cmos?
2. Could I fix to boot only HDD??(Can't boot with CD For that purpous is to prevent format)
Could you help me please..
I'm looking foward to answering ..thanks
|
|
|
|
|
You can't do that in software, because you can't prevent the thief from putting the drive in another computer and formatting it there. Nor can you prevent him from taking a big magnet and erasing the drive that way. A better solution is to encrypt the drive, so if it is stolen, the thief can't read the data on the drive. Take a look at TrueCrypt[^]
There are also companies that offer services for tracking the laptop if it is stolen. One of them used to be a CP contest sponsor, but I can't remember the name right now.
|
|
|
|
|
Thanks for reply
I got it.. thanks ..
What I mean is this is supposition.
Most of them won't know about computer very well so they will just use the lap top only..
Could I ask something??
Is it possible that I can default setting CMOS and just fix?
that mean is even though the thef try to change setting CMOS or CD boot, the CMOS setting just fix.
I heard that was already used in public Pc( PC cafe). sorry
|
|
|
|
|
what ever happened to microsofts "BitLocker" anyone remember the hype about that? seems to have fizzed out to nothing
|
|
|
|
|
BitLocker is still around, I rarely hear anything about it though. TrueCrypt is the app I hear mentioned most often.
--Mike--
|
|
|
|
|
Thanks for your reply..
Have a good day !!
I will research BitLocker and TrueCrypt.
|
|
|
|