def __init__(self, shape=[1]): gr.sync_block.__init__(self, name="add 2 f32") self.add_port(gr.port_f("in1", gr.INPUT, shape)) self.add_port(gr.port_f("in2", gr.INPUT, shape)) self.add_port(gr.port_f("in3", gr.INPUT, shape, optional=True)) self.add_port(gr.port_f("out", gr.OUTPUT, shape))
def __init__(self): gr.hier_block.__init__(self, 'hwrap') self.add_port(gr.port_f("hin", gr.INPUT)) self.add_port(gr.port_f("hout1", gr.OUTPUT)) self.add_port(gr.port_f("hout2", gr.OUTPUT)) cp1 = streamops.copy(gr.sizeof_float) cp2 = streamops.copy(gr.sizeof_float) self.connect(self, 0, cp1, 0) self.connect(self, 0, cp2, 0) self.connect(cp1, 0, self, 0) self.connect(cp2, 0, self, 1)
def __init__(self, shape=[1]): gr.cupy_sync_block.__init__(self, name="add 2 f32") self.add_port(gr.port_f("in", gr.INPUT, shape)) self.add_port(gr.port_f("out", gr.OUTPUT, shape))