SlideServe
Menu
Préférences
© SlideServe · v2026

Dataflow Datatypes

hchadwick avatar
11 diapositives · 150 Views · Jan 02, 2020

Dataflow Datatypes. Dataflow Datatypes Revisited. Matrix. Field. ColorMap. Geometry. Matrices: Class Hierarchy. Matrix -- base class

Dataflow Datatypes - slide 1
01 / 11Dataflow Datatypes
1 / 17

Télécharger la présentation

Dataflow Datatypes
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. Dataflow Datatypes

  2. Dataflow Datatypes Revisited Matrix Field ColorMap Geometry

  3. Matrices: Class Hierarchy • Matrix -- base class • get, put, [ ], nrows, ncols, get_row, get_col, get_val, zero, mult, mult_transpose, print, {is_,as_,}{sparse,dense,column}, cg_solve, bicg_solve, scalar_multiply • SparseRowMatrix • int *rows, int *cols, double *a, int nnz; • ColumnMatrix • double *data; • DenseMatrix • double **data;

  4. Matrices: External Libraries • PETSc • Preconditioners: jacobi, bijacobi, sor, eisenstat, icc, ilu, asm, sles, lu, mg, spai, milu, nn, cholesky, ramg • Solvers: KSRICHARDSON, PSPCHEBYCHEV, KSPGG, KSPGMRES, KSPTCQMR, KSPBCGS, KSPBGS, KSPTFQMR, KSPCR, KSPLSQR, KSPBICG, KSPPREONLY • BLAS and Atlas • Faster linear-algebra via loop unrolling

  5. Dataflow Datatypes Revisited Matrix Field ColorMap Geometry

  6. Fields: Mesh + Data Geometry Regular Irregular PointCloudField Data int, float, double, … Vector, Tensor, … ScanlineField CurveField QuadSurfField TriSurfField ImageField Data_at (center) Properties TetVolField LatVolField HexVolField

  7. Meshes • Mesh -- base class • get_bounding_box, transform, synchronize, dimensionality • PointCloudMesh • Iterators, get_{node,edge,face,cell}, locate, get_weights, add_node • HexVolMesh • Iterators, get_{node,edge,face,cell}, locate, get_weights, add_node, add_elem • ImageMesh • Same, plus new Index type

  8. Fields • Field::GenericField -- base class • GenericField<MeshType, DataType>, data_at • Holds Handle to Mesh • Owns Data -- resize_fdata() [new DataType for FData{2,3}d] • Freeze/Thaw (data) • value(), set_value(), fdata() • mesh(), mesh_detach() • All fields derive from GenericField • PointCloudMesh -> PointCloudField • ImageMesh -> ImageField • Persistent::Datatype::PropertyManager::Field::GenericField • io(), PerTypeIDlock/genmap of attrib/valuesdata_at, interfaces • Mesh::PropertyManager

  9. Persistent • Serialize data for disk I/O • Eventually for distributed data marshalling • Architecture independent • Build atop XDR • Slow for big data • Optional circumvention for DenseMatrix • Data files are (somewhat) human readable, but should ~not~ be generated / edited by anything other than SCIRun • Use “convert” programs

  10. Persistent • void • Matrix::io(Piostream& stream) • { • /* int version = */ stream.begin_class("Matrix", MATRIX_VERSION); • PropertyManager::io(stream); • stream.end_class(); • } • void ColumnMatrix::io(Piostream& stream) • { • /* int version = */stream.begin_class("ColumnMatrix", COLUMNMATRIX_VERSION); • Matrix::io(stream); • stream.io(rows); • if(stream.reading()) { • data=scinew double[rows]; • } • int i; • for(i=0;i<rows;i++) • stream.io(data[i]); • stream.end_class(); • }

  11. Converter: CurveFieldToText • MeshHandle mH = handle->mesh(); • CurveMesh *cm = dynamic_cast<CurveMesh *>(mH.get_rep()); • CurveMesh::Node::iterator niter; • CurveMesh::Node::iterator niter_end; • CurveMesh::Node::size_type nsize; • cm->begin(niter); cm->end(niter_end); cm->size(nsize); • cerr << "Number of points = "<< nsize <<"\n"; • while(niter != niter_end) { • Point p; • cm->get_center(p, *niter); • fprintf(fPts, "%lf %lf %lf\n", p.x(), p.y(), p.z()); • ++niter; • } • CurveMesh::Edge::size_type esize; • CurveMesh::Edge::iterator eiter; • CurveMesh::Edge::iterator eiter_end; • CurveMesh::Node::array_type edge_nodes(2); • cm->size(esize); • cm->begin(eiter); • cm->end(eiter_end); • FILE *fEdges = fopen(edgesName, "wt"); • cerr << "Number of edges = "<< esize <<"\n"; • while(eiter != eiter_end) { • cm->get_nodes(edge_nodes, *eiter); • fprintf(fEdges, "%d %d\n", (int)edge_nodes[0]+baseIndex, (int)edge_nodes[1]+baseIndex); • ++eiter; • }