File: coll_adapt_context.c

package info (click to toggle)
openmpi 5.0.7-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 202,312 kB
  • sloc: ansic: 612,441; makefile: 42,495; sh: 11,230; javascript: 9,244; f90: 7,052; java: 6,404; perl: 5,154; python: 1,856; lex: 740; fortran: 61; cpp: 20; tcl: 12
file content (42 lines) | stat: -rw-r--r-- 1,366 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*
 * Copyright (c) 2014-2020 The University of Tennessee and The University
 *                         of Tennessee Research Foundation.  All rights
 *                         reserved.
 * $COPYRIGHT$
 *
 * Additional copyrights may follow
 *
 * $HEADER$
 */

#include "ompi/mca/coll/coll.h"
#include "coll_adapt_context.h"


static void adapt_constant_reduce_context_construct(ompi_coll_adapt_constant_reduce_context_t *context)
{
    OBJ_CONSTRUCT(&context->recv_list, opal_list_t);
    OBJ_CONSTRUCT(&context->mutex_recv_list, opal_mutex_t);
    OBJ_CONSTRUCT(&context->inbuf_list, opal_free_list_t);
}

static void adapt_constant_reduce_context_destruct(ompi_coll_adapt_constant_reduce_context_t *context)
{
    OBJ_DESTRUCT(&context->mutex_recv_list);
    OBJ_DESTRUCT(&context->recv_list);
    OBJ_DESTRUCT(&context->inbuf_list);
}


OBJ_CLASS_INSTANCE(ompi_coll_adapt_bcast_context_t, opal_free_list_item_t,
                   NULL, NULL);

OBJ_CLASS_INSTANCE(ompi_coll_adapt_constant_bcast_context_t, opal_object_t,
                   NULL, NULL);

OBJ_CLASS_INSTANCE(ompi_coll_adapt_reduce_context_t, opal_free_list_item_t,
                   NULL, NULL);

OBJ_CLASS_INSTANCE(ompi_coll_adapt_constant_reduce_context_t, opal_object_t,
                   &adapt_constant_reduce_context_construct,
                   &adapt_constant_reduce_context_destruct);