@@ -389,11 +389,19 @@ struct general_matrix_vector_product<Index, stan::math::var, LhsMapper,
389
389
}
390
390
};
391
391
392
+ #if EIGEN_VERSION_AT_LEAST(3, 3, 8)
393
+ template <typename Index, int LhsStorageOrder, bool ConjugateLhs,
394
+ int RhsStorageOrder, bool ConjugateRhs, int ResInnerStride>
395
+ struct general_matrix_matrix_product <
396
+ Index, stan::math::var, LhsStorageOrder, ConjugateLhs, stan::math::var,
397
+ RhsStorageOrder, ConjugateRhs, ColMajor, ResInnerStride> {
398
+ #else
392
399
template <typename Index, int LhsStorageOrder, bool ConjugateLhs,
393
400
int RhsStorageOrder, bool ConjugateRhs>
394
401
struct general_matrix_matrix_product <Index, stan::math::var, LhsStorageOrder,
395
402
ConjugateLhs, stan::math::var,
396
403
RhsStorageOrder, ConjugateRhs, ColMajor> {
404
+ #endif
397
405
using LhsScalar = stan::math::var;
398
406
using RhsScalar = stan::math::var;
399
407
using ResScalar = stan::math::var;
@@ -406,11 +414,21 @@ struct general_matrix_matrix_product<Index, stan::math::var, LhsStorageOrder,
406
414
= const_blas_data_mapper<stan::math::var, Index, RhsStorageOrder>;
407
415
408
416
EIGEN_DONT_INLINE
417
+ #if EIGEN_VERSION_AT_LEAST(3, 3, 8)
418
+ static void run (Index rows, Index cols, Index depth, const LhsScalar* lhs,
419
+ Index lhsStride, const RhsScalar* rhs, Index rhsStride,
420
+ ResScalar* res, Index resIncr, Index resStride,
421
+ const ResScalar& alpha,
422
+ level3_blocking<LhsScalar, RhsScalar>& /* blocking */ ,
423
+ GemmParallelInfo<Index>* /* info = 0 */ )
424
+ #else
409
425
static void run (Index rows, Index cols, Index depth, const LhsScalar* lhs,
410
426
Index lhsStride, const RhsScalar* rhs, Index rhsStride,
411
427
ResScalar* res, Index resStride, const ResScalar& alpha,
412
428
level3_blocking<LhsScalar, RhsScalar>& /* blocking */ ,
413
- GemmParallelInfo<Index>* /* info = 0 */ ) {
429
+ GemmParallelInfo<Index>* /* info = 0 */ )
430
+ #endif
431
+ {
414
432
for (Index i = 0 ; i < cols; i++) {
415
433
general_matrix_vector_product<
416
434
Index, LhsScalar, LhsMapper, LhsStorageOrder, ConjugateLhs, RhsScalar,
@@ -426,7 +444,7 @@ struct general_matrix_matrix_product<Index, stan::math::var, LhsStorageOrder,
426
444
: rhsStride,
427
445
&res[i * resStride], 1 , alpha);
428
446
}
429
- }
447
+ } // namespace internal
430
448
431
449
EIGEN_DONT_INLINE
432
450
static void run (Index rows, Index cols, Index depth,
0 commit comments