From f526f77a9960efcd74a67a4b1eb64c506041b518 Mon Sep 17 00:00:00 2001 From: Ahmet Inan Date: Sun, 30 Nov 2014 13:24:57 +0100 Subject: [PATCH] put header guards to complex.rsh --- app/src/main/rs/complex.rsh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/main/rs/complex.rsh b/app/src/main/rs/complex.rsh index 1249e85..7487ff9 100644 --- a/app/src/main/rs/complex.rsh +++ b/app/src/main/rs/complex.rsh @@ -14,6 +14,9 @@ See the License for the specific language governing permissions and limitations under the License. */ +#ifndef COMPLEX_RSH +#define COMPLEX_RSH + typedef float2 complex_t; static inline complex_t complex(float a, float b) { return (complex_t){ a, b }; } static inline float cabs(complex_t z) { return length(z); } @@ -28,3 +31,5 @@ static inline complex_t cmul(complex_t a, complex_t b) } static inline complex_t conj(complex_t z) { return complex(z[0], -z[1]); } static inline complex_t cdiv(complex_t a, complex_t b) { return cmul(a, conj(b)) / dot(b, b); } + +#endif \ No newline at end of file