1 #include "../Shared/funcannotations.h"
6 #include <corecrt_math_defines.h>
42 double Acos(
const double x) {
47 double Asin(
const double x) {
52 double Atan(
const double x) {
62 double Atan2(
const double y,
const double x) {
92 double Cos(
const double x) {
97 double Cosh(
const double x) {
102 double Cot(
const double x) {
108 return x * (180.0 /
M_PI);
142 double ln(
const double x) {
152 double Log(
const double x) {
177 double power(
const double x,
const double y) {
183 return x * (
M_PI / 180.0);
187 double Round(
const double x,
const int32_t y) {
189 return round(x) + 0.0;
192 double exp = pow(10, y);
193 #if defined(__powerpc__) && !defined(__CUDACC__)
195 exp = 10 * powf((
float)10L, yy);
197 return (round(x * exp) / exp) + 0.0;
201 float Round__(
const float x,
const int32_t y) {
203 return roundf(x) + 0.0f;
206 float exp = powf((
float)10L, y);
207 #if defined(__powerpc__) && !defined(__CUDACC__)
209 exp = 10 * powf((
float)10L, yy);
211 return roundf(x * exp) / exp + 0.0f;
215 int16_t
Round__1(
const int16_t x,
const int32_t y) {
220 int32_t p = pow((
float)10L, std::abs(y));
221 int32_t p_half = p >> 1;
224 #if defined(__powerpc__) && !defined(__CUDACC__)
230 temp = temp >= 0 ? temp + p_half : temp - p_half;
236 int32_t
Round__2(
const int32_t x,
const int32_t y) {
241 int32_t p = pow((
float)10L, std::abs(y));
242 int32_t p_half = p >> 1;
245 #if defined(__powerpc__) && !defined(__CUDACC__)
251 temp = temp >= 0 ? temp + p_half : temp - p_half;
257 int64_t
Round__3(
const int64_t x,
const int32_t y) {
262 int64_t p = pow((
double)10L, std::abs(y));
263 int64_t p_half = p >> 1;
266 temp = temp >= 0 ? temp + p_half : temp - p_half;
272 int64_t
Round__4(
const int64_t x,
const int32_t y0,
const int32_t scale) {
273 int32_t y = y0 - scale;
279 int64_t p = pow((
double)10L, std::abs(y));
280 int64_t p_half = p >> 1;
283 temp = temp >= 0 ? temp + p_half : temp - p_half;
290 double exp = pow(10, y);
291 return round(x * exp) / exp;
296 double exp = pow(10, y);
297 return round(x * exp) / exp;
301 double Sin(
const double x) {
316 double Tan(
const double x) {
332 double p = pow((
double)10L, y);
333 int64_t temp = x * p;
339 float p = powf((
float)10L, y);
340 int64_t temp = x * p;
349 int32_t p = pow((
float)10L, std::abs(y));
350 int64_t temp = x / p;
351 #if defined(__powerpc__) && !defined(__CUDACC__)
366 int32_t p = pow((
float)10L, std::abs(y));
367 int64_t temp = x / p;
376 int64_t p = pow((
double)10L, std::abs(y));
377 int64_t temp = x / p;
383 return std::isnan(x);
388 return std::isnan(x);
393 return std::isinf(x);
398 return std::isinf(x);
403 return x * 111319.490778;
408 return 6378136.99911 * log(tan(.00872664626 * y + .785398163397));
434 const double fromlat,
436 const double tolat) {
437 double latitudeArc = (fromlat - tolat) * 0.017453292519943295769236907684886;
438 double longitudeArc = (fromlon - tolon) * 0.017453292519943295769236907684886;
439 double latitudeH = sin(latitudeArc * 0.5);
440 latitudeH *= latitudeH;
441 double lontitudeH = sin(longitudeArc * 0.5);
442 lontitudeH *= lontitudeH;
443 double tmp = cos(fromlat * 0.017453292519943295769236907684886) *
444 cos(tolat * 0.017453292519943295769236907684886);
445 return 6372797.560856 * (2.0 * asin(sqrt(latitudeH + tmp * lontitudeH)));
453 float latitudeArc = (fromlat - tolat) * 0.017453292519943295769236907684886;
454 float longitudeArc = (fromlon - tolon) * 0.017453292519943295769236907684886;
455 float latitudeH = sinf(latitudeArc * 0.5);
456 latitudeH *= latitudeH;
457 float lontitudeH = sinf(longitudeArc * 0.5);
458 lontitudeH *= lontitudeH;
459 float tmp = cosf(fromlat * 0.017453292519943295769236907684886) *
460 cosf(tolat * 0.017453292519943295769236907684886);
461 return 6372797.560856 * (2.0 * asinf(sqrtf(latitudeH + tmp * lontitudeH)));
470 float latitudeArc = (fromlat - tolat) * 0.017453292519943295769236907684886;
471 float longitudeArc = (fromlon - tolon) * 0.017453292519943295769236907684886;
472 float latitudeH = __sinf(latitudeArc * 0.5);
473 latitudeH *= latitudeH;
474 float lontitudeH = __sinf(longitudeArc * 0.5);
475 lontitudeH *= lontitudeH;
476 float tmp = __cosf(fromlat * 0.017453292519943295769236907684886) *
477 __cosf(tolat * 0.017453292519943295769236907684886);
478 return 6372797.560856 * (2.0 * asinf(__fsqrt_rd(latitudeH + tmp * lontitudeH)));
488 const int32_t numbins,
489 const int32_t dimensionsize) {
491 float numbinsf = float(numbins);
492 return float(int32_t(
float((val - min) / (max - min)) * numbinsf)) *
493 float(dimensionsize) / numbinsf;
500 const double rectwidth,
501 const double offsetx,
502 const int32_t imgwidth) {
503 const float imgwidthf = float(imgwidth);
504 const float rectwidthf = float(rectwidth);
506 float offset = offsetx;
508 offset = fmodf(offset, rectwidthf);
510 offset -= rectwidthf;
512 min += offset * (maxx - minx) / imgwidthf;
514 return float(int32_t(
float((valx - min) / (maxx - min)) * (imgwidthf - offset) /
517 offset + rectwidthf / 2.0f;
524 const double rectheight,
525 const double offsety,
526 const int32_t imgheight) {
527 const float imgheightf = float(imgheight);
528 const float rectheightf = rectheight;
530 float offset = offsety;
532 offset = fmodf(offset, rectheightf);
534 offset -= rectheightf;
536 min += offset * (maxy - miny) / imgheightf;
538 return float(int32_t(
float((valy - min) / (maxy - min)) * (imgheightf - offset) /
541 offset + rectheightf / 2.0f;
551 const double rectwidth,
552 const double rectheight,
553 const double offsetx,
554 const double offsety,
555 const int32_t imgwidth,
556 const int32_t imgheight) {
557 const float imgwidthf = float(imgwidth);
558 const float rectwidthf = float(rectwidth);
560 float offset = offsetx;
562 offset = fmodf(offset, rectwidthf);
564 offset -= rectwidthf;
566 min += offset * (maxx - minx) / imgwidthf;
568 float rx = float(int32_t(
float((valx - min) / (maxx - min)) * (imgwidthf - offset) /
571 offset + rectwidthf / 2.0f;
573 const float imgheightf = float(imgheight);
574 const float rectheightf = rectheight;
578 offset = fmodf(offset, rectheightf);
580 offset -= rectheightf;
582 min += offset * (maxy - miny) / imgheightf;
584 float ry = float(int32_t(
float((valy - min) / (maxy - min)) * (imgheightf - offset) /
587 offset + rectheightf / 2.0f;
590 int32_t ux =
static_cast<int32_t
>(rx * 4.0f);
591 int32_t uy =
static_cast<int32_t
>(ry * 4.0f);
592 return (ux & 0x7FFF) | ((uy & 0x7FFF) << 16);
602 const double hexwidth,
603 const double hexheight,
604 const double offsetx,
605 const double offsety,
606 const int32_t imgwidth,
607 const int32_t imgheight) {
608 const float sqrt3 = 1.7320508075688772;
609 const float imgwidthf = float(imgwidth);
610 const float imgheightf = float(imgheight);
611 const float hexwidthf = float(hexwidth);
612 const float hexheightf = float(hexheight);
620 float xoffset = offsetx;
622 xoffset = fmodf(xoffset, hexwidthf);
624 xoffset -= hexwidthf;
626 xmin += xoffset * (maxx - xmin) / imgwidthf;
630 float yoffset = offsety;
632 yoffset = fmodf(yoffset, 1.5
f * hexheightf);
634 yoffset -= 1.5f * hexheightf;
636 ymin += yoffset * (maxy - ymin) / imgheightf;
643 roundf((imgwidthf - xoffset) *
float((valx - xmin) / (maxx - xmin)));
645 roundf((imgheightf - yoffset) *
float((valy - ymin) / (maxy - ymin)));
649 const float hexsize = hexheightf / 2.0f;
650 const float cube_x = ((pix_x / sqrt3) - (pix_y / 3.0
f)) / hexsize;
651 const float cube_z = (pix_y * 2.0f / 3.0f) / hexsize;
652 const float cube_y = -cube_x - cube_z;
655 float rx = round(cube_x);
656 float ry = round(cube_y);
657 float rz = round(cube_z);
658 const float x_diff = fabs(rx - cube_x);
659 const float y_diff = fabs(ry - cube_y);
660 const float z_diff = fabs(rz - cube_z);
661 if (x_diff > y_diff && x_diff > z_diff) {
663 }
else if (y_diff > z_diff) {
670 return hexsize * sqrt3 * (rx + rz / 2.0f) + xoffset;
680 const double hexwidth,
681 const double hexheight,
682 const double offsetx,
683 const double offsety,
684 const int32_t imgwidth,
685 const int32_t imgheight) {
686 const float sqrt3 = 1.7320508075688772;
687 const float imgwidthf = float(imgwidth);
688 const float imgheightf = float(imgheight);
689 const float hexwidthf = float(hexwidth);
690 const float hexheightf = float(hexheight);
698 float xoffset = offsetx;
700 xoffset = fmodf(xoffset, hexwidthf);
702 xoffset -= hexwidthf;
704 xmin += xoffset * (maxx - xmin) / imgwidthf;
708 float yoffset = offsety;
710 yoffset = fmodf(yoffset, 1.5
f * hexheightf);
712 yoffset -= 1.5f * hexheightf;
714 ymin += yoffset * (maxy - ymin) / imgheightf;
721 roundf((imgwidthf - xoffset) *
float((valx - xmin) / (maxx - xmin)));
723 roundf((imgheightf - yoffset) *
float((valy - ymin) / (maxy - ymin)));
727 const float hexsize = hexheightf / 2.0f;
728 const float cube_x = ((pix_x / sqrt3) - (pix_y / 3.0
f)) / hexsize;
729 const float cube_z = (pix_y * 2.0f / 3.0f) / hexsize;
730 const float cube_y = -cube_x - cube_z;
733 float rx = round(cube_x);
734 float ry = round(cube_y);
735 float rz = round(cube_z);
736 const float x_diff = fabs(rx - cube_x);
737 const float y_diff = fabs(ry - cube_y);
738 const float z_diff = fabs(rz - cube_z);
739 if ((x_diff <= y_diff || x_diff <= z_diff) && y_diff <= z_diff) {
744 return hexsize * 3.0f / 2.0f * rz + yoffset;
754 const double hexwidth,
755 const double hexheight,
756 const double offsetx,
757 const double offsety,
758 const int32_t imgwidth,
759 const int32_t imgheight) {
760 const float sqrt3 = 1.7320508075688772;
761 const float imgwidthf = float(imgwidth);
762 const float imgheightf = float(imgheight);
763 const float hexwidthf = float(hexwidth);
764 const float hexheightf = float(hexheight);
772 float xoffset = offsetx;
774 xoffset = fmodf(xoffset, hexwidthf);
776 xoffset -= hexwidthf;
778 xmin += xoffset * (maxx - xmin) / imgwidthf;
782 float yoffset = offsety;
784 yoffset = fmodf(yoffset, 1.5
f * hexheightf);
786 yoffset -= 1.5f * hexheightf;
788 ymin += yoffset * (maxy - ymin) / imgheightf;
795 roundf((imgwidthf - xoffset) *
float((valx - xmin) / (maxx - xmin)));
797 roundf((imgheightf - yoffset) *
float((valy - ymin) / (maxy - ymin)));
801 const float hexsize = hexheightf / 2.0f;
802 const float cube_x = ((pix_x / sqrt3) - (pix_y / 3.0
f)) / hexsize;
803 const float cube_z = (pix_y * 2.0f / 3.0f) / hexsize;
804 const float cube_y = -cube_x - cube_z;
807 float rx = round(cube_x);
808 float ry = round(cube_y);
809 float rz = round(cube_z);
810 const float x_diff = fabs(rx - cube_x);
811 const float y_diff = fabs(ry - cube_y);
812 const float z_diff = fabs(rz - cube_z);
813 if (x_diff > y_diff && x_diff > z_diff) {
815 }
else if (y_diff <= z_diff) {
820 float hx = hexsize * sqrt3 * (rx + rz / 2.0f) + xoffset;
821 float hy = hexsize * 3.0f / 2.0f * rz + yoffset;
824 int32_t ux =
static_cast<int32_t
>(hx * 4.0f);
825 int32_t uy =
static_cast<int32_t
>(hy * 4.0f);
826 return (ux & 0x7FFF) | ((uy & 0x7FFF) << 16);
836 const double hexwidth,
837 const double hexheight,
838 const double offsetx,
839 const double offsety,
840 const int32_t imgwidth,
841 const int32_t imgheight) {
842 const float sqrt3 = 1.7320508075688772;
843 const float imgwidthf = float(imgwidth);
844 const float imgheightf = float(imgheight);
845 const float hexwidthf = float(hexwidth);
846 const float hexheightf = float(hexheight);
854 float xoffset = offsetx;
856 xoffset = fmodf(xoffset, 1.5
f * hexwidthf);
858 xoffset -= 1.5f * hexwidthf;
860 xmin += xoffset * (maxx - xmin) / imgwidthf;
864 float yoffset = offsety;
866 yoffset = fmodf(yoffset, hexheightf);
868 yoffset -= hexheightf;
870 ymin += yoffset * (maxy - ymin) / imgheightf;
877 roundf((imgwidthf - xoffset) *
float((valx - xmin) / (maxx - xmin)));
879 roundf((imgheightf - yoffset) *
float((valy - ymin) / (maxy - ymin)));
883 const float hexsize = hexwidthf / 2.0f;
884 const float cube_x = (pix_x * 2.0f / 3.0f) / hexsize;
885 const float cube_z = ((pix_y / sqrt3) - (pix_x / 3.0
f)) / hexsize;
886 const float cube_y = -cube_x - cube_z;
889 float rx = round(cube_x);
890 float ry = round(cube_y);
891 float rz = round(cube_z);
892 const float x_diff = fabs(rx - cube_x);
893 const float y_diff = fabs(ry - cube_y);
894 const float z_diff = fabs(rz - cube_z);
895 if (x_diff > y_diff && x_diff > z_diff) {
900 return hexsize * 3.0f / 2.0f * rx + xoffset;
910 const double hexwidth,
911 const double hexheight,
912 const double offsetx,
913 const double offsety,
914 const int32_t imgwidth,
915 const int32_t imgheight) {
916 const float sqrt3 = 1.7320508075688772;
917 const float imgwidthf = float(imgwidth);
918 const float imgheightf = float(imgheight);
919 const float hexwidthf = float(hexwidth);
920 const float hexheightf = float(hexheight);
928 float xoffset = offsetx;
930 xoffset = fmodf(xoffset, 1.5
f * hexwidthf);
932 xoffset -= 1.5f * hexwidthf;
934 xmin += xoffset * (maxx - xmin) / imgwidthf;
938 float yoffset = offsety;
940 yoffset = fmodf(yoffset, hexheightf);
942 yoffset -= hexheightf;
944 ymin += yoffset * (maxy - ymin) / imgheightf;
950 const float pix_x = roundf((imgwidthf - xoffset) * (valx - xmin) / (maxx - xmin));
951 const float pix_y = roundf((imgheightf - yoffset) * (valy - ymin) / (maxy - ymin));
955 const float hexsize = hexwidthf / 2.0f;
956 const float cube_x = (pix_x * 2.0f / 3.0f) / hexsize;
957 const float cube_z = ((pix_y / sqrt3) - (pix_x / 3.0
f)) / hexsize;
958 const float cube_y = -cube_x - cube_z;
961 float rx = round(cube_x);
962 float ry = round(cube_y);
963 float rz = round(cube_z);
964 const float x_diff = fabs(rx - cube_x);
965 const float y_diff = fabs(ry - cube_y);
966 const float z_diff = fabs(rz - cube_z);
967 if (x_diff > y_diff && x_diff > z_diff) {
969 }
else if (y_diff > z_diff) {
976 return hexsize * sqrt3 * (rz + rx / 2.0f) + yoffset;
986 const double hexwidth,
987 const double hexheight,
988 const double offsetx,
989 const double offsety,
990 const int32_t imgwidth,
991 const int32_t imgheight) {
992 const float sqrt3 = 1.7320508075688772;
993 const float imgwidthf = float(imgwidth);
994 const float imgheightf = float(imgheight);
995 const float hexwidthf = float(hexwidth);
996 const float hexheightf = float(hexheight);
1004 float xoffset = offsetx;
1006 xoffset = fmodf(xoffset, 1.5
f * hexwidthf);
1008 xoffset -= 1.5f * hexwidthf;
1010 xmin += xoffset * (maxx - xmin) / imgwidthf;
1014 float yoffset = offsety;
1016 yoffset = fmodf(yoffset, hexheightf);
1018 yoffset -= hexheightf;
1020 ymin += yoffset * (maxy - ymin) / imgheightf;
1026 const float pix_x = roundf((imgwidthf - xoffset) *
float(valx - xmin) / (maxx - xmin));
1027 const float pix_y = roundf((imgheightf - yoffset) *
float(valy - ymin) / (maxy - ymin));
1031 const float hexsize = hexwidthf / 2.0f;
1032 const float cube_x = (pix_x * 2.0f / 3.0f) / hexsize;
1033 const float cube_z = ((pix_y / sqrt3) - (pix_x / 3.0
f)) / hexsize;
1034 const float cube_y = -cube_x - cube_z;
1037 float rx = round(cube_x);
1038 float ry = round(cube_y);
1039 float rz = round(cube_z);
1040 const float x_diff = fabs(rx - cube_x);
1041 const float y_diff = fabs(ry - cube_y);
1042 const float z_diff = fabs(rz - cube_z);
1043 if (x_diff > y_diff && x_diff > z_diff) {
1045 }
else if (y_diff <= z_diff) {
1050 float hx = hexsize * 3.0f / 2.0f * rx + xoffset;
1051 float hy = hexsize * sqrt3 * (rz + rx / 2.0f) + yoffset;
1054 int32_t ux =
static_cast<int32_t
>(hx * 4.0f);
1055 int32_t uy =
static_cast<int32_t
>(hy * 4.0f);
1056 return (ux & 0x7FFF) | ((uy & 0x7FFF) << 16);
1063 const double min_lon,
1064 const double max_lon,
1065 const int32_t img_width,
1066 const double min_width) {
1067 const double const1 = 0.017453292519943295769236907684886;
1068 const double const2 = 6372797.560856;
1069 double t1 = sinf(meters / (2.0 * const2));
1070 double t2 = cosf(const1 * lat);
1071 const double newlon = lon - (2.0 * asinf(t1 / t2)) / const1;
1076 const double merc_diff = max_merc_x - min_merc_x;
1077 t1 = ((t1 - min_merc_x) / merc_diff) *
static_cast<double>(img_width);
1078 t2 = ((t2 - min_merc_x) / merc_diff) *
static_cast<double>(img_width);
1081 const double sz = fabs(t1 - t2);
1082 return (sz < min_width ? min_width : sz);
1089 const double min_lat,
1090 const double max_lat,
1091 const int32_t img_height,
1092 const double min_height) {
1093 const double const1 = 0.017453292519943295769236907684886;
1094 const double const2 = 6372797.560856;
1095 const double latdiff = meters / (const1 * const2);
1096 const double newlat =
1097 (lat < 0) ? lat + latdiff : lat - latdiff;
1102 const double merc_diff = max_merc_y - min_merc_y;
1103 t1 = ((t1 - min_merc_y) / merc_diff) *
static_cast<double>(img_height);
1104 t2 = ((t2 - min_merc_y) / merc_diff) *
static_cast<double>(img_height);
1107 const double sz = fabs(t1 - t2);
1108 return (sz < min_height ? min_height : sz);
1113 const double min_lon,
1114 const double max_lon,
1115 const double min_lat,
1116 const double max_lat) {
1117 return !(lon < min_lon || lon > max_lon || lat < min_lat || lat > max_lat);
1122 const double meters,
1123 const double min_lon,
1124 const double max_lon,
1125 const double min_lat,
1126 const double max_lat) {
1127 const double const1 = 0.017453292519943295769236907684886;
1128 const double const2 = 6372797.560856;
1129 const double latdiff = meters / (const1 * const2);
1130 const double t1 = sinf(meters / (2.0 * const2));
1131 const double t2 = cosf(const1 * lat);
1132 const double londiff = (2.0 * asinf(t1 / t2)) / const1;
1133 return !(lon + londiff < min_lon || lon - londiff > max_lon ||
1134 lat + latdiff < min_lat || lat - latdiff > max_lat);
EXTENSION_NOINLINE double Atanh(const double x)
EXTENSION_NOINLINE double ln(const double x)
EXTENSION_NOINLINE int32_t reg_hex_horiz_pixel_bin_packed(const double valx, const double minx, const double maxx, const double valy, const double miny, const double maxy, const double hexwidth, const double hexheight, const double offsetx, const double offsety, const int32_t imgwidth, const int32_t imgheight)
EXTENSION_NOINLINE float reg_hex_horiz_pixel_bin_x(const double valx, const double minx, const double maxx, const double valy, const double miny, const double maxy, const double hexwidth, const double hexheight, const double offsetx, const double offsety, const int32_t imgwidth, const int32_t imgheight)
EXTENSION_NOINLINE double Tan__(const float x)
EXTENSION_INLINE bool is_point_in_merc_view(const double lon, const double lat, const double min_lon, const double max_lon, const double min_lat, const double max_lat)
#define EXTENSION_NOINLINE
EXTENSION_NOINLINE bool is_nan__(const float x)
EXTENSION_NOINLINE double Sin(const double x)
EXTENSION_NOINLINE int32_t Truncate__2(const int32_t x, const int32_t y)
EXTENSION_NOINLINE double power(const double x, const double y)
EXTENSION_NOINLINE double Cot(const double x)
EXTENSION_NOINLINE int32_t rect_pixel_bin_packed(const double valx, const double minx, const double maxx, const double valy, const double miny, const double maxy, const double rectwidth, const double rectheight, const double offsetx, const double offsety, const int32_t imgwidth, const int32_t imgheight)
EXTENSION_NOINLINE int64_t Round__3(const int64_t x, const int32_t y)
EXTENSION_NOINLINE double distance_in_meters__(const float fromlon, const float fromlat, const float tolon, const float tolat)
EXTENSION_NOINLINE bool is_nan(const double x)
EXTENSION_NOINLINE int16_t Round__1(const int16_t x, const int32_t y)
EXTENSION_NOINLINE double Asin(const double x)
EXTENSION_NOINLINE double Log10(const double x)
EXTENSION_NOINLINE double convert_meters_to_merc_pixel_width(const double meters, const double lon, const double lat, const double min_lon, const double max_lon, const int32_t img_width, const double min_width)
EXTENSION_NOINLINE float Floor__(float x)
EXTENSION_NOINLINE int64_t Floor__3(int64_t x)
EXTENSION_NOINLINE double Ceil(double x)
EXTENSION_NOINLINE double Sqrt(const double x)
EXTENSION_NOINLINE int16_t Ceil__1(int16_t x)
EXTENSION_NOINLINE int64_t Truncate__3(const int64_t x, const int32_t y)
EXTENSION_NOINLINE int16_t Floor__1(int16_t x)
EXTENSION_NOINLINE double Exp(double x)
EXTENSION_NOINLINE double radians(const double x)
EXTENSION_NOINLINE double Cos(const double x)
EXTENSION_NOINLINE int64_t Round__4(const int64_t x, const int32_t y0, const int32_t scale)
EXTENSION_NOINLINE int32_t Ceil__2(int32_t x)
EXTENSION_NOINLINE float rect_pixel_bin_y(const double valy, const double miny, const double maxy, const double rectheight, const double offsety, const int32_t imgheight)
EXTENSION_NOINLINE int32_t Round__2(const int32_t x, const int32_t y)
EXTENSION_NOINLINE double Cosh(const double x)
EXTENSION_NOINLINE double Floor(double x)
EXTENSION_NOINLINE double Round2_to_digit(const double x, const int32_t y)
EXTENSION_NOINLINE double degrees(double x)
EXTENSION_NOINLINE double round_to_digit(const double x, const int32_t y)
EXTENSION_NOINLINE double convert_meters_to_merc_pixel_height(const double meters, const double lon, const double lat, const double min_lat, const double max_lat, const int32_t img_height, const double min_height)
EXTENSION_NOINLINE double Log__(const float x)
EXTENSION_NOINLINE float reg_hex_horiz_pixel_bin_y(const double valx, const double minx, const double maxx, const double valy, const double miny, const double maxy, const double hexwidth, const double hexheight, const double offsetx, const double offsety, const int32_t imgwidth, const int32_t imgheight)
EXTENSION_NOINLINE double ln__(const float x)
EXTENSION_NOINLINE float rect_pixel_bin(const double val, const double min, const double max, const int32_t numbins, const int32_t dimensionsize)
EXTENSION_NOINLINE float reg_hex_vert_pixel_bin_x(const double valx, const double minx, const double maxx, const double valy, const double miny, const double maxy, const double hexwidth, const double hexheight, const double offsetx, const double offsety, const int32_t imgwidth, const int32_t imgheight)
EXTENSION_NOINLINE int64_t Ceil__3(int64_t x)
EXTENSION_NOINLINE bool is_inf__(const float x)
EXTENSION_NOINLINE float Round__(const float x, const int32_t y)
torch::Tensor f(torch::Tensor x, torch::Tensor W_target, torch::Tensor b_target)
EXTENSION_NOINLINE float Truncate__(const float x, const int32_t y)
EXTENSION_NOINLINE double distance_in_meters(const double fromlon, const double fromlat, const double tolon, const double tolat)
Computes the distance, in meters, between two WGS-84 positions.
EXTENSION_NOINLINE double Round(const double x, const int32_t y)
EXTENSION_NOINLINE float Ceil__(float x)
EXTENSION_NOINLINE float reg_hex_vert_pixel_bin_y(const double valx, const double minx, const double maxx, const double valy, const double miny, const double maxy, const double hexwidth, const double hexheight, const double offsetx, const double offsety, const int32_t imgwidth, const int32_t imgheight)
EXTENSION_NOINLINE int32_t Floor__2(int32_t x)
EXTENSION_NOINLINE bool is_inf(const double x)
EXTENSION_NOINLINE double Truncate(const double x, const int32_t y)
EXTENSION_NOINLINE double Log(const double x)
EXTENSION_NOINLINE double approx_distance_in_meters(const float fromlon, const float fromlat, const float tolon, const float tolat)
EXTENSION_NOINLINE double Sinh(const double x)
EXTENSION_NOINLINE double Tanh(const double x)
EXTENSION_NOINLINE float rect_pixel_bin_x(const double valx, const double minx, const double maxx, const double rectwidth, const double offsetx, const int32_t imgwidth)
EXTENSION_NOINLINE double pi()
EXTENSION_NOINLINE int32_t reg_hex_vert_pixel_bin_packed(const double valx, const double minx, const double maxx, const double valy, const double miny, const double maxy, const double hexwidth, const double hexheight, const double offsetx, const double offsety, const int32_t imgwidth, const int32_t imgheight)
EXTENSION_NOINLINE double Tan(const double x)
EXTENSION_NOINLINE double Atan2(const double y, const double x)
EXTENSION_NOINLINE double conv_4326_900913_y(const double y)
EXTENSION_NOINLINE double Atan(const double x)
EXTENSION_NOINLINE double conv_4326_900913_x(const double x)
EXTENSION_NOINLINE double Log10__(const float x)
EXTENSION_NOINLINE bool is_point_size_in_merc_view(const double lon, const double lat, const double meters, const double min_lon, const double max_lon, const double min_lat, const double max_lat)
EXTENSION_NOINLINE int16_t Truncate__1(const int16_t x, const int32_t y)
EXTENSION_NOINLINE double Acos(const double x)