PLASMA  2.4.5
PLASMA - Parallel Linear Algebra for Scalable Multi-core Architectures
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
async.c File Reference
#include "common.h"
#include <stdlib.h>
Include dependency graph for async.c:

Go to the source code of this file.

Functions

int plasma_request_fail (PLASMA_sequence *sequence, PLASMA_request *request, int status)
int plasma_sequence_create (plasma_context_t *plasma, PLASMA_sequence **sequence)
int plasma_sequence_destroy (plasma_context_t *plasma, PLASMA_sequence *sequence)
int plasma_sequence_wait (plasma_context_t *plasma, PLASMA_sequence *sequence)
void plasma_sequence_flush (Quark *quark, PLASMA_sequence *sequence, PLASMA_request *request, int status)
int PLASMA_Sequence_Create (PLASMA_sequence **sequence)
int PLASMA_Sequence_Destroy (PLASMA_sequence *sequence)
int PLASMA_Sequence_Wait (PLASMA_sequence *sequence)
int PLASMA_Sequence_Flush (PLASMA_sequence *sequence, PLASMA_request *request)

Detailed Description

PLASMA auxiliary routines PLASMA is a software package provided by Univ. of Tennessee, Univ. of California Berkeley and Univ. of Colorado Denver

Version:
2.4.5
Author:
Jakub Kurzak
Date:
2010-11-15

Definition in file async.c.


Function Documentation

int plasma_request_fail ( PLASMA_sequence sequence,
PLASMA_request request,
int  status 
)

Register an exception.

Definition at line 21 of file async.c.

References plasma_sequence_t::request, plasma_request_t::status, and plasma_sequence_t::status.

{
sequence->request = request;
sequence->status = status;
request->status = status;
return status;
}
int plasma_sequence_create ( plasma_context_t plasma,
PLASMA_sequence **  sequence 
)

Create a sequence

Definition at line 32 of file async.c.

References PLASMA_ERR_OUT_OF_RESOURCES, plasma_error(), PLASMA_SUCCESS, plasma_context_struct::quark, and QUARK_Sequence_Create().

{
if ((*sequence = malloc(sizeof(PLASMA_sequence))) == NULL) {
plasma_error("PLASMA_Sequence_Create", "malloc() failed");
}
if(((*sequence)->quark_sequence = QUARK_Sequence_Create(plasma->quark)) == NULL){
plasma_error("PLASMA_Sequence_Create", "QUARK_Sequence_Create() failed");
}
(*sequence)->status = PLASMA_SUCCESS;
}

Here is the call graph for this function:

int PLASMA_Sequence_Create ( PLASMA_sequence **  sequence)

PLASMA_Sequence_Create - Create a squence.

Parameters:
[out]sequenceIdentifies a set of routines sharing common exception handling.
Returns:
Return values:
PLASMA_SUCCESSsuccessful exit

Definition at line 93 of file async.c.

References plasma_context_self(), PLASMA_ERR_NOT_INITIALIZED, plasma_fatal_error(), and plasma_sequence_create().

{
int status;
plasma = plasma_context_self();
if (plasma == NULL) {
plasma_fatal_error("PLASMA_Sequence_Create", "PLASMA not initialized");
}
status = plasma_sequence_create(plasma, sequence);
return status;
}

Here is the call graph for this function:

int plasma_sequence_destroy ( plasma_context_t plasma,
PLASMA_sequence sequence 
)

Destroy a sequence

Definition at line 49 of file async.c.

References PLASMA_SUCCESS, plasma_context_struct::quark, plasma_sequence_t::quark_sequence, and QUARK_Sequence_Destroy().

{
free(sequence);
}

Here is the call graph for this function:

int PLASMA_Sequence_Destroy ( PLASMA_sequence sequence)

PLASMA_Sequence_Destroy - Destroy a sequence.

Parameters:
[in]sequenceIdentifies a set of routines sharing common exception handling.
Returns:
Return values:
PLASMA_SUCCESSsuccessful exit

Definition at line 124 of file async.c.

References plasma_context_self(), PLASMA_ERR_NOT_INITIALIZED, PLASMA_ERR_UNALLOCATED, plasma_fatal_error(), and plasma_sequence_destroy().

{
int status;
plasma = plasma_context_self();
if (plasma == NULL) {
plasma_fatal_error("PLASMA_Sequence_Destroy", "PLASMA not initialized");
}
if (sequence == NULL) {
plasma_fatal_error("PLASMA_Sequence_Destroy", "NULL sequence");
}
status = plasma_sequence_destroy(plasma, sequence);
return status;
}

Here is the call graph for this function:

void plasma_sequence_flush ( Quark quark,
PLASMA_sequence sequence,
PLASMA_request request,
int  status 
)

Terminate a sequence

Definition at line 68 of file async.c.

References plasma_sequence_t::quark_sequence, QUARK_Sequence_Cancel(), plasma_sequence_t::request, plasma_request_t::status, and plasma_sequence_t::status.

{
sequence->request = request;
sequence->status = status;
request->status = status;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int PLASMA_Sequence_Flush ( PLASMA_sequence sequence,
PLASMA_request request 
)

PLASMA_Sequence_Flush - Terminate a sequence.

Parameters:
[in]sequenceIdentifies a set of routines sharing common exception handling.
[in]requestThe flush request.
Returns:
Return values:
PLASMA_SUCCESSsuccessful exit

Definition at line 197 of file async.c.

References plasma_context_self(), PLASMA_ERR_NOT_INITIALIZED, PLASMA_ERR_SEQUENCE_FLUSHED, PLASMA_ERR_UNALLOCATED, plasma_fatal_error(), plasma_sequence_flush(), PLASMA_SUCCESS, and plasma_context_struct::quark.

{
plasma = plasma_context_self();
if (plasma == NULL) {
plasma_fatal_error("PLASMA_Sequence_Flush", "PLASMA not initialized");
}
if (sequence == NULL) {
plasma_fatal_error("PLASMA_Sequence_Flush", "NULL sequence");
}
}

Here is the call graph for this function:

int plasma_sequence_wait ( plasma_context_t plasma,
PLASMA_sequence sequence 
)

Wait for the completion of a sequence

Definition at line 59 of file async.c.

References PLASMA_SUCCESS, plasma_context_struct::quark, plasma_sequence_t::quark_sequence, and QUARK_Sequence_Wait().

{
}

Here is the call graph for this function:

Here is the caller graph for this function:

int PLASMA_Sequence_Wait ( PLASMA_sequence sequence)

PLASMA_Sequence_Wait - Wait for the completion of a sequence.

Parameters:
[in]sequenceIdentifies a set of routines sharing common exception handling.
Returns:
Return values:
PLASMA_SUCCESSsuccessful exit

Definition at line 159 of file async.c.

References plasma_context_self(), PLASMA_ERR_NOT_INITIALIZED, PLASMA_ERR_UNALLOCATED, plasma_fatal_error(), and plasma_sequence_wait().

{
int status;
plasma = plasma_context_self();
if (plasma == NULL) {
plasma_fatal_error("PLASMA_Sequence_Wait", "PLASMA not initialized");
}
if (sequence == NULL) {
plasma_fatal_error("PLASMA_Sequence_Wait", "NULL sequence");
}
status = plasma_sequence_wait(plasma, sequence);
return status;
}

Here is the call graph for this function: