Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Force std::size_t to use UInt64 (unsigned long)

Reply
Thread Tools

Force std::size_t to use UInt64 (unsigned long)

 
 
greg.ruthenbeck@gmail.com
Guest
Posts: n/a
 
      01-23-2007
Hi,

I'm using Boost::uBLAS::mapped_matrix for working with sparse matrices.
At the moment, the maximum dimension of mapped_matrix is 65535x65535
since std::size_t compiles as unsigned int (UInt32).

I'm looking for a way of increasing this limit. The best way I can
think of would be to ensure that size_t uses a bigger (64-bit) type
rather than the current UInt32.

Can I force std::size_t to be defined as unsigned long? How/where?
I'm using VC 2005 (VC on Windows.

Thanks for your support.

Cheers,
Greg

 
Reply With Quote
 
 
 
 
Victor Bazarov
Guest
Posts: n/a
 
      01-23-2007
wrote:
> I'm using Boost::uBLAS::mapped_matrix for working with sparse
> matrices. At the moment, the maximum dimension of mapped_matrix is
> 65535x65535 since std::size_t compiles as unsigned int (UInt32).
>
> I'm looking for a way of increasing this limit. The best way I can
> think of would be to ensure that size_t uses a bigger (64-bit) type
> rather than the current UInt32.
>
> Can I force std::size_t to be defined as unsigned long?


Usually that's compiler-dependent. But what would be the point?
'unsigned long' is 32 bits on Windows.

> How/where?
> I'm using VC 2005 (VC on Windows.


You need to ask in 'microsoft.public.vc.language' or other relevant
newsgroup. My suspicion is that you need to go 64 bits.

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask


 
Reply With Quote
 
 
 
 
greg.ruthenbeck@gmail.com
Guest
Posts: n/a
 
      01-23-2007
Can I use template arguments to force the use of std::map<double,
unsigned long> ?


wrote:
> Hi,
>
> I'm using Boost::uBLAS::mapped_matrix for working with sparse matrices.
> At the moment, the maximum dimension of mapped_matrix is 65535x65535
> since std::size_t compiles as unsigned int (UInt32).
>
> I'm looking for a way of increasing this limit. The best way I can
> think of would be to ensure that size_t uses a bigger (64-bit) type
> rather than the current UInt32.
>
> Can I force std::size_t to be defined as unsigned long? How/where?
> I'm using VC 2005 (VC on Windows.
>
> Thanks for your support.
>
> Cheers,
> Greg


 
Reply With Quote
 
greg.ruthenbeck@gmail.com
Guest
Posts: n/a
 
      01-23-2007

Victor Bazarov wrote:
> > Can I force std::size_t to be defined as unsigned long?

>
> Usually that's compiler-dependent. But what would be the point?
> 'unsigned long' is 32 bits on Windows.


Sorry, I meant to say 'unsigned long long' which is equivalent to
__uint64

Victor Bazarov wrote:
> > How/where?
> > I'm using VC 2005 (VC on Windows.

>
> You need to ask in 'microsoft.public.vc.language' or other relevant
> newsgroup. My suspicion is that you need to go 64 bits.


Will try them. If anyone who sees this post who knows how to force
size_t to use __uint64 please post.

Greg

 
Reply With Quote
 
greg.ruthenbeck@gmail.com
Guest
Posts: n/a
 
      01-23-2007

Victor Bazarov wrote:
> > Can I force std::size_t to be defined as unsigned long?

>
> Usually that's compiler-dependent. But what would be the point?
> 'unsigned long' is 32 bits on Windows.


Sorry, I meant to say 'unsigned long long' which is equivalent to
__uint64

Victor Bazarov wrote:
> > How/where?
> > I'm using VC 2005 (VC on Windows.

>
> You need to ask in 'microsoft.public.vc.language' or other relevant
> newsgroup. My suspicion is that you need to go 64 bits.


Will try them. If anyone who sees this post who knows how to force
size_t to use __uint64 please post.

Greg

 
Reply With Quote
 
Victor Bazarov
Guest
Posts: n/a
 
      01-23-2007
wrote:
> Victor Bazarov wrote:
>>> Can I force std::size_t to be defined as unsigned long?

>>
>> Usually that's compiler-dependent. But what would be the point?
>> 'unsigned long' is 32 bits on Windows.

>
> Sorry, I meant to say 'unsigned long long' which is equivalent to
> __uint64


There is no "unsigned long long" in C++.

> Victor Bazarov wrote:
>>> How/where?
>>> I'm using VC 2005 (VC on Windows.

>>
>> You need to ask in 'microsoft.public.vc.language' or other relevant
>> newsgroup. My suspicion is that you need to go 64 bits.

>
> Will try them. If anyone who sees this post who knows how to force
> size_t to use __uint64 please post.


Whatever 'size_t' is defined to is governed by the implementation,
not by the programmer. You need to go to the newsgroup that deals
with your implementation.

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Nike air force one, air force 1, air force one low cut, air force one salewholeta@163.com Digital Photography 3 12-31-2008 04:29 PM
Nike Air Force Ones,Air Force One Air Force One-1 lky52193@gmail.com Computer Support 0 01-17-2008 04:40 PM
Nike Air Force Ones,Air Force One Air Force One-1,25th anniversary lky52112@gmail.com Digital Photography 0 01-15-2008 04:46 PM
Nike Air Force Ones,Air Force One Air Force One-1,25th anniversary lky52112@gmail.com Digital Photography 0 01-15-2008 04:34 PM
MacOS Extension Carbon.File.FSCatalogInfo file sizes should be UInt64? donbro Python 2 11-01-2005 12:02 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57