Changeset 2798 in Sophya


Ignore:
Timestamp:
Jun 4, 2005, 12:05:35 AM (20 years ago)
Author:
ansari
Message:

Adaptation aux modifs 2004-2005 de SOPHYA , compil pour PBG4 - Reza 3 Juin 2005

Location:
trunk/Eval/JET
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Eval/JET/jet.h

    r2366 r2798  
    33
    44#include "machdefs.h"
     5#include "sopnamsp.h"
     6
     7
    58
    69//========================================================
     
    1922  ~MtxSize() {};
    2023  void ReSize(const MtxSize  & a) { nrow_ = a.nrow_;  ncol_ = a.ncol_; }
    21   bool CompareSize(const MtxSize & a) const ;
     24  bool CompareSize(const MtxSize & a) const
     25{
     26  if ((a.nrow_ == 0) || (a.ncol_ == 0) )
     27    throw RangeCheckError("MtxSize::CompareSize(mx) Size(mx) = 0");
     28  if ((nrow_ == a.nrow_) && (ncol_ == a.ncol_))  return true;
     29  else return false;
     30}
    2231protected:
    2332  sa_size_t nrow_, ncol_;
  • trunk/Eval/JET/makefile

    r2437 r2798  
    1 #  ------------------ SOPHYA -------------------------
    2 #    Makefile fot compiling and linking a simple C++
    3 #         program with SOPHYA class library
    4 #  ---------------------------------------------------
    5 #  GNU make program should be used with this makefile
    6 #  ---------------------------------------------------
    7 #  Usage: make prog_name
    8 #     - compiles prog_name.cc -> prog_name.o
    9 #     - links prog_name.o -> prog_name
     1include $(SOPHYABASE)/include/sophyamake.inc
    102
    11 #   SOPHYA compilation rules - OPTFLAG and DBGFLAG
    12 # can be used to define Debug and optimization flags
    13 # Additional options can be specified using USERFLAGS
    14 # USERFLAGS := -I/.../myincludes
     3all : tjet
     4        echo 'makefile : tjet made'
    155
    16 include $(SOPHYABASEREP)/Include/MakefileUser.h
     6clean :
     7        rm tjet tjet.o  smtx.o
    178
     9tjet : tjet.o  smtx.o
     10        $(CXXLINK) -o tjet tjet.o smtx.o $(SOPHYASLBLIST)
    1811
    19 # ----- List of SOPHYA libraries
    20 ifdef NOSHLIB
    21 LIBF =  $(LIB)libLinAlg.a $(LIB)libIFFTW.a $(LIB)libFitsIOServer.a $(LIB)libSamba.a $(LIB)libSkyMap.a $(LIB)libSkyT.a $(LIB)libNTools.a $(LIB)libHiStats.a $(LIB)libTArray.a $(LIB)libSysTools.a
    22 LIBS = -L$(LIB) -lLinAlg -lIFFTW -lFitsIOServer -lSamba -lSkyMap -lSkyT -lNTools -lHiStats -lTArray -lSysTools -lm
    23 ifeq ($(CXX),cxx)
    24 # librairie des instances de templates cxx
    25 LIBS := $(LIBS) -lsotcxx
    26 endif
    27 else
    28 LIBF =  $(SLB)libsophya.so $(SLB)libextsophya.so
    29 LIBS = -L$(SLB) -lextsophya -lsophya  -lm
    30 endif
     12tjet.o : tjet.cc jet.h smtx.h
     13        $(CXXCOMPILE) tjet.cc
    3114
    32 LDLIBS := $(LIBS) $(LDLIBS)
    33 
    34 %:%.cc
    35 %:%.o
    36 %.o:%.cc
    37 %.o:%.c
    38 %:%.c
    39 
    40 .PRECIOUS: % %.o
    41 
    42 
    43 #  --- Compilation and linking rules
    44 %:%.o
    45         $(LINK.cc)  -o $@ $< $(LIBS)
    46 
    47 %.o:%.cc
    48         $(COMPILE.cc)   $(USERFLAGS) -o $@ $<
    49 
    50 %:%.c
    51         $(LINK.c)  $(USERFLAGS) -o $@ $< $(LIBS)
    52 
    53 
     15smtx.o : smtx.cc jet.h smtx.h
     16        $(CXXCOMPILE) smtx.cc
  • trunk/Eval/JET/smtx.cc

    r2363 r2798  
    11#include "machdefs.h"
     2#include "pexceptions.h"
    23
    34#include <math.h>
     
    910//       Reza - Avril 2003
    1011//--------------------------------------------------------
    11 
    12 // ---------------------------------------------------
    13 // -------- Classe Taille objet Matrice --------------
    14 // ---------------------------------------------------
    15 
    16 
    17 bool MtxSize::CompareSize(const MtxSize & a) const
    18 {
    19   if ((a.nrow_ == 0) || (a.ncol_ == 0) )
    20     throw RangeCheckError("MtxSize::CompareSize(mx) Size(mx) = 0");
    21   if ((nrow_ == a.nrow_) && (ncol_ == a.ncol_))  return true;
    22   else return false;
    23 }
    2412
    2513// ---------------------------------------------------
  • trunk/Eval/JET/smtx.h

    r2363 r2798  
    66
    77#include "ndatablock.h"
     8#include "sopnamsp.h"
    89#include "ctimer.h"
    910#include "timing.h"
  • trunk/Eval/JET/tjet.cc

    r2368 r2798  
    177177      double c2 = frand01() + 3.5;
    178178      double c3 = frand01() + 6.7;
    179       m5 = m1;  m5.Mul(c1);
    180       m4 = m2;  m4.Mul(c2);
    181       m5.AddElt(m4);
    182       m4 = m3;  m3.Mul(c2);
    183       m5.AddElt(m4);
     179      /* Changement interface SOPHYA  : 2004-2005 
     180         m5 = m1;  m5.Mul(c1);
     181         m4 = m2;  m4.Mul(c2);
     182         m5.AddElt(m4);
     183         m4 = m3;  m3.Mul(c3);
     184         m5.AddElt(m4);
     185      */
     186      m1.MulCst(c1, m5);
     187      m2.MulCst(c2, m4);
     188      m5.AddElt(m4, m5);
     189      m3.MulCst(c3,m4);
     190      m4.AddElt(m5,m4);
    184191    }
    185192    cout << " (22) Add/MulElt/Cst m1*c1 + m2*c2 + m3*c3 done ---" << endl;
Note: See TracChangeset for help on using the changeset viewer.