~ubuntu-branches/debian/stretch/adios/stretch

« back to all changes in this revision

Viewing changes to src/core/adios_subvolume.c

  • Committer: Package Import Robot
  • Author(s): Alastair McKinstry
  • Date: 2014-06-16 23:06:38 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20140616230638-5a0z7ylxx8i0edrg
Tags: 1.7.0-1
* New upstream release.
* Add adios.pc pkgconfig file. adios_config now uses this.

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
#include "core/util.h"
14
14
#include "core/common_read.h"
15
15
#include "core/adios_subvolume.h"
 
16
#include "core/adios_internals.h"
16
17
 
17
18
void vector_add(int ndim, uint64_t *dst_vec, const uint64_t *vec1, const uint64_t *vec2) {
18
19
    while (ndim--)
364
365
 
365
366
        // Enfoce the safety condition for overlapping buffers here
366
367
        if (buffers_intersect) {
367
 
            int dim;
368
368
            assert((char*)src + src_offset >= (char*)dst + dst_offset);
369
369
            for (i = 0; i < last_noncovering_dim + 1; i++)
370
370
                assert(src_strides[i] >= dst_strides[i]);
419
419
                                     enum ADIOS_DATATYPES elem_type) {
420
420
    int i;
421
421
    uint64_t zero[32];
422
 
    uint64_t new_data_buflen;
423
422
 
424
423
    // Ensure all arguments are non-NULL, and that the subvolume fits
425
424
    // completely within the buffer volume
435
434
                        buf_dims, buf_subv_offsets);
436
435
 
437
436
    // If the compact operation will do something, do it now
438
 
    if (!adios_copyspec_is_noop(&compact_copyspec)) {
 
437
    if (!adios_copyspec_is_noop(compact_copyspec)) {
439
438
        // Overlapping subvolume copy allowed because it matches the safety
440
439
        // condition as defined in comment at the top of adios_subvolume.h.
441
440
        // NOTE: we infer no endianness swap, as this is an intra-buffer operation
503
502
                                             bufdup(vb->count, sizeof(uint64_t), ndim));
504
503
}
505
504
 
506
 
uint64_t compute_selection_size(ADIOS_SELECTION *sel) {
 
505
uint64_t compute_selection_size(const ADIOS_SELECTION *sel) {
507
506
    uint64_t sel_size;
508
507
    switch (sel->type) {
509
508
    case ADIOS_SELECTION_BOUNDINGBOX: