예제 #1
0
파일: vec.hpp 프로젝트: calcuss/boost-qvm
 static
 BOOST_QVM_INLINE_CRITICAL
 scalar_type &
 iw( int i, this_vector & x )
     {
     BOOST_QVM_ASSERT(i>=0);
     BOOST_QVM_ASSERT(i<dim);
     return x.a[i];
     }
예제 #2
0
 static
 inline
 scalar_type
 ir( int i, my_stuff::vec const & m )
     {
     BOOST_QVM_ASSERT(i>=0);
     BOOST_QVM_ASSERT(i<dim);
     return m.a[i];
     }
 static
 BOOST_QVM_INLINE_CRITICAL
 scalar_type &
 write_element_idx( int i, this_quaternion & x )
     {
     BOOST_QVM_ASSERT(i>=0);
     BOOST_QVM_ASSERT(i<4);
     return x[i];
     }
예제 #4
0
 static
 inline
 scalar_type
 ir( int r, int c, my_stuff::mat const & m )
     {
     BOOST_QVM_ASSERT(r>=0);
     BOOST_QVM_ASSERT(r<rows);
     BOOST_QVM_ASSERT(c>=0);
     BOOST_QVM_ASSERT(c<cols);
     return m.a[r][c];
     }
예제 #5
0
 static
 BOOST_QVM_INLINE_CRITICAL
 scalar_type &
 write_element_idx( int row, int col, this_matrix & x )
     {
     BOOST_QVM_ASSERT(row>=0);
     BOOST_QVM_ASSERT(row<rows);
     BOOST_QVM_ASSERT(col>=0);
     BOOST_QVM_ASSERT(col<cols);
     return mat_traits<OriginalMatrix>::write_element_idx(col,row,reinterpret_cast<OriginalMatrix &>(x));
     }
예제 #6
0
파일: mat.hpp 프로젝트: EuroLine/nheqminer
 static
 BOOST_QVM_INLINE_CRITICAL
 scalar_type &
 write_element_idx( int row, int col, this_matrix & x )
     {
     BOOST_QVM_ASSERT(row>=0);
     BOOST_QVM_ASSERT(row<Rows);
     BOOST_QVM_ASSERT(col>=0);
     BOOST_QVM_ASSERT(col<Cols);
     return x.a[row][col];
     }
예제 #7
0
 static
 inline
 scalar_type
 ir( int r, int c, this_matrix_type const & m )
     {
     BOOST_QVM_ASSERT(r>=0);
     BOOST_QVM_ASSERT(r<rows);
     BOOST_QVM_ASSERT(c>=0);
     BOOST_QVM_ASSERT(c<cols);
     return m.a[r][c];
     }
예제 #8
0
 static
 BOOST_QVM_INLINE_TRIVIAL
 typename vec_traits<V>::scalar_type
 value()
     {
     BOOST_QVM_ASSERT(0);
     return typename vec_traits<V>::scalar_type();
     }
예제 #9
0
 static
 BOOST_QVM_INLINE_TRIVIAL
 S
 value()
     {
     BOOST_QVM_ASSERT(0);
     return S();
     }
예제 #10
0
 static
 BOOST_QVM_INLINE_TRIVIAL
 typename vec_traits<A>::scalar_type
 read_element_idx( A const & a, int )
     {
     BOOST_QVM_ASSERT(0);
     return vec_traits<A>::template read_element<0>(a);
     }