PyPO User Manual
 
Loading...
Searching...
No Matches
Debug.h
Go to the documentation of this file.
1#include <iostream>
2
3#ifndef __Debug_h
4#define __Debug_h
5
6/*! \file Debug.h
7 \brief Methods for printing complex or real arrays of length 3 for GPU.
8*/
9
10__host__ __device__ inline void _debugArray(cuFloatComplex arr[3]);
11__host__ __device__ inline void _debugArray(float arr[3]);
12
13#endif
14
15/**
16 * Debug complex array.
17 *
18 * Print complex array of size 3.
19 * Useful for debugging.
20
21 * @param arr Array of 3 cuFloatComplex.
22 */
23__host__ __device__ inline void _debugArray(cuFloatComplex arr[3])
24{
25 printf("%e + %ej, %e + %ej, %e + %ej\n", arr[0].x, arr[0].y, arr[1].x, arr[1].y, arr[2].x, arr[2].y);
26}
27
28/**
29 * Debug real array.
30 *
31 * Print real valued array of size 3.
32 * Useful for debugging.
33
34 * @param arr Array of 3 float.
35 */
36__host__ __device__ inline void _debugArray(float arr[3])
37{
38 printf("%e, %e, %e\n", arr[0], arr[1], arr[2]);
39}
40
__host__ __device__ void _debugArray(cuFloatComplex arr[3])
Definition Debug.h:23