Пример #1
0
    def put_yz(self, e_or_h, f0, f1, axis, anx0, anx1):
        is_buf0 = True if isinstance(f0, cpu.BufferFields) else False
        is_buf1 = True if isinstance(f1, cpu.BufferFields) else False
        gf, sf = (f1, f0) if e_or_h == 'e' else (f0, f1)

        if is_buf0:
            ax0, ax1 = 'x', axis
        elif is_buf1:
            ax0, ax1 = axis, 'x'
        gax, sax = (ax1, ax0) if e_or_h == 'e' else (ax0, ax1)

        gstr = common_exchange.str_fs_dict[gax][e_or_h]
        sstr = common_exchange.str_fs_dict[sax][e_or_h]

        gpt0 = common_exchange.pt0_buf_dict(*gf.ns)[gax][e_or_h]['get']
        gpt1 = common_exchange.pt1_buf_dict(*gf.ns)[gax][e_or_h]['get']
        spt0 = common_exchange.pt0_dict(*sf.ns)[sax][e_or_h]['set']
        spt1 = common_exchange.pt1_dict(*sf.ns)[sax][e_or_h]['set']

        if (is_buf0 and e_or_h == 'e') or (is_buf1 and e_or_h == 'h'):  # sf
            spt0 = (spt0[0], anx0, spt0[2])
            spt1 = (spt1[0], anx1, spt1[2])
        else:
            gpt0 = (gpt0[0], anx0, gpt0[2])
            gpt1 = (gpt1[0], anx1, gpt1[2])

        self.put_getf_setf_list(e_or_h, gf, gstr, gpt0, gpt1, sf, sstr, spt0,
                                spt1)
        '''
Пример #2
0
    def put_yz(self, e_or_h, f0, f1, axis, anx0, anx1):
        is_buf0 = True if isinstance(f0, cpu.BufferFields) else False
        is_buf1 = True if isinstance(f1, cpu.BufferFields) else False
        gf, sf = (f1, f0) if e_or_h == 'e' else (f0, f1)

        if is_buf0:
            ax0, ax1 = 'x', axis
        elif is_buf1:
            ax0, ax1 = axis, 'x'
        gax, sax = (ax1, ax0) if e_or_h == 'e' else (ax0, ax1)

        gstr = common_exchange.str_fs_dict[gax][e_or_h]
        sstr = common_exchange.str_fs_dict[sax][e_or_h]

        gpt0 = common_exchange.pt0_buf_dict(*gf.ns)[gax][e_or_h]['get']
        gpt1 = common_exchange.pt1_buf_dict(*gf.ns)[gax][e_or_h]['get']
        spt0 = common_exchange.pt0_dict(*sf.ns)[sax][e_or_h]['set']
        spt1 = common_exchange.pt1_dict(*sf.ns)[sax][e_or_h]['set']

        if (is_buf0 and e_or_h=='e') or (is_buf1 and e_or_h=='h'):   # sf
            spt0 = (spt0[0], anx0, spt0[2])
            spt1 = (spt1[0], anx1, spt1[2])
        else:
            gpt0 = (gpt0[0], anx0, gpt0[2])
            gpt1 = (gpt1[0], anx1, gpt1[2])

        self.put_getf_setf_list(e_or_h, gf, gstr, gpt0, gpt1, sf, sstr, spt0, spt1)

        '''
Пример #3
0
    def put_x(self, e_or_h, f0, f1):
        gf, sf = (f1, f0) if e_or_h == 'e' else (f0, f1)
        strfs = common_exchange.str_fs_dict['x'][e_or_h]

        if isinstance(f0, cpu.BufferFields) or isinstance(f1, cpu.BufferFields):
            gpt0 = common_exchange.pt0_buf_dict(*gf.ns)['x'][e_or_h]['get']
            gpt1 = common_exchange.pt1_buf_dict(*gf.ns)['x'][e_or_h]['get']
        else:
            gpt0 = common_exchange.pt0_dict(*gf.ns)['x'][e_or_h]['get']
            gpt1 = common_exchange.pt1_dict(*gf.ns)['x'][e_or_h]['get']

        spt0 = common_exchange.pt0_dict(*sf.ns)['x'][e_or_h]['set']
        spt1 = common_exchange.pt1_dict(*sf.ns)['x'][e_or_h]['set']

        self.put_getf_setf_list(e_or_h, gf, strfs, gpt0, gpt1, sf, strfs, spt0, spt1)
Пример #4
0
    def put_x(self, e_or_h, f0, f1):
        gf, sf = (f1, f0) if e_or_h == 'e' else (f0, f1)
        strfs = common_exchange.str_fs_dict['x'][e_or_h]

        if isinstance(f0, cpu.BufferFields) or isinstance(
                f1, cpu.BufferFields):
            gpt0 = common_exchange.pt0_buf_dict(*gf.ns)['x'][e_or_h]['get']
            gpt1 = common_exchange.pt1_buf_dict(*gf.ns)['x'][e_or_h]['get']
        else:
            gpt0 = common_exchange.pt0_dict(*gf.ns)['x'][e_or_h]['get']
            gpt1 = common_exchange.pt1_dict(*gf.ns)['x'][e_or_h]['get']

        spt0 = common_exchange.pt0_dict(*sf.ns)['x'][e_or_h]['set']
        spt1 = common_exchange.pt1_dict(*sf.ns)['x'][e_or_h]['set']

        self.put_getf_setf_list(e_or_h, gf, strfs, gpt0, gpt1, sf, strfs, spt0,
                                spt1)