Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualme_12

Posted 14 October 2013 - 01:19 PM

Thank you for the reply.

 

Yep I know about the thread group size. But for example if your shader is configured so that you have [numthreads(64, 1, 1)] as thread group size you could dispatch(1,1,1) (one) of that group and still have a full 64 threads running. As far as I know you should always run a multiple of 64.

 

So, if we take my first example again:

ID3D11DeviceContext::Dispatch(10,1,1); // dispatches 10 x 64 threads -> 640
for(int i = 0; i < 10; i++)
  ID3D11DeviceContext::Dispatch(1,1,1); // dispatches 10 x 64 threads -> 640

Lets say I am forced to use the second "solution" for some complicated reason. I wonder how much worse it will be. Or what other disadvantage I would have.


#3me_12

Posted 14 October 2013 - 01:19 PM

Thank you for the reply.

 

Yep I know about the thread group size. But for example if your shader is configured so that you have [numthreads(64, 1, 1)] as thread group size you could dispatch(1,1,1) (one) of that group and still have a full 64 threads running. As far as i know you should always run a multiple of 64.

 

So, if we take my first example again:

ID3D11DeviceContext::Dispatch(10,1,1); // dispatches 10 x 64 threads -> 640
for(int i = 0; i < 10; i++)
  ID3D11DeviceContext::Dispatch(1,1,1); // dispatches 10 x 64 threads -> 640

Lets say I am forced to use the second "solution" for some complicated reason. I wonder how much worse it will be. Or what other disadvantage I would have.


#2me_12

Posted 14 October 2013 - 01:10 PM

Thank you for the reply.

 

Yep I know about the thread group size. But for example if your shader is configured so that you have [numthreads(64, 1, 1)] as thread group size you could dispatch(1,1,1) (one) of that group and still have a full 64 threads running.

 

So, if we take my first example again:

ID3D11DeviceContext::Dispatch(10,1,1); // dispatches 10 x 64 threads -> 640
for(int i = 0; i < 10; i++)
  ID3D11DeviceContext::Dispatch(1,1,1); // dispatches 10 x 64 threads -> 640

Lets say I am forced to use the second "solution" for some complicated reason. I wonder how much worse it will be. Or what other disadvantage I would have.


#1me_12

Posted 14 October 2013 - 01:10 PM

Thank you for the reply.

 

Yep I know about the thread group size. But for example if your shader is configured so that you have [numthreads(64, 1, 1)] as thread group size you could dispatch(1,1,1) (one) of that group and still have a full 64 threads running.

 

So, if we take my first example again:

ID3D11DeviceContext::Dispatch(10,1,1); // dispatches 10 x 64 threads -> 640
for(int i = 0; i < 10; i++)
  ID3D11DeviceContext::Dispatch(1,1,1); // dispatches 10 x 64 threads -> 640

Lets say I am forced to use the second "solution" for some complicated reason. I wonder how much worse it will be. Or what other disadvantage I would have.


PARTNERS