Example #1
0
def test_check_contig_1():
    ac, ag = gen_gpuarray((50, 1, 20), 'float32', ctx=context)
    bc, bg = gen_gpuarray((50, 1, 20), 'float32', ctx=context)
    n, offsets, contig = check_contig((ag, bg))
    assert n == 1000
    assert offsets == (0, 0)
    assert contig
Example #2
0
def test_check_contig_1():
    ac, ag = gen_gpuarray((50, 1, 20), 'float32', ctx=context)
    bc, bg = gen_gpuarray((50, 1, 20), 'float32', ctx=context)
    n, offsets, contig = check_contig((ag, bg))
    assert n == 1000
    assert offsets == (0, 0)
    assert contig
Example #3
0
def test_check_contig_2():
    ac, ag = gen_gpuarray((50, 1, 20), 'float32', ctx=context)
    bc, bg = gen_gpuarray((50, 1, 20), 'float32', ctx=context, sliced=2)
    n, offsets, contig = check_contig((ag, bg))
    assert n == None
    assert offsets == None
    assert not contig
Example #4
0
def test_check_contig_2():
    ac, ag = gen_gpuarray((50, 1, 20), 'float32', ctx=context)
    bc, bg = gen_gpuarray((50, 1, 20), 'float32', ctx=context, sliced=2)
    n, offsets, contig = check_contig((ag, bg))
    assert n == None
    assert offsets == None
    assert not contig