コード例 #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
コード例 #2
0
ファイル: test_tools.py プロジェクト: NeutralCode/libgpuarray
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
コード例 #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
コード例 #4
0
ファイル: test_tools.py プロジェクト: NeutralCode/libgpuarray
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