Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /branches/vis12/src/include/Diderot/dyn-seq.h
ViewVC logotype

Diff of /branches/vis12/src/include/Diderot/dyn-seq.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1977, Mon Jul 16 20:04:34 2012 UTC revision 1978, Sat Jul 21 16:19:40 2012 UTC
# Line 39  Line 39 
39  STATIC_INLINE Diderot_DynSeq_t *Diderot_DynSeqMk (size_t elemSz, int nElems, void *elems)  STATIC_INLINE Diderot_DynSeq_t *Diderot_DynSeqMk (size_t elemSz, int nElems, void *elems)
40  {  {
41      Diderot_DynSeq_t *seq = Diderot_DynSeqAlloc(elemSz, nElems);      Diderot_DynSeq_t *seq = Diderot_DynSeqAlloc(elemSz, nElems);
42      unsigned char *p = (unsigned char *)seq->data;      memcpy(seq->data, elems, elemSz * nElems);
     unsigned char *q = (unsigned char *)elems;  
     for (int i = 0;  i < nElems;  i++) {  
         memcpy(p, q, elemSz);  
         p += elemSz;  
         q += elemSz;  
     }  
43      return seq;      return seq;
44  }  }
45    
# Line 71  Line 65 
65  //! \return the address of the element that follows the array  //! \return the address of the element that follows the array
66  void *Diderot_DynSeqCopy (size_t elemSz, void *dst, Diderot_DynSeq_t *seq);  void *Diderot_DynSeqCopy (size_t elemSz, void *dst, Diderot_DynSeq_t *seq);
67    
68    //! load a dynamic sequence from a Nrrd file, where the sequence elements have bool ground type.
69    //! \param wrld the world; used to report errors
70    //! \param nin the nrrd to check
71    //! \param nDims the number of dimensions in the sequence elements
72    //! \param dims the array of sequence element dimensions
73    //! \return the dynamic sequence, or zero on error
74    Diderot_DynSeq_t *Diderot_DynSeqLoadBool (WorldPrefix_t *wrld, Nrrd *nin, unsigned int nDims, unsigned int *dims);
75    
76    //! load a dynamic sequence from a Nrrd file, where the sequence elements have int ground type.
77    //! \param wrld the world; used to report errors
78    //! \param nin the nrrd to check
79    //! \param nDims the number of dimensions in the sequence elements
80    //! \param dims the array of sequence element dimensions
81    //! \return the dynamic sequence, or zero on error
82    Diderot_DynSeq_t *Diderot_DynSeqLoadInt (WorldPrefix_t *wrld, Nrrd *nin, unsigned int nDims, unsigned int *dims);
83    
84    //! load a dynamic sequence from a Nrrd file, where the sequence elements have real ground type.
85    //! \param wrld the world; used to report errors
86    //! \param nin the nrrd to check
87    //! \param nDims the number of dimensions in the sequence elements
88    //! \param dims the array of sequence element dimensions
89    //! \return the dynamic sequence, or zero on error
90    Diderot_DynSeq_t *Diderot_DynSeqLoadReal (WorldPrefix_t *wrld, Nrrd *nin, unsigned int nDims, unsigned int *dims);
91    
92  #endif /* !_DIDEROT_DYN_SEQ_H_ */  #endif /* !_DIDEROT_DYN_SEQ_H_ */

Legend:
Removed from v.1977  
changed lines
  Added in v.1978

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0