Example #1
0
void FastWHT<CPU, double>::Transform(size_t num_rows, double* data)
{
	for (unsigned i = 0; i < num_rows; ++i)
	{
		wht_apply(wht_tree, 1, data + i * buf_len);
	}
}
Example #2
0
    void apply_inverse_impl(elem::Matrix<value_type>& A,
        skylark::sketch::columnwise_tag) const {
        double* AA = A.Buffer();
        int j;
#ifdef SKYLARK_HAVE_OPENMP
#pragma omp parallel for private(j)
#endif
        for (j = 0; j < A.Width(); j++)
            wht_apply(_tree, 1, AA + j * A.LDim());
    }
Example #3
0
    void apply_inverse_impl(elem::Matrix<value_type>& A,
        skylark::sketch::rowwise_tag) const {
        double* AA = A.Buffer();
        int j;
#ifdef SKYLARK_HAVE_OPENMP
#pragma omp parallel for private(j)
#endif
        for (j = 0; j < A.Width(); j++)
            wht_apply(_tree, A.Height(), AA + j);
        // Not sure stride is used correctly here.
    }
Example #4
0
void FastWHT<CPU, float>::Transform(size_t num_rows, float* data)
{
	for (unsigned row = 0; row < num_rows; ++row)
	{
		for (unsigned i = 0; i < buf_len; ++i)
			buffer[i] = (double)data[i];
		wht_apply(wht_tree, 1, buffer);
		for (unsigned i = 0; i < buf_len; ++i)
			data[i] = (float)buffer[i];
		data += buf_len;
	}
}