Box& Box::convert (const IntVect& typ) { BL_ASSERT(typ >= IntVect::TheZeroVector() && typ <= IntVect::TheUnitVector()); IntVect shft(typ - btype.ixType()); bigend += shft; btype = IndexType(typ); return *this; }
TileCell::TileCell(String const& rString, bool remoteFlag) { Strings const parts(rString, SEPARATOR); ASSERT(parts.Count() == 2); // TODO recovery String const first = parts.First(); mTile = Tile(IndexType(first), remoteFlag); mSwapFlag = true; String const second = parts.Second(); if (second != SWAP) { mCell = Cell(second); mSwapFlag = false; } }
__global__ void kernel_ell_csr_to_ell(const IndexType nrow, const IndexType max_row, const IndexType *src_row_offset, const IndexType *src_col, const ValueType *src_val, IndexType *ell_col, ValueType *ell_val) { IndexType ai = blockIdx.x*blockDim.x+threadIdx.x; IndexType aj; IndexType n; IndexType ell_ind; if (ai < nrow) { n = ValueType(0.0); // warp divergence! for (aj=src_row_offset[ai]; aj<src_row_offset[ai+1]; ++aj) { ell_ind = n * nrow + ai; ell_col[ell_ind] = src_col[aj]; ell_val[ell_ind] = src_val[aj]; ++n; } // warp divergence! for (aj=src_row_offset[ai+1]-src_row_offset[ai]; aj<max_row; ++aj) { ell_ind = n * nrow + ai; ell_col[ell_ind] = IndexType(-1); ell_val[ell_ind] = ValueType(0.0); ++n; } } }
IndexType QVtkTableModelRawVector::indexType() const { return IndexType(); }