473,396 Members | 1,676 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Checking for multiple processors

Its been a long time since I've done any c++ programming; however, I've
run into a situation at work where it would be very useful to be able
to write a small piece of custom code. I can do most of it, but one
very important part is checking to see if the server the code is
running on has multiple processors (it will be running under Windows
NT). Does anyone know how to have the program check the number of
processors without relying on setup.log (which is the source of our
whole problem)?

Jul 23 '05 #1
3 1209
ib***@yahoo.com wrote:
Its been a long time since I've done any c++ programming; however, I've
run into a situation at work where it would be very useful to be able
to write a small piece of custom code. I can do most of it, but one
very important part is checking to see if the server the code is
running on has multiple processors (it will be running under Windows
NT). Does anyone know how to have the program check the number of
processors without relying on setup.log (which is the source of our
whole problem)?


Check the 'NUMBER_OF_PROCESSORS' environment variable.

But the question (and my answer) is off-topic, unfortunately. C++ has
no means to show this information, you have to use some kind of method
specific to the OS, so ask in comp.os.ms-windows.programmer.win32.

V
Jul 23 '05 #2

i...@yahoo.com wrote:
Its been a long time since I've done any c++ programming; however, I've run into a situation at work where it would be very useful to be able
to write a small piece of custom code. I can do most of it, but one
very important part is checking to see if the server the code is
running on has multiple processors (it will be running under Windows
NT). Does anyone know how to have the program check the number of
processors without relying on setup.log (which is the source of our
whole problem)?


Have you ever thought of looking inside the case - always works!
But seriously, it is the pertinent group for this question (system
programming), so the qualifications you expect here shouldn't be given
any weight to.

Good Luck!

Jul 23 '05 #3
thanks!

Jul 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Michael Schmitt | last post by:
Hello. What is the usual way for running functions in parallel on a multiple-processor machine. Actually I want to run a single computationally expensive function with different parameter sets....
11
by: Ohaya | last post by:
Hi, I'm trying to understand a situation where ASP seems to be "blocking" of "queuing" requests. This is on a Win2K Advanced Server, with IIS5. I've seen some posts (e.g.,...
9
by: Abhishek Srivastava | last post by:
Hello All, In IIS 6.0 We have a concept of worker processes and application pools. As I understand it, we can have multiple worker process per appliction pool. Each worker process is dedicated...
21
by: jacob navia | last post by:
Many compilers check printf for errors, lcc-win32 too. But there are other functions that would be worth to check, specially memset. Memset is used mainly to clear a memory zone, receiving a...
4
by: noel.yim | last post by:
Hi, First question is: I want to assign 8 threads to 8 processors (must one to one), when I initialize the thread, does it guarantee that each CPU has one thread? or there can be some case such...
0
by: rbg | last post by:
Have a web application which uses Data Cache. I need to understand what happens when a new instance of the same web application is created for for serving concurrent clients. What happens when...
125
by: jacob navia | last post by:
We hear very often in this discussion group that bounds checking, or safety tests are too expensive to be used in C. Several researchers of UCSD have published an interesting paper about this...
16
by: WATYF | last post by:
Hi there... I have a huge text file that needs to be processed. At the moment, I'm loading it into memory in small chunks (x amount of lines) and processing it that way. I'd like the process to be...
2
by: Victory | last post by:
Do i need to use a special class if i need to code on computer with multiple processors. I need to make sure that all of the CPU resources are used to process the code. Is there a way to do this?...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.