Exemple #1
0
    def _plan_WhiteNoise(self, ops):
        assert all(op.input is None for op in ops)

        self._init_cl_rng()
        Y = self.all_data[[self.sidx[op.output] for op in ops]]
        scale = self.RaggedArray([op.process.scale for op in ops],
                                 dtype=np.int32)
        enums, params = get_dist_enums_params([op.process.dist for op in ops])
        enums = CLRaggedArray(self.queue, enums)
        params = CLRaggedArray(self.queue, params)
        dt = self.model.dt
        return [plan_whitenoise(self.queue, Y, enums, params, scale, dt,
                                self.cl_rng_state)]
Exemple #2
0
    def _plan_WhiteNoise(self, ops):
        assert all(op.input is None for op in ops)

        self._init_cl_rng()
        Y = self.all_data[[self.sidx[op.output] for op in ops]]
        scale = self.RaggedArray([op.process.scale for op in ops],
                                 dtype=np.int32)
        enums, params = get_dist_enums_params([op.process.dist for op in ops])
        enums = CLRaggedArray(self.queue, enums)
        params = CLRaggedArray(self.queue, params)
        dt = self.model.dt
        return [
            plan_whitenoise(self.queue, Y, enums, params, scale, dt,
                            self.cl_rng_state)
        ]
Exemple #3
0
    def _plan_WhiteNoise(self, ops):
        assert all(op.input is None for op in ops)

        rngs = create_rngs(self.queue, len(ops))
        self._cl_rngs[rngs] = [op.process.seed for op in ops]

        Y = self.all_data[[self.sidx[op.output] for op in ops]]
        scale = self.Array([op.process.scale for op in ops], dtype=np.int32)
        inc = self.Array([op.mode == 'inc' for op in ops], dtype=np.int32)
        enums, params = get_dist_enums_params([op.process.dist for op in ops])
        enums = CLRaggedArray(self.queue, enums)
        params = CLRaggedArray(self.queue, params)
        dt = self.model.dt
        return [plan_whitenoise(
            self.queue, Y, enums, params, scale, inc, dt, rngs)]
Exemple #4
0
    def _plan_WhiteNoise(self, ops):
        assert all(op.input is None for op in ops)

        rngs = create_rngs(self.queue, len(ops))
        self._cl_rngs[rngs] = [op.process.seed for op in ops]

        Y = self.all_data[[self.sidx[op.output] for op in ops]]
        scale = self.Array([op.process.scale for op in ops], dtype=np.int32)
        inc = self.Array([op.mode == 'inc' for op in ops], dtype=np.int32)
        enums, params = get_dist_enums_params([op.process.dist for op in ops])
        enums = CLRaggedArray(self.queue, enums)
        params = CLRaggedArray(self.queue, params)
        dt = self.model.dt
        return [
            plan_whitenoise(self.queue, Y, enums, params, scale, inc, dt, rngs)
        ]