Ignore:
Timestamp:
10/16/12 13:04:44 (12 years ago)
Author:
ymipsl
Message:

Major Update

  • redesign Type and attribute manipulation
  • add enumerate type and attribute
  • use blitz class array instead of boost class array

YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/test/test_xios.cpp

    r352 r369  
    1111#include "context_server.hpp" 
    1212#include "object_template.hpp" 
     13#include "array_new.hpp" 
    1314#include <mpi.h> 
    1415 
     
    2728   CBufferIn  bufferIn(&buff,sizeof(buff)) ; 
    2829   CMessage msg ; 
    29 /* 
    30    msg<<(int)3<<(int)2<<(int)1<<str ; 
    31 //   msg<<a<<b<<c ; 
    32    std::cout<<"message size : "<<msg.size()<<std::endl ; 
    33    str="turlututu" ; 
    34    bufferOut<<msg ; 
    35    msg.clear() ; 
    36    msg<<a<<b<<c<<str ; 
    37 //   bufferIn>>c>>b>>a>>str ; 
    38    bufferIn>>msg ; 
    39    std::cout<<a<<"  "<<b<<"  "<<c<<"  "<<str<<endl ; 
    40 */ 
    41 //   CAttributeTemplate<ARRAY(double,1)> tabIn ; 
    42  //  CAttributeTemplate<ARRAY(double,1)> tabOut ; 
    43    CAttributeTemplate<ARRAY(double,1)> tabIn("in") ; 
    44    CAttributeTemplate<ARRAY(double,1)> tabOut("out") ; 
    4530 
    46    ARRAY_CREATE(tab,double,1,[5]) ;  
    47  //   tab->resize(extents[5]) ; 
    48     (*tab)[0]=0 ; (*tab)[1]=1 ;(*tab)[2]=2 ; (*tab)[3]=3 ;(*tab)[4]=4 ; 
     31   CAttributeArray<double,1> tabIn("in") ; 
     32   CAttributeArray<double,1> tabOut("out") ; 
     33 
     34   CArray<double,1> tab(5) 
     35    tab=0,1,2,3,4 ; 
    4936    tabIn=tab ; 
    50     (*tab)[0]=4 ; (*tab)[1]=3 ;(*tab)[2]=2 ; (*tab)[3]=1 ;(*tab)[4]=0 ; 
     37    tab= 4,3,2,1,0 
    5138    tabOut=tab ; 
    5239//   tabOut=1 ; 
Note: See TracChangeset for help on using the changeset viewer.