Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- template < typename type_elt >
- template < class T >
- INLINE
- Matrix< type_elt, host >&
- Matrix< type_elt, host >::operator =( T Expr ) throw() {
- // #pragma omp parallel for
- for ( int i = 0; i < m_size; i++) {
- m_data[ i ] = GetBase< type_elt >( Expr, i );
- }
- return *this;
- }
- #include <iostream>
- #include <cmath>
- #include "matrix.hpp"
- #include "clock.hpp"
- #define TYPE int
- #define BIG (sqrt(947483646 / sizeof( TYPE )))
- #define SMALL 6
- #define IMG_SIZE 1920, 160
- using namespace mat;
- using namespace std;
- int main(int argc, char** argv) {
- Matrix< TYPE, host > m1(BIG);
- Matrix< TYPE, host > m2(BIG);
- Matrix< TYPE, host > m3(BIG);
- Clock c;
- m1.pMemset( 2 );
- m2.pMemset( 2 );
- m3 = m1 + m2 + m1 + m2 + m1 + m2 + m1 + m2 + m1 + m2 + m1 + m2 + m1 + m2 + m1 + m2 + m1 + m2 + m1 + m2;
- cout << c << endl;
- return 0;
- }
Add Comment
Please, Sign In to add comment