A tool for evaluating multiple NURBS curve/surface points using the GPU.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
661 B

//
// Created by 14727 on 2022/12/9.
//
2 years ago
#ifndef NURBSEVALUATOR_DEVICE_UTILS_CUH
#define NURBSEVALUATOR_DEVICE_UTILS_CUH
#define D_DBL_MAX 1.7976931348623158e+308
#define D_FLT_MAX 3.402823466e+38F
__device__ void d_safeFree(float * &p);
/**
* device中判断两个浮点数是否相等。与CPU中一样,GPU中的浮点数也存在很小的误差,直接使用==判断往往容易将相等误判为不等
* @return true:相等
*/
__device__ bool d_floatEqual(float a, float b);
/**
* 正则归一化,一般用于方向向量的归一化
*/
__device__ void normalization(float &a, float &b, float &c);
2 years ago
#endif //NURBSEVALUATOR_DEVICE_UTILS_CUH