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.
29 lines
793 B
29 lines
793 B
2 years ago
|
//
|
||
|
// Created by 14727 on 2022/11/19.
|
||
|
//
|
||
|
|
||
|
#ifndef NURBSEVALUATOR_NURBSBASIS_CUH
|
||
|
#define NURBSEVALUATOR_NURBSBASIS_CUH
|
||
|
|
||
|
#include <cuda_runtime.h>
|
||
|
#include "cstdio"
|
||
|
|
||
|
/**
|
||
|
* 当u值已知时,根据基函数N的递推表达式,采用动态规划的方式求解N值
|
||
|
* @param N_Texture 结果返回在N_Texture中
|
||
|
*/
|
||
|
extern __device__ void d_basisFunction1(float *N_Texture, const float *knots, float u, int degree, int d_knotsCnt);
|
||
|
|
||
|
/**
|
||
|
* device中判断两个浮点数是否相等。与CPU中一样,GPU中的浮点数也存在很小的误差,直接使用==判断往往容易将相等误判为不等
|
||
|
* @return true:相等
|
||
|
*/
|
||
|
extern __device__ bool d_floatEqual1(float a, float b);
|
||
|
|
||
|
namespace NurbsBasis {
|
||
|
void myPrint11(int a, int b);
|
||
|
};
|
||
|
|
||
|
|
||
|
#endif //NURBSEVALUATOR_NURBSBASIS_CUH
|