Core

Reply
Accepted Solution

Making full use of the 4 Cores...

So how can we effectively make use of the 4 CPU cores within the PS Vita?

 

Any examples of streaming levels in the background?

 

Will our games/app scale well from single core to multi-core devices?

 

Is there anything special we should keep in mind in terms of multi-threading and multi-core programming?

 

Please use plain text.

Re: Making full use of the 4 Cores...

 

Hi @CartBlance,

 

If you write a multi-threaded program, those threads are automatically executed using all available CPU cores.

 

However, please keep in mind that the number of CPU cores available are different on each device, so please assume that multi-core programming is not good idea.

 



PlayStation®Mobile Dev Team
Please use plain text.

Re: Making full use of the 4 Cores...

Thanks for the clarification James.

 

So a simple demo/sample on how to scale to available device power would be quite nice, explaining how you would change the LOD on a mobile device compared to PS Vita and PS3.

 

Just a thought.

Please use plain text.

Re: Making full use of the 4 Cores...

Will you provide a capability API so that apps can learn at runtime what the hardware can or cannot handle?

 

If I knew I am running on 4 cores, I would do different things.

 

Also, will it be possible to assign certain threads to certain cores?

 

artistsmeetprogrammers.com
Please use plain text.

Level 2

Level 2
mdiza
Posts: 12
Registered: ‎27-12-2011
Message 5 of 29 (2,637 Views)

Re: Making full use of the 4 Cores...


SolidSlug wrote:

Will you provide a capability API so that apps can learn at runtime what the hardware can or cannot handle?

 

If I knew I am running on 4 cores, I would do different things.

 

Also, will it be possible to assign certain threads to certain cores?

 


You can use Environment.ProcessorCount to find out how many processors there are.

 

Then you can use the Tasks Parallel Library (part of PS Suite) to do much of the heavy lifting for you:

 

http://msdn.microsoft.com/en-us/library/dd460717.aspx

Miguel de Icaza -- miguel@xamarin.com
Please use plain text.

Re: Making full use of the 4 Cores...

Miguel,
  On a PS3, will Environment.ProcessorCount also list the SPUs or just the main processors?
D.

mdiza wrote:

You can use Environment.ProcessorCount to find out how many processors there are.

 

Then you can use the Tasks Parallel Library (part of PS Suite) to do much of the heavy lifting for you:

 

http://msdn.microsoft.com/en-us/library/dd460717.aspx


 

Please use plain text.

Level 2

Level 2
mdiza
Posts: 12
Registered: ‎27-12-2011
Message 7 of 29 (2,616 Views)

Re: Making full use of the 4 Cores...


CartBlanche wrote:
Miguel,
  On a PS3, will Environment.ProcessorCount also list the SPUs or just the main processors?
D.

mdiza wrote:

You can use Environment.ProcessorCount to find out how many processors there are.

 

Then you can use the Tasks Parallel Library (part of PS Suite) to do much of the heavy lifting for you:

 

http://msdn.microsoft.com/en-us/library/dd460717.aspx


 


There is no port of the CLI to the SPUs, and programming an SPU typically uses different resources, so it would make no sense to report anything but one.

Miguel de Icaza -- miguel@xamarin.com
Please use plain text.

Re: Making full use of the 4 Cores...

[ Edited ]

Miguel,

Am I right to assume Sony licensed the Mono runtime from you guys?
Can you also confirm that SCE's libraries run directly on top of the Mono runtime, which runs directly on top of the Linux Kernel?

 

Just want to make Dalvik is never involved in the case of PSS.

artistsmeetprogrammers.com
Please use plain text.

Re: Making full use of the 4 Cores...

[ Edited ]

Miguel,

 

Have you guys checked out http://code.google.com/p/celldotnet/ ? (that is if you guys are looking to incorporate SPUs into Mono in some way)

It seems like a cool idea, JIT'ing the IR code to SPU instructions. Obviously doesn't support every language feature but that's not really the point of SPUs anyways.

Please use plain text.

Re: Making full use of the 4 Cores...

The youtube video is down now, but I remember from a 2011 GDC video that neither native Vita nor PSS programs will have access to all four cores. One is reserved for the OS.
Please use plain text.
Announcements

Welcome to the PlayStation Mobile Developer Forums


This is a community for the discussion of technical topics with other developers and SCE engineers. Posting ideas/requests are also appreciated. Join the discussion!

PlayStation®Mobile開発者フォーラムでは世界中の開発者の皆様と一緒に、議論や情報交換が可能です。SCEも議論に参加し、皆様の開発をサポートします。アイデアやリクエストも大歓迎です。ぜひご参加ください。

PSM Developer Registration (for free) on PSM DevPortal is required to post on the forum.
Please sign out then sign in again to the forum and PSM DevPortal after you have completed the registration.

フォーラムへ投稿をするにはPSM DevPortalへの登録(無料)が必要です。
登録後はフォーラムと PSM DevPortalを一度ログアウトし、再度ログインしてください。