File tree Expand file tree Collapse file tree
drivers/cpp/benchmarks/reduce/26_reduce_product_of_inverses Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ struct Context {
2323};
2424
2525void reset (Context *ctx) {
26- fillRand (ctx->x , 0 .0 , 100.0 );
26+ fillRand (ctx->x , 1 .0 , 100.0 );
2727 BCAST (ctx->x , DOUBLE);
2828}
2929
@@ -58,7 +58,7 @@ bool validate(Context *ctx) {
5858 const size_t numTries = MAX_VALIDATION_ATTEMPTS;
5959 for (int trialIter = 0 ; trialIter < numTries; trialIter += 1 ) {
6060 // set up input
61- fillRand (x, 0 .0 , 100.0 );
61+ fillRand (x, 1 .0 , 100.0 );
6262 BCAST (x, DOUBLE);
6363
6464 // compute correct result
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ struct Context {
2727};
2828
2929void reset (Context *ctx) {
30- fillRand (ctx->h_x , 0 .0 , 100.0 );
30+ fillRand (ctx->h_x , 1 .0 , 100.0 );
3131 COPY_H2D (ctx->d_x , ctx->h_x .data (), ctx->N * sizeof (double ));
3232
3333 double tmp = 1.0 ;
@@ -73,7 +73,7 @@ bool validate(Context *ctx) {
7373 const size_t numTries = MAX_VALIDATION_ATTEMPTS;
7474 for (int trialIter = 0 ; trialIter < numTries; trialIter += 1 ) {
7575 // set up input
76- fillRand (h_x, 0 .0 , 100.0 );
76+ fillRand (h_x, 1 .0 , 100.0 );
7777 COPY_H2D (d_x, h_x.data (), TEST_SIZE * sizeof (double ));
7878
7979 double tmp = 1.0 ;
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ struct Context {
3030};
3131
3232void reset (Context *ctx) {
33- fillRand (ctx->x_host , 0 .0 , 100.0 );
33+ fillRand (ctx->x_host , 1 .0 , 100.0 );
3434
3535 copyVectorToView (ctx->x_host , ctx->xNonConst );
3636 ctx->x = ctx->xNonConst ;
@@ -68,7 +68,7 @@ bool validate(Context *ctx) {
6868 const size_t numTries = MAX_VALIDATION_ATTEMPTS;
6969 for (int trialIter = 0 ; trialIter < numTries; trialIter += 1 ) {
7070 // set up input
71- fillRand (x_host, 0 .0 , 100.0 );
71+ fillRand (x_host, 1 .0 , 100.0 );
7272 copyVectorToView (x_host, xNonConst);
7373 Kokkos::View<const double *> x = xNonConst;
7474
You can’t perform that action at this time.
0 commit comments