FLImaging 6.5.16.1
Scalar.h
1#pragma once
2
3#if _MSC_VER >= 1900 && defined(_M_X64)
4
5#include <cstdint>
6#include <vector>
7
8namespace FLImaging
9{
10 namespace AI
11 {
12 template <typename T>
13 class FL_EXPORT CTensor;
14
15 template <typename T>
16 class CScalar : public Base::CFLBase
17 {
18 public:
19 CScalar() = delete;
20 CScalar(const CScalar<T>& tsrValue);
21 CScalar(const CScalar<T>* pScalar, int64_t i64CurRankIndex);
22 CScalar(const T* pData, int64_t i64Rank, std::vector<int64_t>* m_pVctPitchByRankAsc, int64_t i64CurRankIndex);
23
24 operator const T& () const;
25 operator const T* () const;
26 const T& operator=(const T t);
27 CScalar<T> operator[](int32_t i32Index) const;
28 CScalar<T> operator[](uint32_t u32Index) const;
29 CScalar<T> operator[](int64_t i64Index) const;
30 CScalar<T> operator[](uint64_t u64Index) const;
31
32
33 DeclareGetClassType();
34 SupportToDuplicateObjectWithoutCreateNewObject(CScalar, *this);
35
36 protected:
37 int64_t m_i64Rank;
38 int64_t m_i64Cursor;
39 std::vector<int64_t>* m_pVctPitchByRankAsc;
40 const T* m_pData;
41
42 friend class FL_EXPORT CTensor<T>;
43 };
44 }
45}
46
47#endif