ISAAC
Overview :: Library Doc :: Server Doc :: JSON Commands

In Situ Animation of Accelerated Computations

Macros
isaac_macros.hpp File Reference
#include "isaac_types.hpp"
Include dependency graph for isaac_macros.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ISAAC_CUDA_CHECK(call)
 
#define ISAAC_FOR_EACH_DIM_4(start, end)
 
#define ISAAC_FOR_EACH_DIM_3(start, end)
 
#define ISAAC_FOR_EACH_DIM_2(start, end)
 
#define ISAAC_FOR_EACH_DIM_1(start, end)   start.x end
 
#define ISAAC_FOR_EACH_DIM(dim, start, end)   BOOST_PP_CAT( ISAAC_FOR_EACH_DIM_, dim) (start,end)
 
#define ISAAC_FOR_EACH_DIM_TWICE_4(start, middle, end)
 
#define ISAAC_FOR_EACH_DIM_TWICE_3(start, middle, end)
 
#define ISAAC_FOR_EACH_DIM_TWICE_2(start, middle, end)
 
#define ISAAC_FOR_EACH_DIM_TWICE_1(start, middle, end)   start.x middle.x end
 
#define ISAAC_FOR_EACH_DIM_TWICE(dim, start, middle, end)   BOOST_PP_CAT( ISAAC_FOR_EACH_DIM_TWICE_, dim) (start,middle,end)
 
#define ISAAC_SWITCH_IF_SMALLER(left, right)
 
#define ISAAC_SET_COLOR(dest, color)
 
#define ISAAC_START_TIME_MEASUREMENT(unique_name, time_function)   uint64_t BOOST_PP_CAT( __tm_start_, unique_name ) = time_function;
 
#define ISAAC_STOP_TIME_MEASUREMENT(result, operand, unique_name, time_function)   result operand time_function - BOOST_PP_CAT( __tm_start_, unique_name );
 
#define ISAAC_SET_IDENTITY(size, matrix)
 
#define ISAAC_JSON_ADD_MATRIX(array, matrix, count)
 
#define ISAAC_WAIT_VISUALIZATION   {}
 
#define ISAAC_HANDLE_EPIPE(add, n, sockfd, readThread)
 

Macro Definition Documentation

§ ISAAC_CUDA_CHECK

#define ISAAC_CUDA_CHECK (   call)
Value:
{ \
const cudaError_t error = call; \
if (error != cudaSuccess) \
{ \
fprintf(stderr, "Error: %s:%d, ", __FILE__, __LINE__); \
fprintf(stderr, "code: %d, reason: %s\n", error, \
cudaGetErrorString(error)); \
} \
}

Definition at line 20 of file isaac_macros.hpp.

§ ISAAC_FOR_EACH_DIM

#define ISAAC_FOR_EACH_DIM (   dim,
  start,
  end 
)    BOOST_PP_CAT( ISAAC_FOR_EACH_DIM_, dim) (start,end)

Definition at line 49 of file isaac_macros.hpp.

§ ISAAC_FOR_EACH_DIM_1

#define ISAAC_FOR_EACH_DIM_1 (   start,
  end 
)    start.x end

Definition at line 46 of file isaac_macros.hpp.

§ ISAAC_FOR_EACH_DIM_2

#define ISAAC_FOR_EACH_DIM_2 (   start,
  end 
)
Value:
start.x end \
start.y end

Definition at line 42 of file isaac_macros.hpp.

§ ISAAC_FOR_EACH_DIM_3

#define ISAAC_FOR_EACH_DIM_3 (   start,
  end 
)
Value:
start.x end \
start.y end \
start.z end

Definition at line 37 of file isaac_macros.hpp.

§ ISAAC_FOR_EACH_DIM_4

#define ISAAC_FOR_EACH_DIM_4 (   start,
  end 
)
Value:
start.x end \
start.y end \
start.z end \
start.w end

Definition at line 31 of file isaac_macros.hpp.

§ ISAAC_FOR_EACH_DIM_TWICE

#define ISAAC_FOR_EACH_DIM_TWICE (   dim,
  start,
  middle,
  end 
)    BOOST_PP_CAT( ISAAC_FOR_EACH_DIM_TWICE_, dim) (start,middle,end)

Definition at line 70 of file isaac_macros.hpp.

§ ISAAC_FOR_EACH_DIM_TWICE_1

#define ISAAC_FOR_EACH_DIM_TWICE_1 (   start,
  middle,
  end 
)    start.x middle.x end

Definition at line 67 of file isaac_macros.hpp.

§ ISAAC_FOR_EACH_DIM_TWICE_2

#define ISAAC_FOR_EACH_DIM_TWICE_2 (   start,
  middle,
  end 
)
Value:
start.x middle.x end \
start.y middle.y end

Definition at line 63 of file isaac_macros.hpp.

§ ISAAC_FOR_EACH_DIM_TWICE_3

#define ISAAC_FOR_EACH_DIM_TWICE_3 (   start,
  middle,
  end 
)
Value:
start.x middle.x end \
start.y middle.y end \
start.z middle.z end

Definition at line 58 of file isaac_macros.hpp.

§ ISAAC_FOR_EACH_DIM_TWICE_4

#define ISAAC_FOR_EACH_DIM_TWICE_4 (   start,
  middle,
  end 
)
Value:
start.x middle.x end \
start.y middle.y end \
start.z middle.z end \
start.w middle.w end

Definition at line 52 of file isaac_macros.hpp.

§ ISAAC_HANDLE_EPIPE

#define ISAAC_HANDLE_EPIPE (   add,
  n,
  sockfd,
  readThread 
)
Value:
if (add < 0) \
{ \
pthread_join(readThread,NULL); \
readThread = 0; \
sockfd = 0; \
return n; \
}

Definition at line 116 of file isaac_macros.hpp.

§ ISAAC_JSON_ADD_MATRIX

#define ISAAC_JSON_ADD_MATRIX (   array,
  matrix,
  count 
)
Value:
for (isaac_int i = 0; i < count; i++) \
json_array_append_new( array, json_real( (matrix)[i] ) );
int32_t isaac_int
Definition: isaac_types.hpp:26

Definition at line 101 of file isaac_macros.hpp.

§ ISAAC_SET_COLOR

#define ISAAC_SET_COLOR (   dest,
  color 
)
Value:
{ \
isaac_uint4 result; \
result.x = ISAAC_MIN( isaac_uint( ISAAC_MIN( isaac_float(1), color.x ) * 255.0f ), 255u); \
result.y = ISAAC_MIN( isaac_uint( ISAAC_MIN( isaac_float(1), color.y ) * 255.0f ), 255u); \
result.z = ISAAC_MIN( isaac_uint( ISAAC_MIN( isaac_float(1), color.z ) * 255.0f ), 255u); \
result.w = ISAAC_MIN( isaac_uint( ISAAC_MIN( isaac_float(1), color.w ) * 255.0f ), 255u); \
dest = (result.w << 24) | (result.z << 16) | (result.y << 8) | (result.x << 0); \
}
float isaac_float
Definition: isaac_types.hpp:25
uint32_t isaac_uint
Definition: isaac_types.hpp:27
#define ISAAC_MIN

Definition at line 81 of file isaac_macros.hpp.

§ ISAAC_SET_IDENTITY

#define ISAAC_SET_IDENTITY (   size,
  matrix 
)
Value:
for (isaac_int x = 0; x < size; x++) \
for (isaac_int y = 0; y < size; y++) \
(matrix)[x+y*size] = (x==y)?1.0f:0.0f;
int32_t isaac_int
Definition: isaac_types.hpp:26

Definition at line 96 of file isaac_macros.hpp.

§ ISAAC_START_TIME_MEASUREMENT

#define ISAAC_START_TIME_MEASUREMENT (   unique_name,
  time_function 
)    uint64_t BOOST_PP_CAT( __tm_start_, unique_name ) = time_function;

Definition at line 91 of file isaac_macros.hpp.

§ ISAAC_STOP_TIME_MEASUREMENT

#define ISAAC_STOP_TIME_MEASUREMENT (   result,
  operand,
  unique_name,
  time_function 
)    result operand time_function - BOOST_PP_CAT( __tm_start_, unique_name );

Definition at line 93 of file isaac_macros.hpp.

§ ISAAC_SWITCH_IF_SMALLER

#define ISAAC_SWITCH_IF_SMALLER (   left,
  right 
)
Value:
if (left < right) \
{ \
auto temp = left; \
left = right; \
right = temp; \
}

Definition at line 73 of file isaac_macros.hpp.

§ ISAAC_WAIT_VISUALIZATION

#define ISAAC_WAIT_VISUALIZATION   {}

Definition at line 113 of file isaac_macros.hpp.