Changeset 62 for sources/src/global_functions.cc
- Timestamp:
- Feb 16, 2017, 3:46:11 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sources/src/global_functions.cc
r60 r62 248 248 assert(pending_write_vector_capacity != 0); 249 249 250 #ifdef _OPENMP251 #define LINE_SIZE 128L250 #ifdef USE_OPENMP 251 #define LINE_SIZE 128L 252 252 int malloc_size = (sizeof (pending_write_t) * (pending_write_vector_capacity + 1) + (LINE_SIZE - 1)) & ~(LINE_SIZE - 1); 253 253 assert((sizeof(pending_write_t) * (pending_write_vector_capacity + 1)) <= malloc_size && "bad allocation size"); 254 254 255 #pragma omp parallel255 #pragma omp parallel 256 256 { 257 257 posix_memalign((void **) &pending_write_vector, LINE_SIZE, malloc_size); … … 263 263 #else 264 264 pending_write_vector = (pending_write_vector_t) malloc(sizeof(pending_write_t) * pending_write_vector_capacity); 265 pending_write_vector_nb = (int32_t *) malloc(sizeof(int32_t)); 266 *pending_write_vector_nb = 0; 265 267 #endif 266 268
Note: See TracChangeset
for help on using the changeset viewer.