Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove use of libcudf's CUDA_HOST_DEVICE macro #475

Merged
merged 2 commits into from
Jan 11, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions cpp/src/spatial/lonlat_to_cartesian.cu
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,14 @@ constexpr double earth_circumference_km = 40000.0;
constexpr double earth_circumference_km_per_degree = earth_circumference_km / 360.0;
constexpr double deg_to_rad = M_PI / 180;

CUDA_HOST_DEVICE_CALLABLE
double midpoint(double a, double b) { return (a + b) / 2; }
__device__ inline double midpoint(double a, double b) { return (a + b) / 2; }

CUDA_HOST_DEVICE_CALLABLE
double lon_to_x(double lon, double lat)
__device__ inline double lon_to_x(double lon, double lat)
{
return lon * earth_circumference_km_per_degree * cos(lat * deg_to_rad);
};

CUDA_HOST_DEVICE_CALLABLE
double lat_to_y(double lat) { return lat * earth_circumference_km_per_degree; };
__device__ inline double lat_to_y(double lat) { return lat * earth_circumference_km_per_degree; };

struct lonlat_to_cartesian_functor {
template <typename T, typename... Args>
Expand Down