Skip to content
Snippets Groups Projects
Commit 0144669d authored by Peter Collingbourne's avatar Peter Collingbourne
Browse files

Add missing dot.h include.

llvm-svn: 157615
parent 8f97a436
No related branches found
No related tags found
No related merge requests found
...@@ -59,6 +59,7 @@ ...@@ -59,6 +59,7 @@
/* 6.11.5 Geometric Functions */ /* 6.11.5 Geometric Functions */
#include <clc/geometric/cross.h> #include <clc/geometric/cross.h>
#include <clc/geometric/dot.h>
#include <clc/geometric/length.h> #include <clc/geometric/length.h>
#include <clc/geometric/normalize.h> #include <clc/geometric/normalize.h>
......
_CLC_OVERLOAD _CLC_DECL FLOAT dot(FLOATN p0, FLOATN p1);
...@@ -15,3 +15,25 @@ _CLC_OVERLOAD _CLC_DEF float dot(float3 p0, float3 p1) { ...@@ -15,3 +15,25 @@ _CLC_OVERLOAD _CLC_DEF float dot(float3 p0, float3 p1) {
_CLC_OVERLOAD _CLC_DEF float dot(float4 p0, float4 p1) { _CLC_OVERLOAD _CLC_DEF float dot(float4 p0, float4 p1) {
return p0.x*p1.x + p0.y*p1.y + p0.z*p1.z + p0.w*p1.w; return p0.x*p1.x + p0.y*p1.y + p0.z*p1.z + p0.w*p1.w;
} }
#ifdef cl_khr_fp64
#pragma OPENCL EXTENSION cl_khr_fp64 : enable
_CLC_OVERLOAD _CLC_DEF double dot(double p0, double p1) {
return p0*p1;
}
_CLC_OVERLOAD _CLC_DEF double dot(double2 p0, double2 p1) {
return p0.x*p1.x + p0.y*p1.y;
}
_CLC_OVERLOAD _CLC_DEF double dot(double3 p0, double3 p1) {
return p0.x*p1.x + p0.y*p1.y + p0.z*p1.z;
}
_CLC_OVERLOAD _CLC_DEF double dot(double4 p0, double4 p1) {
return p0.x*p1.x + p0.y*p1.y + p0.z*p1.z + p0.w*p1.w;
}
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment