如何解决C ++使用默认模板值显式实例化类,倒数第二个值除外
这可能是一个非常简单的问题。
我有以下(模板化的)类定义。
template <
/// Element type for A matrix operand
typename ElementA_,/// Layout type for A matrix operand
typename LayoutA_,/// Element type for B matrix operand
typename ElementB_,/// Layout type for B matrix operand
typename LayoutB_,/// Element type for C and D matrix operands
typename ElementC_,/// Layout type for C and D matrix operands
typename LayoutC_,/// Element type for internal accumulation
typename ElementAccumulator_ = ElementC_,/// Operator class tag
typename OperatorClass_ = arch::OpClassSimt,/// Tag indicating architecture to tune for
typename ArchTag_ = arch::Sm70,//... a lot more typename´s with default values...,typename Operator_ = typename DefaultGemmConfiguration<
OperatorClass_,ArchTag_,ElementA_,ElementB_,ElementC_,ElementAccumulator_>::Operator,/// Whether Beta is zero or not
bool IsBetaZero = false>
class Gemm {
public:
...
我想用所有默认模板类型实例化该类,除了一种,实际上是模板列表中倒数第二个。这该怎么做?我的猜测是这样的:
using CutlassGemm = cutlass::gemm::device::Gemm<float,// Data-type of A matrix
ColumnMajor,// Layout of A matrix
float,// Data-type of B matrix
ColumnMajor,// Layout of B matrix
float,// Data-type of C matrix
ColumnMajor,default,// a lot more default values
default,arch::MinimumAddOp,// <---- this one should NOT be the default
default>; // Layout of C matrix
// Define a CUTLASS GEMM type
CutlassGemm gemm_operator;
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。