添加插件
This commit is contained in:
16
Assets/Obi/Scripts/Common/Backends/Compute/ComputeMath.cs
Normal file
16
Assets/Obi/Scripts/Common/Backends/Compute/ComputeMath.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
namespace Obi
|
||||
{
|
||||
public static class ComputeMath
|
||||
{
|
||||
public static int ThreadGroupCount(int elements, int numThreads)
|
||||
{
|
||||
return elements / numThreads + 1;
|
||||
}
|
||||
|
||||
public static int NextMultiple(int baseNumber, int number)
|
||||
{
|
||||
return ((baseNumber / number) + 1) * number;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user