7#ifndef NVIDIA_INDEX_CUDA_SHARED_TYPES_H
8#define NVIDIA_INDEX_CUDA_SHARED_TYPES_H
11#include "base/numeric_types.h"
14#include "base_math/constants.h"
17typedef unsigned int uint;
18typedef unsigned short ushort;
89typedef matrix2x2<float> Mat2x2f;
90typedef matrix3x3<float> Mat3x3f;
91typedef matrix4x4<float> Mat4x4f;
92typedef matrix2x2<float> Mat2f;
93typedef matrix3x3<float> Mat3f;
94typedef matrix4x4<float> Mat4f;
96typedef bbox<float2> Bbox2f;
97typedef bbox<float3> Bbox3f;
110typedef unsigned short Uint16;
112typedef unsigned int Uint32;
113typedef long long Sint64;
114typedef unsigned long long Uint64;
115typedef float Float32;
116typedef double Float64;
126typedef nv::index::Vector2s Vec2i;
127typedef nv::index::Vector3s Vec3i;
128typedef nv::index::Vector4s Vec4i;
130typedef nv::index::Vector2u Vec2ui;
131typedef nv::index::Vector3u Vec3ui;
132typedef nv::index::Vector4u Vec4ui;
134typedef nv::index::Vector2f Vec2f;
135typedef nv::index::Vector3f Vec3f;
136typedef nv::index::Vector4f Vec4f;
138typedef nv::index::Matrix2x2f Mat2x2f;
139typedef nv::index::Matrix3x3f Mat3x3f;
140typedef nv::index::Matrix4x4f Mat4x4f;
141typedef nv::index::Matrix2x2f Mat2f;
142typedef nv::index::Matrix3x3f Mat3f;
143typedef nv::index::Matrix4x4f Mat4f;
145typedef bbox<Vec2f> Bbox2f;
146typedef bbox<Vec3f> Bbox3f;
162static __inline__ __host__ __device__
163Vec3f make_vec3f(
float x,
float y,
float z)
165 return make_float3(x, y, z);
168static __inline__ __host__ __device__
169Vec4f make_vec4f(
float x,
float y,
float z,
float w)
171 return make_float4(x, y, z, w);
174static __inline__ __host__ __device__
175Mat2x2f make_mat2x2f(
float xx,
float xy,
float yx,
float yy)
190static inline Vec2f make_vec2f(
float x,
float y)
195static inline Vec3f make_vec3f(
float x,
float y,
float z)
197 return Vec3f(x, y, z);
200static inline Vec4f make_vec4f(
float x,
float y,
float z,
float w)
202 return Vec4f(x, y, z, w);
205static inline Mat2x2f make_mat2x2f(
float xx,
float xy,
float yx,
float yy)
207 return Mat2x2f(xx, xy, yx, yy);
210template <
typename T, mi::Size DIM>
212mi::math::Vector<T,DIM> normalize(
const mi::math::Vector<T, DIM>& v)
214 mi::math::Vector<T, DIM> r(v);
Common namespace for all NVIDIA APIs.
Definition: iindex.h:349