Exemple #1
0
 def stop(self, name=None):
     Timer.stop(self, name)
     hpm_stop(name)
Exemple #2
0
    # Random wave functions:
    shape = (M, G, G, G)
    np.random.seed(M)
    psit_mG = np.random.uniform(-0.5, 0.5, shape)
    tmp_mG = psit_mG.copy()

    # Overlap
    ttot = 0.0
    ta = time()
    reg = "Overlap" + str(B)
    hpm_start(reg)
    for n in range(Q - 1):
        gemm(dv, tmp_mG, psit_mG, 0.0, S_mm[n], 'c')
        tmp_mG, psit_mG = psit_mG, tmp_mG
    gemm(dv, tmp_mG, psit_mG, 0.0, S_mm[Q - 1], 'c')
    hpm_stop(reg)
    ttot = time() - ta

    # print "Overlap, B:", B, "Time:", ttot

    # Matrix multiply
    ttot = 0.0
    ta = time()
    reg = "Matrix_Mutiply" + str(B)
    hpm_start(reg)
    beta = 0.0
    for n in range(B - 1):
        C_mm = C_bnbn[0, :, n % B]
        gemm(1.0, tmp_mG, C_mm, beta, psit_mG)
        beta = 1.0
        tmp_mG, psit_mG = psit_mG, tmp_mG
Exemple #3
0
 def stop(self, name=None):
     Timer.stop(self, name)
     hpm_stop(name)
Exemple #4
0
    # Random wave functions:
    shape = (M, G, G, G)
    np.random.seed(M)
    psit_mG = np.random.uniform(-0.5, 0.5, shape)
    tmp_mG = psit_mG.copy()

    # Overlap
    ttot = 0.0
    ta = time()
    reg = "Overlap" + str(B)
    hpm_start(reg)
    for n in range(Q - 1):
        gemm(dv, tmp_mG, psit_mG, 0.0, S_mm[n], 'c')
        tmp_mG, psit_mG = psit_mG, tmp_mG
    gemm(dv, tmp_mG, psit_mG, 0.0, S_mm[Q - 1], 'c')
    hpm_stop(reg)
    ttot = time() - ta

    # print "Overlap, B:", B, "Time:", ttot

    # Matrix multiply
    ttot = 0.0
    ta = time()
    reg = "Matrix_Mutiply" + str(B)
    hpm_start(reg)
    beta = 0.0
    for n in range(B - 1):
        C_mm = C_bnbn[0, :, n % B] 
        gemm(1.0, tmp_mG, C_mm, beta, psit_mG)
        beta = 1.0
        tmp_mG, psit_mG = psit_mG, tmp_mG