Skip to main content
Code Review

Return to Question

edited tags; edited title
Link
Jamal
  • 35.2k
  • 13
  • 134
  • 238

Improving run-time and max Max-digits of digit summing code

edited tags
Link
Jamal
  • 35.2k
  • 13
  • 134
  • 238
added 12 characters in body
Source Link
Jamal
  • 35.2k
  • 13
  • 134
  • 238

How many different numbers with n digits are there whose digits add up to k?

As this is an embarassinglyembarrassingly parallel problem I decided to use a bit of GPGPU programming (partly for learning purposes) using C++AMP and came up with the following solution:

Moreover, this only allows for up to 8-digits (because of the restriction of the maximum value being less than 2^31231-1) because the GPU only supports types of float, double, int, unsigned int and bool; is there a way to circumvent this and improve the maximum number of digits allowed?

How many different numbers with n digits are there whose digits add up to k

As this is an embarassingly parallel problem I decided to use a bit of GPGPU programming (partly for learning purposes) using C++AMP and came up with the following solution:

Moreover, this only allows for up to 8-digits (because of the restriction of the maximum value being less than 2^31-1) because the GPU only supports types of float, double, int, unsigned int and bool; is there a way to circumvent this and improve the maximum number of digits allowed?

How many different numbers with n digits are there whose digits add up to k?

As this is an embarrassingly parallel problem I decided to use a bit of GPGPU programming (partly for learning purposes) using C++AMP and came up with the following solution:

Moreover, this only allows for up to 8-digits (because of the restriction of the maximum value being less than 231-1) because the GPU only supports types of float, double, int, unsigned int and bool; is there a way to circumvent this and improve the maximum number of digits allowed?

Notice removed Draw attention by Community Bot
Bounty Ended with no winning answer by Community Bot
edited tags
Link
200_success
  • 145.5k
  • 22
  • 190
  • 479
Loading
Tweeted twitter.com/#!/StackCodeReview/status/398071100846145536
Clarified question
Source Link
Loading
edited tags
Link
200_success
  • 145.5k
  • 22
  • 190
  • 479
Loading
Notice added Draw attention by Thomas Russell
Bounty Started worth 50 reputation by Thomas Russell
Source Link
Loading
lang-cpp

AltStyle によって変換されたページ (->オリジナル) /