示例#1
0
            def _(k):
                # randomly assign the component
                j         = qy.random_int(N)
                component = StridedArray.from_typed_pointer(out.at(k).data.gep(0, 1))

                j.store(assigns.at(k).data)

                self._sub_emitter.map(
                    prior.at(k),
                    samples.at(j).envelop(),
                    weights.at(j).envelop(),
                    component,
                    )
示例#2
0
            def _(k):
                # randomly assign the component
                j = qy.random_int(N)
                component = StridedArray.from_typed_pointer(
                    out.at(k).data.gep(0, 1))

                j.store(assigns.at(k).data)

                self._sub_emitter.map(
                    prior.at(k),
                    samples.at(j).envelop(),
                    weights.at(j).envelop(),
                    component,
                )
示例#3
0
        def _(_):
            v = qy.random_int(2)

            @qy.python(v)
            def _(v_py):
                values.append(v_py)