compute.hpp 535 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#ifndef COMPUTE_H
#define COMPUTE_H

#include <cmath>
#include <vector>
#include <boost/align/aligned_allocator.hpp>

template <typename T>
using aligned_allocator = boost::alignment::aligned_allocator<T, 64>;
template <typename T>
using aligned_vector = std::vector<T, aligned_allocator<T>>;

constexpr float PI = 3.141592635;
constexpr float TWO_PI = 6.28318530718;  // 2 * PI;

float compute(float alpha, float beta, aligned_vector<float> seed_x,
plgruener's avatar
plgruener committed
17
          aligned_vector<float> seed_y, int num_iterations, float threshold);
18
#endif