Go to the documentation of this file.
21 #define GSL_VECTOR_DISPATCH(TYPE) \
23 struct gsl_vector_dispatch<TYPE> { \
24 typedef TYPE value_type; \
25 typedef TYPE *iterator; \
26 typedef const TYPE *const_iterator; \
27 typedef size_t size_type; \
28 typedef TYPE& reference; \
29 typedef const TYPE& const_reference; \
31 typedef gsl_value_type gsl_vector_##TYPE \
33 static gsl_value_type *alloc(size_t n) { \
34 return gsl_vector_##TYPE##_alloc(n); \
36 static gsl_value_type *calloc(size_t n) { \
37 return gsl_vector_##TYPE##_calloc(n); \
39 static gsl_vector_type *alloc_from(gsl_vector_type *other) { \
40 return gsl_vector_#TYPE#_alloc_from_vector(other, 0, \
43 static void free(gsl_value_type *v) { \
44 gsl_vector_##TYPE##_free(v); \
46 static value_type get(gsl_vector_type *v, size_t i) { \
47 gsl_vector_##TYPE##_get(v,i); \