Пример #1
0
def vectors(cache):
    vecs = ['CommonDenseVector', 'CommonSparseVector']
    if codegen.have_eigen(cache):
        vecs.extend(['EigenDenseVector', 'EigenMappedDenseVector'])
    if codegen.have_istl(cache):
        vecs.append('IstlDenseVector')
    return vecs
Пример #2
0
def matrices(cache):
    mat = [
        'CommonDenseMatrix', 'CommonSparseMatrixCsr', 'CommonSparseMatrixCsc', 'CommonSparseOrDenseMatrixCsr',
        'CommonSparseOrDenseMatrixCsc'
    ]
    if codegen.have_eigen(cache):
        mat.extend(['EigenRowMajorSparseMatrix', 'EigenDenseMatrix'])
    if codegen.have_istl(cache):
        mat.append('IstlRowMajorSparseMatrix')
    return mat
Пример #3
0
def type_ok(t, cache):
    if sum(['Eigen' in x for x in t]):
        return have_eigen(cache)
    if sum(['Istl' in x for x in t]):
        return have_istl(cache)
    return True
Пример #4
0
def _ok(ft):
    if 'Eigen' in ft[0]:
        return have_eigen(cache)
    return True