Ticket #14653: _dotblas.diff
File _dotblas.diff, 2.6 KB (added by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez), 17 years ago) |
---|
-
Packages/dotblas/dotblas/_dotblas.c
old new 253 253 ap1->dimensions[0], ap2->dimensions[1], ap2->dimensions[0], 254 254 1.0, (double *)ap1->data, lda, 255 255 (double *)ap2->data, ldb, 256 0.0, (double *)ret->data, ldb);256 0.0, (double *)ret->data, ret->dimensions[1]); 257 257 } 258 258 else if (typenum == PyArray_FLOAT) { 259 259 cblas_sgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans, 260 260 ap1->dimensions[0], ap2->dimensions[1], ap2->dimensions[0], 261 261 1.0, (float *)ap1->data, lda, 262 262 (float *)ap2->data, ldb, 263 0.0, (float *)ret->data, ldb);263 0.0, (float *)ret->data, ret->dimensions[1]); 264 264 } 265 265 else if (typenum == PyArray_CDOUBLE) { 266 266 cblas_zgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans, 267 267 ap1->dimensions[0], ap2->dimensions[1], ap2->dimensions[0], 268 268 oneD, (double *)ap1->data, lda, 269 269 (double *)ap2->data, ldb, 270 zeroD, (double *)ret->data, ldb);270 zeroD, (double *)ret->data, ret->dimensions[1]); 271 271 } 272 272 else if (typenum == PyArray_CFLOAT) { 273 273 cblas_cgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans, 274 274 ap1->dimensions[0], ap2->dimensions[1], ap2->dimensions[0], 275 275 oneF, (float *)ap1->data, lda, 276 276 (float *)ap2->data, ldb, 277 zeroF, (float *)ret->data, ldb);277 zeroF, (float *)ret->data, ret->dimensions[1]); 278 278 } 279 279 } 280 280 else { … … 530 530 ap1->dimensions[0], ap2->dimensions[0], ap1->dimensions[1], 531 531 1.0, (double *)ap1->data, lda, 532 532 (double *)ap2->data, ldb, 533 0.0, (double *)ret->data, ldb);533 0.0, (double *)ret->data, ret->dimensions[1]); 534 534 } 535 535 else if (typenum == PyArray_FLOAT) { 536 536 cblas_sgemm(CblasRowMajor, CblasNoTrans, CblasTrans, 537 537 ap1->dimensions[0], ap2->dimensions[0], ap1->dimensions[1], 538 538 1.0, (float *)ap1->data, lda, 539 539 (float *)ap2->data, ldb, 540 0.0, (float *)ret->data, ldb);540 0.0, (float *)ret->data, ret->dimensions[1]); 541 541 } 542 542 else if (typenum == PyArray_CDOUBLE) { 543 543 cblas_zgemm(CblasRowMajor, CblasNoTrans, CblasTrans, 544 544 ap1->dimensions[0], ap2->dimensions[0], ap1->dimensions[1], 545 545 oneD, (double *)ap1->data, lda, 546 546 (double *)ap2->data, ldb, 547 zeroD, (double *)ret->data, ldb);547 zeroD, (double *)ret->data, ret->dimensions[1]); 548 548 } 549 549 else if (typenum == PyArray_CFLOAT) { 550 550 cblas_cgemm(CblasRowMajor, CblasNoTrans, CblasTrans, 551 551 ap1->dimensions[0], ap2->dimensions[0], ap1->dimensions[1], 552 552 oneF, (float *)ap1->data, lda, 553 553 (float *)ap2->data, ldb, 554 zeroF, (float *)ret->data, ldb);554 zeroF, (float *)ret->data, ret->dimensions[1]); 555 555 } 556 556 } 557 557 else {