@@ -189,8 +189,8 @@ class SequenceIdArg : public BufferArg {
189
189
SequenceIdArg (const TensorShape& shape, ArgType argType = UNSPECIFIED)
190
190
: BufferArg(VALUE_TYPE_INT32, shape, argType) {
191
191
bufferType_ = TENSOR_SEQUENCE_ID;
192
- CHECK_EQ (shape_.ndims (), ( size_t ) 1 );
193
- CHECK_GT (shape_[0 ], 1 );
192
+ CHECK_EQ (shape_.ndims (), 1UL );
193
+ CHECK_GT (shape_[0 ], 1UL );
194
194
numSeqs_ = shape_[0 ] - 1 ;
195
195
}
196
196
@@ -199,7 +199,7 @@ class SequenceIdArg : public BufferArg {
199
199
ArgType argType = UNSPECIFIED)
200
200
: BufferArg(buf, VALUE_TYPE_INT32, shape, argType) {
201
201
bufferType_ = TENSOR_SEQUENCE_ID;
202
- CHECK_EQ (shape_.ndims (), ( size_t ) 1 );
202
+ CHECK_EQ (shape_.ndims (), 1UL );
203
203
numSeqs_ = shape_[0 ] - 1 ;
204
204
}
205
205
@@ -280,9 +280,9 @@ class SparseMatrixArg : public BufferArg {
280
280
type_(static_cast <SparseDataType>(type)) {
281
281
bufferType_ = TENSOR_SPARSE;
282
282
CHECK ((valueType == VALUE_TYPE_FLOAT) || (valueType == VALUE_TYPE_DOUBLE));
283
- CHECK_EQ (shape_.ndims (), ( size_t ) 2 );
284
- CHECK_EQ (row_.shape ().ndims (), ( size_t ) 1 );
285
- CHECK_EQ (col_.shape ().ndims (), ( size_t ) 1 );
283
+ CHECK_EQ (shape_.ndims (), 2UL );
284
+ CHECK_EQ (row_.shape ().ndims (), 1UL );
285
+ CHECK_EQ (col_.shape ().ndims (), 1UL );
286
286
if (format_ == T_SPARSE_CSR) {
287
287
CHECK_EQ (nnz, col.shape ()[0 ]);
288
288
} else if (format_ == T_SPARSE_CSC) {
@@ -304,7 +304,7 @@ class SparseMatrixArg : public BufferArg {
304
304
type_(static_cast <SparseDataType>(type)) {
305
305
bufferType_ = TENSOR_SPARSE;
306
306
CHECK ((valueType == VALUE_TYPE_FLOAT) || (valueType == VALUE_TYPE_DOUBLE));
307
- CHECK_EQ (shape_.ndims (), ( size_t ) 2 );
307
+ CHECK_EQ (shape_.ndims (), 2UL );
308
308
309
309
// / len of row_ : height + 1 (CSR) or nnz (CSC), buf_ == nullptr
310
310
row_ = (format_ == T_SPARSE_CSR
@@ -325,7 +325,7 @@ class SparseMatrixArg : public BufferArg {
325
325
CHECK (buf_);
326
326
CHECK (valueType_ == DataType<real>::value);
327
327
// CHECK(deviceType_ == DType);
328
- CHECK_EQ (2 , shape_.ndims ());
328
+ CHECK_EQ (2UL , shape_.ndims ());
329
329
return typename Tensor<real, DType>::SparseMatrix (
330
330
reinterpret_cast <real*>(buf_),
331
331
reinterpret_cast <int *>(row_.data ()),
0 commit comments