Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Read / Allocate Cores
#2
Do you propose a project that would take advantage of it? Because QB64(PE) is a programming language for hobbyists, not for technology enthusiasts. Most people care about it running old QuickBASIC/QBasic code much faster and efficiently than the old M$ products, and they will be on single-core CPU's.

If you're really that worried about assigning cores to tasks, you should learn C++. It will also require a good threading library that will exclude pretty much the single- and dual-core CPU's. This is even more essential with ARM. Note that QB64(PE) emphasizes Windows perhaps too much so there is less attention paid to Linux and MacOS according to performance. It will work, and that's all that other people ask for.

There is a way to retrieve what is the CPU, and it might even report on the number of cores it has. However, allocating for threads is not that easy, and impossible without a library especially designed for it.



On some Linux OS could use "lscpu" command to get information about the CPU, including the number of cores.

But programming for it could be a headache as this article demonstrates:

https://unix.stackexchange.com/questions...-cpu-cores

Also Linux specific:

https://www.man7.org/linux/man-pages/man7/cpuset.7.html
https://www.man7.org/linux/man-pages/man...ity.2.html

There will be different ways to do it with Win32 API which might be portable to 64-bit.
Reply


Messages In This Thread
Read / Allocate Cores - by dISP - 04-06-2023, 12:17 PM
RE: Read / Allocate Cores - by mnrvovrfc - 04-06-2023, 01:31 PM
RE: Read / Allocate Cores - by dISP - 04-06-2023, 03:29 PM
RE: Read / Allocate Cores - by mnrvovrfc - 04-06-2023, 09:48 PM
RE: Read / Allocate Cores - by MasterGy - 04-06-2023, 07:37 PM
RE: Read / Allocate Cores - by dISP - 04-06-2023, 08:54 PM
RE: Read / Allocate Cores - by DSMan195276 - 04-10-2023, 03:54 AM
RE: Read / Allocate Cores - by mnrvovrfc - 04-10-2023, 07:51 AM
RE: Read / Allocate Cores - by mnrvovrfc - 04-21-2023, 06:10 PM
RE: Read / Allocate Cores - by dISP - 04-25-2023, 12:14 PM
RE: Read / Allocate Cores - by dISP - 04-25-2023, 12:23 PM



Users browsing this thread: 1 Guest(s)