ctf.hpp 21.3 KB
Newer Older
1 2
/*Copyright (c) 2011, Edgar Solomonik, all rights reserved.*/

3 4
#ifndef _tCTF_HPP_
#define _tCTF_HPP_
5 6 7 8 9 10

#include "mpi.h"
#include <stdio.h>
#include <stdint.h>
#include "../src/dist_tensor/cyclopstf.hpp"

Edgar Solomonik's avatar
Edgar Solomonik committed
11 12 13 14 15 16 17 18 19 20 21 22 23 24
/**
 * labels corresponding to symmetry of each tensor dimension
 * NS = 0 - nonsymmetric
 * SY = 1 - symmetric
 * AS = 2 - antisymmetric
 * SH = 3 - symmetric hollow
 */
#if (!defined NS && !defined SY && !defined SH)
#define NS 0
#define SY 1
#define AS 2
#define SH 3
#endif

solomon's avatar
solomon committed
25
typedef int64_t lont_int;
solomon's avatar
solomon committed
26

Edgar Solomonik's avatar
Edgar Solomonik committed
27 28 29 30 31 32
/**
 * \brief reduction types for tensor data (enum actually defined in ../src/dist_tensor/cyclopstf.hpp)
 */
//enum CTF_OP { CTF_OP_SUM, CTF_OP_SUMABS, CTF_OP_SQNRM2,
//              CTF_OP_MAX, CTF_OP_MIN, CTF_OP_MAXABS, CTF_OP_MINABS };

33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
/* custom element-wise function for tensor scale */
template<typename dtype>
class tCTF_fscl {
  public:
    /**
     * \brief function signature for element-wise scale operation
     * \param[in] alpha scaling value, defined in scale call 
     *            but subject to internal change due to symmetry
     * \param[in,out] a element from tensor A
     **/
    void  (*func_ptr)(dtype const alpha, 
                      dtype &     a);
  public:
    tCTF_fscl() { func_ptr = NULL; }
};
/* custom element-wise function for tensor sum */
template<typename dtype>
class tCTF_fsum {
  public:
    /**
     * \brief function signature for element-wise summation operation
     * \param[in] alpha scaling value, defined in summation call 
     *            but subject to internal change due to symmetry
     * \param[in] a element from summand tensor A
     * \param[in,out] b element from summand tensor B
     **/
    void  (*func_ptr)(dtype const alpha, 
                      dtype const a,
                      dtype &     b);
  public:
    tCTF_fsum() { func_ptr = NULL; }
};
/* custom element-wise function for tensor contraction */
template<typename dtype>
class tCTF_fctr {
  public:
    /**
     * \brief function signature for element-wise contraction operation
     * \param[in] alpha scaling value, defined in contraction call 
     *            but subject to internal change due to symmetry
     * \param[in] a element from contraction tensor A
     * \param[in] b element from contraction tensor B
     * \param[in,out] c element from contraction tensor C
     **/
    void  (*func_ptr)(dtype const alpha, 
                      dtype const a, 
                      dtype const b,
                      dtype &     c);
  public:
    tCTF_fctr() { func_ptr = NULL; }
};

85
/**
86
 * \brief an instance of the tCTF library (world) on a MPI communicator
87
 */
88 89
template<typename dtype>
class tCTF_World {
90 91
  public:
    MPI_Comm comm;
92
    tCTF<dtype> * ctf;
93 94 95

  public:
    /**
96 97 98 99 100
     * \brief creates tCTF library on comm_ that can output profile data 
     *        into a file with a name based on the main args
     * \param[in] comm_ MPI communicator associated with this CTF instance
     * \param[in] argc number of main arguments 
     * \param[in] argv main arguments 
101
     */
102 103 104
    tCTF_World(int const      argc,
               char * const * argv);

105
    /**
106 107 108 109 110
     * \brief creates tCTF library on comm_ that can output profile data 
     *        into a file with a name based on the main args
     * \param[in] comm_ MPI communicator associated with this CTF instance
     * \param[in] argc number of main arguments 
     * \param[in] argv main arguments 
111
     */
112 113 114
    tCTF_World(MPI_Comm       comm_ = MPI_COMM_WORLD,
               int const      argc = 0,
               char * const * argv = NULL);
115 116

    /**
117
     * \brief creates tCTF library on comm_
Edgar Solomonik's avatar
Edgar Solomonik committed
118 119
     * \param[in] ndim number of torus network dimensions
     * \param[in] lens lengths of torus network dimensions
120
     * \param[in] comm MPI global context for this CTF World
121 122
     * \param[in] argc number of main arguments 
     * \param[in] argv main arguments 
123
     */
124 125 126 127 128
    tCTF_World(int const      ndim, 
               int const *    lens, 
               MPI_Comm       comm_ = MPI_COMM_WORLD,
               int const      argc = 0,
               char * const * argv = NULL);
129 130

    /**
131
     * \brief frees tCTF library
132
     */
133
    ~tCTF_World();
134 135
};

136 137 138
template<typename dtype>
class tCTF_Idx_Tensor;

139
/**
140
 * \brief an instance of a tensor within a tCTF world
141
 */
142 143
template<typename dtype>
class tCTF_Tensor {
144
  public:
145 146
    int tid, ndim;
    int * sym, * len;
147
    char * idx_map;
148
    char const * name;
149
    tCTF_Tensor * ctr_nbr;
150
    tCTF_World<dtype> * world;
151 152

  public:
153 154 155 156 157
    /**
     * \breif default constructor sets nothing 
     */
    tCTF_Tensor(){};

158 159
    /**
     * \brief copies a tensor (setting data to zero or copying A)
Edgar Solomonik's avatar
Edgar Solomonik committed
160 161
     * \param[in] A tensor to copy
     * \param[in] copy whether to copy the data of A into the new tensor
162
     */
Edgar Solomonik's avatar
Edgar Solomonik committed
163
    tCTF_Tensor(tCTF_Tensor const &   A,
164
                bool const            copy = true);
165 166 167

    /**
     * \brief copies a tensor filled with zeros
Edgar Solomonik's avatar
Edgar Solomonik committed
168 169 170 171
     * \param[in] ndim number of dimensions of tensor
     * \param[in] len edge lengths of tensor
     * \param[in] sym symmetries of tensor (e.g. symmetric matrix -> sym={SY, NS})
     * \param[in] world_ a world for the tensor to live in
172 173
     * \param[in] name an optionary name for the tensor
     * \param[in] profile set to 1 to profile contractions involving this tensor
174
     */
175
    tCTF_Tensor(int const            ndim_,
Edgar Solomonik's avatar
Edgar Solomonik committed
176 177
                int const *          len_,
                int const *          sym_,
178 179 180
                tCTF_World<dtype> &  world_,
                char const *         name_ = NULL,
                int const            profile_ = 0);
181 182 183 184 185 186 187
    
    /**
     * \brief gives the values associated with any set of indices
     * \param[in] npair number of values to fetch
     * \param[in] global_idx index within global tensor of each value to fetch
     * \param[in,out] data a prealloced pointer to the data with the specified indices
     */
solomon's avatar
solomon committed
188 189
    void get_remote_data(long_int const    npair, 
                         long_int const *  global_idx, 
190
                         dtype *          data) const;
191
    
192 193 194 195 196 197 198 199
    /**
     * \brief gives the values associated with any set of indices
     * \param[in] npair number of values to fetch
     * \param[in,out] pairs a prealloced pointer to key-value pairs
     */
    void get_remote_data(long_int const    npair,
                         tkv_pair<dtype> * pairs) const;

200 201 202 203 204 205
    /**
     * \brief writes in values associated with any set of indices
     * \param[in] npair number of values to write into tensor
     * \param[in] global_idx global index within tensor of value to write
     * \param[in] data values to  write to the indices
     */
solomon's avatar
solomon committed
206 207
    void write_remote_data(long_int const   npair, 
                           long_int const * global_idx, 
208
                           dtype const   * data);
209 210 211 212 213 214 215 216

    /**
     * \brief writes in values associated with any set of indices
     * \param[in] npair number of values to write into tensor
     * \param[in] pairs key-value pairs to write to the tensor
     */
    void write_remote_data(long_int const   npair,
                           tkv_pair<dtype> const * pairs);
217 218 219
   
    /**
     * \brief contracts C[idx_C] = beta*C[idx_C] + alpha*A[idx_A]*B[idx_B]
220
     *        if fseq defined computes fseq(alpha,A[idx_A],B[idx_B],beta*C[idx_C])
Edgar Solomonik's avatar
Edgar Solomonik committed
221 222 223 224 225 226 227
     * \param[in] alpha A*B scaling factor
     * \param[in] A first operand tensor
     * \param[in] idx_A indices of A in contraction, e.g. "ik" -> A_{ik}
     * \param[in] B second operand tensor
     * \param[in] idx_B indices of B in contraction, e.g. "kj" -> B_{kj}
     * \param[in] beta C scaling factor
     * \param[in] idx_C indices of C (this tensor),  e.g. "ij" -> C_{ij}
228 229 230 231 232 233 234 235 236 237 238
     * \param[in] fseq sequential operation to execute, default is multiply-add
     */
    void contract(dtype const              alpha, 
                  const tCTF_Tensor&       A, 
                  char const *             idx_A,
                  const tCTF_Tensor&       B, 
                  char const *             idx_B,
                  dtype const              beta,
                  char const *             idx_C,
                  tCTF_fctr<dtype>         fseq = tCTF_fctr<dtype>());
    
239 240
    /**
     * \brief sums B[idx_B] = beta*B[idx_B] + alpha*A[idx_A]
241
     *        if fseq defined computes fseq(alpha,A[idx_A],beta*B[idx_B])
Edgar Solomonik's avatar
Edgar Solomonik committed
242 243 244 245 246
     * \param[in] alpha A scaling factor
     * \param[in] A first operand tensor
     * \param[in] idx_A indices of A in sum, e.g. "ij" -> A_{ij}
     * \param[in] beta B scaling factor
     * \param[in] idx_B indices of B (this tensor), e.g. "ij" -> B_{ij}
247 248 249 250 251 252 253 254
     * \param[in] fseq sequential operation to execute, default is multiply-add
     */
    void sum(dtype const             alpha, 
             const tCTF_Tensor&      A, 
             char const *            idx_A,
             dtype const             beta,
             char const *            idx_B,
             tCTF_fsum<dtype>        fseq = tCTF_fsum<dtype>());
255 256 257
    
    /**
     * \brief scales A[idx_A] = alpha*A[idx_A]
258 259 260 261
     *        if fseq defined computes fseq(alpha,A[idx_A])
     * \param[in] alpha A scaling factor
     * \param[in] idx_A indices of A (this tensor), e.g. "ij" -> A_{ij}
     * \param[in] fseq sequential operation to execute, default is multiply-add
262
     */
263 264 265
    void scale(dtype const             alpha, 
               char const *            idx_A,
               tCTF_fscl<dtype>        fseq = tCTF_fscl<dtype>());
266

267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293
    /**
     * \brief cuts out a slice (block) of this tensor A[offsets,ends)
     * \param[in] offsets bottom left corner of block
     * \param[in] ends top right corner of block
     * \return new tensor corresponding to requested slice
     */
    tCTF_Tensor slice(int const * offsets,
                      int const * ends);
    
    /**
     * \brief cuts out a slice (block) of this tensor = B
     *   B[offsets,ends)=beta*B[offsets,ends) + alpha*A[offsets_A,ends_A)
     * \param[in] offsets bottom left corner of block
     * \param[in] ends top right corner of block
     * \param[in] alpha scaling factor of this tensor
     * \param[in] offsets bottom left corner of block of A
     * \param[in] ends top right corner of block of A
     * \param[in] alpha scaling factor of tensor A
     */
    void sum_slice(int const *    offsets,
                   int const *    ends,
                   double         beta,
                   tCTF_Tensor &  A,
                   int const *    offsets_A,
                   int const *    ends_A,
                   double         alpha);

Edgar Solomonik's avatar
Edgar Solomonik committed
294 295 296 297
    /**
     * \brief aligns data mapping with tensor A
     * \param[in] A align with this tensor
     */
298
    void align(tCTF_Tensor const & A);
Edgar Solomonik's avatar
Edgar Solomonik committed
299

300 301
    /**
     * \brief performs a reduction on the tensor
302
     * \param[in] op reduction operation (see top of this cyclopstf.hpp for choices)
303
     */    
304
    dtype reduce(CTF_OP op);
305 306 307 308 309 310

    /**
     * \brief gives the raw current local data with padding included
     * \param[out] size of local data chunk
     * \return pointer to local data
     */
solomon's avatar
solomon committed
311
    dtype * get_raw_data(long_int * size);
312 313 314 315 316 317

    /**
     * \brief gives a read-only copy of the raw current local data with padding included
     * \param[out] size of local data chunk
     * \return pointer to read-only copy of local data
     */
solomon's avatar
solomon committed
318
    const dtype * raw_data(long_int * size) const;
319 320 321 322 323 324 325

    /**
     * \brief gives the global indices and values associated with the local data
     * \param[out] npair number of local values
     * \param[out] global_idx index within global tensor of each data value
     * \param[out] data pointer to local values in the order of the indices
     */
solomon's avatar
solomon committed
326 327
    void get_local_data(long_int *   npair, 
                        long_int **  global_idx, 
328
                        dtype **    data) const;
329

330 331 332 333 334 335 336 337
    /**
     * \brief gives the global indices and values associated with the local data
     * \param[out] npair number of local values
     * \param[out] pairs pointer to local key-value pairs
     */
    void get_local_data(long_int *   npair,
                        tkv_pair<dtype> ** pairs) const;

338 339 340 341 342
    /**
     * \brief collects the entire tensor data on each process (not memory scalable)
     * \param[out] npair number of values in the tensor
     * \param[out] data pointer to the data of the entire tensor
     */
solomon's avatar
solomon committed
343
    void get_all_data(long_int * npair, 
344
                      dtype **  data) const;
345 346 347 348 349 350 351 352 353

    /**
     * \brief sparse add: A[global_idx[i]] = alpha*A[global_idx[i]]+beta*data[i]
     * \param[in] npair number of values to write into tensor
     * \param[in] alpha scaling factor on original data
     * \param[in] beta scaling factor on value to add
     * \param[in] global_idx global index within tensor of value to add
     * \param[in] data values to add to the tensor
     */
solomon's avatar
solomon committed
354
    void add_remote_data(long_int const    npair, 
355 356
                         dtype const      alpha, 
                         dtype const      beta,
solomon's avatar
solomon committed
357
                         long_int const *  global_idx,
Edgar Solomonik's avatar
Edgar Solomonik committed
358
                         dtype const *    data);
359 360 361 362 363 364 365 366 367 368 369 370

    /**
     * \brief sparse add: A[pairs[i].k] = alpha*A[pairs[i].k]+beta*pairs[i].d
     * \param[in] npair number of values to write into tensor
     * \param[in] alpha scaling factor on original data
     * \param[in] beta scaling factor on value to add
     * \param[in] pairs key-value pairs to add to the tensor
     */
    void add_remote_data(long_int const    npair,
                         dtype const      alpha,
                         dtype const      beta,
                         tkv_pair<dtype> const * pairs);
371 372 373 374 375 376 377 378
    /**
     * \brief obtains a small number of the biggest elements of the 
     *        tensor in sorted order (e.g. eigenvalues)
     * \param[in] n number of elements to collect
     * \param[in] data output data (should be preallocated to size at least n)
     *
     * WARNING: currently functional only for dtype=double
     */
379 380 381 382 383 384 385 386 387 388 389 390 391 392
    void get_max_abs(int const  n,
                     dtype *    data);

    // \brief turns on profiling for tensor
    void profile_on();
    
    // \brief turns off profiling for tensor
    void profile_off();

    /**
     * \brief sets tensor name
     * \param[in] name new for tensor
     */
    void set_name(char const * name);
393 394 395 396

    /**
     * \brief sets all values in the tensor to val
     */
397
    tCTF_Tensor& operator=(dtype const val);
398
    
399 400 401 402 403 404
    /**
     * \brief sets the tensor
     */
    void operator=(tCTF_Tensor<dtype> A);
    
    
405 406
    /**
     * \brief associated an index map with the tensor for future operation
407
     * \param[in] idx_map_ index assignment for this tensor
408
     */
409
    tCTF_Idx_Tensor<dtype>& operator[](char const * idx_map_);
410
    
411 412
    /**
     * \brief prints tensor data to file using process 0
413
     * \param[in] fp file to print to e.g. stdout
414 415 416 417 418 419 420 421 422
     * \param[in] cutoff do not print values of absolute value smaller than this
     */
    void print(FILE * fp = stdout, double cutoff = -1.0) const;

    /**
     * \brief prints two sets of tensor data side-by-side to file using process 0
     * \param[in] fp file to print to e.g. stdout
     * \param[in] A tensor to compare against
     * \param[in] cutoff do not print values of absolute value smaller than this
423
     */
424
    void compare(const tCTF_Tensor<dtype>& A, FILE * fp = stdout, double cutoff = -1.0) const;
425 426

    /**
427
     * \brief frees tCTF tensor
428
     */
429
    ~tCTF_Tensor();
430
};
431

432 433 434 435 436 437 438 439 440 441 442 443 444 445
/**
 * \brief Matrix class which encapsulates a 2D tensor 
 */
template<typename dtype> 
class tCTF_Matrix : public tCTF_Tensor<dtype> {
  public:
    int nrow, ncol, sym;

    /**
     * \brief constructor for a matrix
     * \param[in] nrow number of matrix rows
     * \param[in] ncol number of matrix columns
     * \param[in] sym symmetry of matrix
     * \param[in] world CTF world where the tensor will live
446 447
     * \param[in] name_ an optionary name for the tensor
     * \param[in] profile_ set to 1 to profile contractions involving this tensor
448 449 450 451
     */ 
    tCTF_Matrix(int const           nrow_, 
                int const           ncol_, 
                int const           sym_,
452 453 454
                tCTF_World<dtype> & world,
                char const *        name_ = NULL,
                int const           profile_ = 0);
455 456 457 458 459 460 461 462 463 464 465 466 467 468 469

};

/**
 * \brief Vector class which encapsulates a 1D tensor 
 */
template<typename dtype> 
class tCTF_Vector : public tCTF_Tensor<dtype> {
  public:
    int len;

    /**
     * \brief constructor for a vector
     * \param[in] len_ dimension of vector
     * \param[in] world CTF world where the tensor will live
470 471
     * \param[in] name_ an optionary name for the tensor
     * \param[in] profile_ set to 1 to profile contractions involving this tensor
472
     */ 
Edgar Solomonik's avatar
Edgar Solomonik committed
473
    tCTF_Vector(int const           len_,
474 475 476
                tCTF_World<dtype> & world,
                char const *        name_ = NULL,
                int const           profile_ = 0);
Edgar Solomonik's avatar
Edgar Solomonik committed
477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513
};

/**
 * \brief Scalar class which encapsulates a 0D tensor 
 */
template<typename dtype> 
class tCTF_Scalar : public tCTF_Tensor<dtype> {
  public:

    /**
     * \brief constructor for a scalar
     * \param[in] world CTF world where the tensor will live
     */ 
    tCTF_Scalar(tCTF_World<dtype> & world);
    
    /**
     * \brief constructor for a scalar with predefined value
     * \param[in] val scalar value
     * \param[in] world CTF world where the tensor will live
     */ 
    tCTF_Scalar(dtype const         val,
                tCTF_World<dtype> & world);

    /**
     * \brief returns scalar value
     */
    dtype get_val();
    
    /**
     * \brief sets scalar value
     */
    void set_val(dtype const val);

    /**
     * \brief casts into a dtype value
     */
    operator dtype() { return get_val(); }
514 515
};

516 517 518 519 520
template<typename dtype> static
tCTF_Idx_Tensor<dtype>& operator*(double d, tCTF_Idx_Tensor<dtype>& tsr){
  return tsr*d;
}

521 522 523 524
template tCTF_Idx_Tensor<double>& 
            operator*(double d, tCTF_Idx_Tensor<double> & tsr);
template tCTF_Idx_Tensor< std::complex<double> >& 
            operator*(double  d, tCTF_Idx_Tensor< std::complex<double> > & tsr);
525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560


/**
 * \brief a tensor with an index map associated with it (necessary for overloaded operators)
 */
template<typename dtype>
class tCTF_Idx_Tensor {
  public:
    tCTF_Tensor<dtype> * parent;
    char * idx_map;
    int has_contract, has_scale, has_sum, is_intm;
    double scale;
    tCTF_Idx_Tensor<dtype> * NBR;

  public:
    /**
     * \brief constructor takes in a parent tensor and its indices 
     * \param[in] parent_ the parent tensor
     * \param[in] idx_map_ the indices assigned ot this tensor
     */
    tCTF_Idx_Tensor(tCTF_Tensor<dtype>* parent_, const char * idx_map_);

    ~tCTF_Idx_Tensor();
    
    /**
     * \brief A = B, compute any operations on operand B and set
     * \param[in] B tensor on the right hand side
     */
    void operator=(tCTF_Idx_Tensor<dtype>& B);

    /**
     * \brief A += B, compute any operations on operand B and add
     * \param[in] B tensor on the right hand side
     */
    void operator+=(tCTF_Idx_Tensor<dtype>& B);
    
Edgar Solomonik's avatar
Edgar Solomonik committed
561 562 563 564 565 566
    /**
     * \brief A += B, compute any operations on operand B and add
     * \param[in] B tensor on the right hand side
     */
    void operator-=(tCTF_Idx_Tensor<dtype>& B);
    
567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602
    /**
     * \brief A -> A*B contract two tensors
     * \param[in] B tensor on the right hand side
     */
    void operator*=(tCTF_Idx_Tensor<dtype>& B);

    /**
     * \brief C -> A*B contract two tensors
     * \param[in] B tensor on the right hand side
     */
    tCTF_Idx_Tensor<dtype>& operator*(tCTF_Idx_Tensor<dtype>& B);

    /**
     * \brief A -> A+B sums two tensors
     * \param[in] B tensor on the right hand side
     */
    tCTF_Idx_Tensor<dtype>& operator+(tCTF_Idx_Tensor<dtype>& B);
    
    /**
     * \brief A -> A-B subtacts two tensors
     * \param[in] tsr tensor on the right hand side
     */
    tCTF_Idx_Tensor<dtype>& operator-(tCTF_Idx_Tensor<dtype>& B);
    
    /**
     * \brief A -> A-B subtacts two tensors
     * \param[in] tsr tensor on the right hand side
     */
    tCTF_Idx_Tensor<dtype>& operator*(double const scl);


    /**
     * \brief TODO A -> A * B^-1
     * \param[in] B
     */
    //void operator/(tCTF_IdxTensor& tsr);
Edgar Solomonik's avatar
Edgar Solomonik committed
603 604 605 606 607
    
    /**
     * \brief casts into a double if dimension of evaluated expression is 0
     */
    operator dtype();
608 609 610 611 612 613 614 615

    /**
     * \brief execute ips into output with scale beta
     */    
    void run(tCTF_Idx_Tensor<dtype>* output, double beta);

};

616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632
class CTF_Timer{
  public:
    char const * timer_name;
    int index;
    int exited;
    int original;
  
  public:
    CTF_Timer(char const * name);
    ~CTF_Timer();
    void stop();
    void start();
    void exit();
    
};


633 634 635 636 637 638 639 640 641 642 643
/* these typedefs yield a non-tempalated interface for double and complex<double> */
typedef tCTF<double>                        CTF;
typedef tCTF_Tensor<double>                 CTF_Tensor;
typedef tCTF_Matrix<double>                 CTF_Matrix;
typedef tCTF_Vector<double>                 CTF_Vector;
typedef tCTF_Scalar<double>                 CTF_Scalar;
typedef tCTF_World<double>                  CTF_World;
typedef tCTF_fscl<double>                   CTF_fscl;
typedef tCTF_fsum<double>                   CTF_fsum;
typedef tCTF_fctr<double>                   CTF_fctr;
typedef tCTF< std::complex<double> >        cCTF;
Edgar Solomonik's avatar
Edgar Solomonik committed
644 645 646
typedef tCTF_Tensor< std::complex<double> > cCTF_Tensor;
typedef tCTF_Matrix< std::complex<double> > cCTF_Matrix;
typedef tCTF_Vector< std::complex<double> > cCTF_Vector;
Edgar Solomonik's avatar
Edgar Solomonik committed
647
typedef tCTF_Scalar< std::complex<double> > cCTF_Scalar;
648 649 650 651
typedef tCTF_World< std::complex<double> >  cCTF_World;
typedef tCTF_fscl< std::complex<double> >   cCTF_fscl;
typedef tCTF_fsum< std::complex<double> >   cCTF_fsum;
typedef tCTF_fctr< std::complex<double> >   cCTF_fctr;
652
#endif