Subversion Repositories gelsvn

Rev

Rev 21 | Rev 45 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 21 Rev 39
Line 97... Line 97...
97
    for(int i=0;i<k;++i)
97
    for(int i=0;i<k;++i)
98
      y *= x;
98
      y *= x;
99
    return y;
99
    return y;
100
  }
100
  }
101
 
101
 
-
 
102
	/** raw_assign takes a CGLA vector, matrix or whatever has a get() function
-
 
103
			as its first argument and a raw pointer to a (presumed scalar) entity 
-
 
104
			as the second argument. the contents dereferenced by the pointer is 
-
 
105
			copied to the entity given as first argument. */
102
  template<class T, class S>
106
  template<class T, class S>
103
  void raw_assign(T& a,  const S* b)
107
  void raw_assign(T& a,  const S* b)
104
  {
108
  {
105
    memcpy(static_cast<void*>(a.get()),static_cast<const void*>(b),sizeof(T));
109
    memcpy(static_cast<void*>(a.get()),static_cast<const void*>(b),sizeof(T));
106
  }
110
  }