305 typedef decltype(this->a_dfad_) FadFadType;
310 auto a_dfad = this->a_dfad_;
311 auto b_dfad = this->b_dfad_;
312 auto c_dfad = this->c_dfad_;
313 auto a_fad = this->a_fad_;
314 auto b_fad = this->b_fad_;
315 auto c_fad = this->c_fad_;
317 FadFadType aa_dfad = a_dfad + 1.0;
318 c_dfad =
max(aa_dfad, a_dfad);
320 for (
int i=0; i<this->n1; i++) {
322 COMPARE_FADS(c_dfad.fastAccessDx(i), aa_dfad.fastAccessDx(i));
325 c_dfad =
max(a_dfad, aa_dfad);
327 for (
int i=0; i<this->n1; i++) {
329 COMPARE_FADS(c_dfad.fastAccessDx(i), aa_dfad.fastAccessDx(i));
332 c_dfad =
max(a_dfad+1.0, a_dfad);
334 for (
int i=0; i<this->n1; i++) {
336 COMPARE_FADS(c_dfad.fastAccessDx(i), aa_dfad.fastAccessDx(i));
339 c_dfad =
max(a_dfad, a_dfad+1.0);
341 for (
int i=0; i<this->n1; i++) {
343 COMPARE_FADS(c_dfad.fastAccessDx(i), aa_dfad.fastAccessDx(i));
346 val = a_dfad.val() + 1;
347 c_dfad =
max(a_dfad,
val);
349 for (
int i=0; i<this->n1; i++) {
353 val = a_dfad.val() - 1;
354 c_dfad =
max(a_dfad,
val);
356 for (
int i=0; i<this->n1; i++) {
358 COMPARE_FADS(c_dfad.fastAccessDx(i), a_dfad.fastAccessDx(i));
361 val = b_dfad.val() + 1;
362 c_dfad =
max(
val, b_dfad);
364 for (
int i=0; i<this->n1; i++) {
368 val = b_dfad.val() - 1;
369 c_dfad =
max(
val, b_dfad);
371 for (
int i=0; i<this->n1; i++) {
373 COMPARE_FADS(c_dfad.fastAccessDx(i), b_dfad.fastAccessDx(i));
378 typedef decltype(this->a_dfad_) FadFadType;
383 auto a_dfad = this->a_dfad_;
384 auto b_dfad = this->b_dfad_;
385 auto c_dfad = this->c_dfad_;
386 auto a_fad = this->a_fad_;
387 auto b_fad = this->b_fad_;
388 auto c_fad = this->c_fad_;
390 FadFadType aa_dfad = a_dfad - 1.0;
391 c_dfad =
min(aa_dfad, a_dfad);
393 for (
int i=0; i<this->n1; i++) {
395 COMPARE_FADS(c_dfad.fastAccessDx(i), aa_dfad.fastAccessDx(i));
398 c_dfad =
min(a_dfad, aa_dfad);
400 for (
int i=0; i<this->n1; i++) {
402 COMPARE_FADS(c_dfad.fastAccessDx(i), aa_dfad.fastAccessDx(i));
405 val = a_dfad.val() - 1;
406 c_dfad =
min(a_dfad,
val);
408 for (
int i=0; i<this->n1; i++) {
412 val = a_dfad.val() + 1;
413 c_dfad =
min(a_dfad,
val);
415 for (
int i=0; i<this->n1; i++) {
417 COMPARE_FADS(c_dfad.fastAccessDx(i), a_dfad.fastAccessDx(i));
420 val = b_dfad.val() - 1;
421 c_dfad =
min(
val, b_dfad);
423 for (
int i=0; i<this->n1; i++) {
427 val = b_dfad.val() + 1;
428 c_dfad =
min(
val, b_dfad);
430 for (
int i=0; i<this->n1; i++) {
432 COMPARE_FADS(c_dfad.fastAccessDx(i), b_dfad.fastAccessDx(i));
523 typedef decltype(this->a_dfad_) FadFadType;
527 auto a_dfad = this->a_dfad_;
529 FadFadType
a, b,
c, cc;
535 ScalarType f = pow(
a.val().val(), b.val().val());
536 ScalarType fp = b.val().val()*pow(
a.val().val(),b.val().val()-1);
537 ScalarType fpp = b.val().val()*(b.val().
val()-1)*pow(
a.val().val(),b.val().val()-2);
538 cc = FadFadType(this->n1,
FadType(this->n2,f));
539 for (
int i=0; i<this->n2; ++i)
540 cc.val().fastAccessDx(i) = fp*
a.val().dx(i);
541 for (
int i=0; i<this->n1; ++i) {
542 cc.fastAccessDx(i) =
FadType(this->n2,fp*
a.dx(i).val());
543 for (
int j=0; j<this->n2; ++j)
544 cc.fastAccessDx(i).fastAccessDx(j) = fpp*
a.dx(i).val()*
a.val().dx(j) + fp*
a.dx(i).dx(j);
551 c = pow(
a, b.val().val());
557 cc.val() =
FadType(this->n2,1.0);
558 for (
int i=0; i<this->n1; ++i)
559 cc.fastAccessDx(i) = 0.0;
564 cc.val() =
FadType(this->n2,1.0);
565 for (
int i=0; i<this->n1; ++i)
566 cc.fastAccessDx(i) = 0.0;
568 c = pow(
a, b.val().val());
579 for (
int i=0; i<this->n1; ++i)
580 cc.fastAccessDx(i) =
FadType(this->n2,0.0);
589 for (
int i=0; i<this->n1; ++i)
590 cc.fastAccessDx(i) =
FadType(this->n2,0.0);
592 c = pow(
a, b.val().val());
598 for (
int i=0; i<this->n1; ++i)
599 cc.fastAccessDx(i) = 0.0;
606 c = pow(
a, b.val().val());
614 f = pow(
a.val().val(), b.val().val());
615 fp = b.val().val()*pow(
a.val().val(),b.val().val()-1);
616 fpp = b.val().val()*(b.val().
val()-1)*pow(
a.val().val(),b.val().val()-2);
617 cc = FadFadType(this->n1,
FadType(this->n2,f));
618 for (
int i=0; i<this->n2; ++i)
619 cc.val().fastAccessDx(i) = fp*
a.val().dx(i);
620 for (
int i=0; i<this->n1; ++i) {
621 cc.fastAccessDx(i) =
FadType(this->n2,fp*
a.dx(i).val());
622 for (
int j=0; j<this->n2; ++j)
623 cc.fastAccessDx(i).fastAccessDx(j) = fpp*
a.dx(i).val()*
a.val().dx(j) + fp*
a.dx(i).dx(j);
632 c = pow(
a, b.val().val());
644 c = pow(
a, b.val().val());
650 cc.val() =
FadType(this->n2, 1.0);
651 for (
int i=0; i<this->n1; ++i)
652 cc.fastAccessDx(i) = 0.0;
658 c = pow(
a, b.val().val());
REGISTER_TYPED_TEST_SUITE_P(FadBLASUnitTests, testSCAL1, testSCAL2, testSCAL3, testSCAL4, testCOPY1, testCOPY2, testCOPY3, testCOPY4, testAXPY1, testAXPY2, testAXPY3, testAXPY4, testDOT1, testDOT2, testDOT3, testDOT4, testNRM21, testNRM22, testGEMV1, testGEMV2, testGEMV3, testGEMV4, testGEMV5, testGEMV6, testGEMV7, testGEMV8, testGEMV9, testTRMV1, testTRMV2, testTRMV3, testTRMV4, testGER1, testGER2, testGER3, testGER4, testGER5, testGER6, testGER7, testGEMM1, testGEMM2, testGEMM3, testGEMM4, testGEMM5, testGEMM6, testGEMM7, testGEMM8, testGEMM9, testGEMM10, testSYMM1, testSYMM2, testSYMM3, testSYMM4, testSYMM5, testSYMM6, testSYMM7, testSYMM8, testSYMM9, testTRMM1, testTRMM2, testTRMM3, testTRMM4, testTRMM5, testTRMM6, testTRMM7, testTRSM1, testTRSM2, testTRSM3, testTRSM4, testTRSM5, testTRSM6, testTRSM7)