Removed the horrible tockBool type, now that we are no longer using vectors to store C++ arrays
This commit is contained in:
parent
ed38f80db0
commit
a98ff8cad0
|
@ -1043,7 +1043,7 @@ cppgenSizeSuffix _ dim = tell [".extent(", dim, ")"]
|
|||
--Changed from GenerateC to change the A.Timer type to use C++CSP time.
|
||||
--Also changed the bool type, because vector<bool> in C++ is odd, so we hide it from the compiler.
|
||||
cppgetScalarType :: GenOps -> A.Type -> Maybe String
|
||||
cppgetScalarType _ A.Bool = Just "tockBool"
|
||||
cppgetScalarType _ A.Bool = Just "bool"
|
||||
cppgetScalarType _ A.Byte = Just "uint8_t"
|
||||
cppgetScalarType _ A.UInt16 = Just "uint16_t"
|
||||
cppgetScalarType _ A.UInt32 = Just "uint32_t"
|
||||
|
|
|
@ -216,7 +216,7 @@ testGenType = TestList
|
|||
,testBothSame "GenType 6" "int32_t" (tcall genType A.Int32)
|
||||
,testBothSame "GenType 7" "int64_t" (tcall genType A.Int64)
|
||||
,testBothSame "GenType 8" "int" (tcall genType A.Int)
|
||||
,testBoth "GenType 9" "bool" "tockBool" (tcall genType A.Bool)
|
||||
,testBothSame "GenType 9" "bool" (tcall genType A.Bool)
|
||||
,testBothSame "GenType 10" "float" (tcall genType A.Real32)
|
||||
,testBothSame "GenType 11" "double" (tcall genType A.Real64)
|
||||
,testBoth "GenType 100" "int*" "tockArrayView<int,1>" (tcall genType $ A.Array [A.Dimension 5] A.Int)
|
||||
|
|
|
@ -124,21 +124,6 @@ tie10(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6, T7& t7, T8& t8,
|
|||
(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10);
|
||||
}
|
||||
|
||||
//Let's assume bool is an unsigned byte:
|
||||
#define occam_mostneg_tockBool 0
|
||||
#define occam_mostpos_tockBool 255
|
||||
|
||||
class tockBool
|
||||
{
|
||||
private:
|
||||
bool b;
|
||||
public:
|
||||
inline tockBool() {}
|
||||
inline tockBool(bool _b) : b(_b) {}
|
||||
inline operator bool () const {return b;}
|
||||
inline void operator = (const bool& _b) {b = _b;}
|
||||
};
|
||||
|
||||
inline std::pair< boost::array<unsigned,1> , unsigned > tockDims(const unsigned d0)
|
||||
{
|
||||
boost::array<unsigned,1> r;
|
||||
|
|
Loading…
Reference in New Issue
Block a user