Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Complete the Col Major ( Column Major ) code with SIMD using C + + . / / 1 . Vect _ Col _ SIMD.h
Complete the Col MajorColumn Major code with SIMD using C VectColSIMD.h #ifndef VectColSIMDH #define VectColSIMDH #include #include class MatrixColSIMD; Rules: No implementation in Header No inline keyword class VectColSIMD public: VectColSIMD default; VectColSIMDconst VectColSIMD &tmp default; VectColSIMD &operator const VectColSIMD &tmp default; ~VectColSIMD default; VectColSIMDconst float tx const float ty const float tz const float tw; public: union mm; struct float x; float y; float z; float w; ; ; ; #endif End of File VectColSIMD.cpp #include "VectColSIMD.h VectColSIMD::VectColSIMDconst float tx const float ty const float tz const float tw : xtx yty ztz wtw End of File MatrixColSIMD.h #ifndef MatrixColSIMDH #define MatrixColSIMDH #include "VectColSIMD.h Rules: Implement for Col Major No implementation in Header Proxy optional Proxies are the only thing that can have the keyword "inline" inline only for subsitution resolving.. that's it No constructors or other operators... only proxy for substituion purpose example: this is allowed inline MM operator const MatrixColSIMD &m const MatrixColSIMD &n No proxy implementation in header conversion operator needs to be implemented in CPP file proxy constructors are allowed in header only exception class MatrixColSIMD public: MatrixColSIMD default; MatrixColSIMDconst MatrixColSIMD &tmp default; MatrixColSIMD &operatorconst MatrixColSIMD &tmp default; ~MatrixColSIMD default; MatrixColSIMDconst VectColSIMD &tV const VectColSIMD &tV const VectColSIMD &tV const VectColSIMD &tV; MatrixColSIMD operator const MatrixColSIMD &n; VectColSIMD operator const VectColSIMD &n; union struct VectColSIMD v; VectColSIMD v; VectColSIMD v; VectColSIMD v; ; struct float m; float m; float m; float m; float m; float m; float m; float m; float m; float m; float m; float m; float m; float m; float m; float m; ; ; ; #endif End of File MatrixColSIMD.cpp #include "VectColSIMD.h #include "MatrixColSIMD.h MatrixColSIMD::MatrixColSIMDconst VectColSIMD &tV const VectColSIMD &tV const VectColSIMD &tV const VectColSIMD &tV : vtV vtV vtV vtV VectColSIMD MatrixColSIMD::operator const VectColSIMD &vb TODO : fix here MatrixColSIMD MatrixColSIMD::operator const MatrixColSIMD &mb TODO : fix here End of File Must can pass below test : MatrixColSIMD RxVectColSIMDffff VectColSIMDffff VectColSIMDffff VectColSIMDffff; MatrixColSIMD RyVectColSIMDffff VectColSIMDffff VectColSIMDffff VectColSIMDffff; MatrixColSIMD RzVectColSIMDffff VectColSIMDffff VectColSIMDffff VectColSIMDffff; MatrixColSIMD TVectColSIMDffff VectColSIMDffff VectColSIMDf
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started
Complete the Col MajorColumn Major code with SIMD using C
VectColSIMD.h
#ifndef VectColSIMDH
#define VectColSIMDH
#include
#include
class MatrixColSIMD;
Rules:
No implementation in Header
No inline keyword
class VectColSIMD
public:
VectColSIMD default;
VectColSIMDconst VectColSIMD &tmp default;
VectColSIMD &operator const VectColSIMD &tmp default;
~VectColSIMD default;
VectColSIMDconst float tx const float ty const float tz const float tw;
public:
union
mm;
struct
float x;
float y;
float z;
float w;
;
;
;
#endif
End of File
VectColSIMD.cpp
#include "VectColSIMD.h
VectColSIMD::VectColSIMDconst float tx const float ty const float tz const float tw
: xtx yty ztz wtw
End of File
MatrixColSIMD.h
#ifndef MatrixColSIMDH
#define MatrixColSIMDH
#include "VectColSIMD.h
Rules:
Implement for Col Major
No implementation in Header
Proxy optional
Proxies are the only thing that can have the keyword "inline"
inline only for subsitution resolving.. that's it
No constructors or other operators... only proxy for substituion purpose
example: this is allowed
inline MM operator const MatrixColSIMD &m const MatrixColSIMD &n
No proxy implementation in header
conversion operator needs to be implemented in CPP file
proxy constructors are allowed in header only exception
class MatrixColSIMD
public:
MatrixColSIMD default;
MatrixColSIMDconst MatrixColSIMD &tmp default;
MatrixColSIMD &operatorconst MatrixColSIMD &tmp default;
~MatrixColSIMD default;
MatrixColSIMDconst VectColSIMD &tV
const VectColSIMD &tV
const VectColSIMD &tV
const VectColSIMD &tV;
MatrixColSIMD operator const MatrixColSIMD &n;
VectColSIMD operator const VectColSIMD &n;
union
struct
VectColSIMD v;
VectColSIMD v;
VectColSIMD v;
VectColSIMD v;
;
struct
float m;
float m;
float m;
float m;
float m;
float m;
float m;
float m;
float m;
float m;
float m;
float m;
float m;
float m;
float m;
float m;
;
;
;
#endif
End of File
MatrixColSIMD.cpp
#include "VectColSIMD.h
#include "MatrixColSIMD.h
MatrixColSIMD::MatrixColSIMDconst VectColSIMD &tV const VectColSIMD &tV const VectColSIMD &tV const VectColSIMD &tV
: vtV vtV vtV vtV
VectColSIMD MatrixColSIMD::operator const VectColSIMD &vb
TODO : fix here
MatrixColSIMD MatrixColSIMD::operator const MatrixColSIMD &mb
TODO : fix here
End of File
Must can pass below test :
MatrixColSIMD RxVectColSIMDffff
VectColSIMDffff
VectColSIMDffff
VectColSIMDffff;
MatrixColSIMD RyVectColSIMDffff
VectColSIMDffff
VectColSIMDffff
VectColSIMDffff;
MatrixColSIMD RzVectColSIMDffff
VectColSIMDffff
VectColSIMDffff
VectColSIMDffff;
MatrixColSIMD TVectColSIMDffff
VectColSIMDffff
VectColSIMDf
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started