Commit c2596d1b authored by fengzch-das's avatar fengzch-das
Browse files

fix: no matching conversion from 'int' to 'T'

parent 8f995972
...@@ -20,6 +20,13 @@ IHD CamGradInfo::CamGradInfo() { ...@@ -20,6 +20,13 @@ IHD CamGradInfo::CamGradInfo() {
pixel_dir_x = make_float3(0.f, 0.f, 0.f); pixel_dir_x = make_float3(0.f, 0.f, 0.f);
pixel_dir_y = make_float3(0.f, 0.f, 0.f); pixel_dir_y = make_float3(0.f, 0.f, 0.f);
} }
IHD CamGradInfo::CamGradInfo(float val) {
cam_pos = make_float3(val, val, val);
pixel_0_0_center = make_float3(val, val, val);
pixel_dir_x = make_float3(val, val, val);
pixel_dir_y = make_float3(val, val, val);
}
} // namespace pulsar } // namespace pulsar
#endif #endif
...@@ -64,6 +64,7 @@ inline bool operator==(const CamInfo& a, const CamInfo& b) { ...@@ -64,6 +64,7 @@ inline bool operator==(const CamInfo& a, const CamInfo& b) {
struct CamGradInfo { struct CamGradInfo {
HOST DEVICE CamGradInfo(); HOST DEVICE CamGradInfo();
HOST DEVICE CamGradInfo(float val);
float3 cam_pos; float3 cam_pos;
float3 pixel_0_0_center; float3 pixel_0_0_center;
float3 pixel_dir_x; float3 pixel_dir_x;
...@@ -72,6 +73,8 @@ struct CamGradInfo { ...@@ -72,6 +73,8 @@ struct CamGradInfo {
// TODO: remove once https://github.com/NVlabs/cub/issues/172 is resolved. // TODO: remove once https://github.com/NVlabs/cub/issues/172 is resolved.
struct IntWrapper { struct IntWrapper {
HOST DEVICE IntWrapper(){}
HOST DEVICE explicit IntWrapper(int ival):val{0}{}
int val; int val;
}; };
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment