473,503 Members | 1,725 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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 (VC8) on Windows.

Thanks for your support.

Cheers,
Greg

Jan 23 '07 #1
5 2987
gr*************@gmail.com 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 (VC8) 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
Jan 23 '07 #2
Can I use template arguments to force the use of std::map<double,
unsigned long?
gr*************@gmail.com 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 (VC8) on Windows.

Thanks for your support.

Cheers,
Greg
Jan 23 '07 #3

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 (VC8) 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

Jan 23 '07 #4

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 (VC8) 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

Jan 23 '07 #5
gr*************@gmail.com 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 (VC8) 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
Jan 23 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
6169
by: Christopher | last post by:
can someone refresh my meory on what std::size_t is used for? I am wondering if my template container class should have it's capacity as a size_t or an int? , Christopher
2
2330
by: Guo Congbin | last post by:
if size_t is a macro, where is the defination? i look it up in the stddef.h, but i find nothing about size_t. this is the content of stddef.h of my system, #ifndef _LINUX_STDDEF_H #define...
3
14216
by: JKop | last post by:
I'm writing a ".cpp" and ".hpp" combination. The ".hpp" just contains one sole function declaration. The ".cpp" makes use of the function "std::strlen" and the type "std::size_t".
5
3342
by: Pelle Beckman | last post by:
Hi, Honestly, what is this 'size_t'? And while I'm at it - what is a 'mutable' var.? I've understood it somehow makes a const a non-const, but what's the point of that? Short explanations?...
2
1943
by: earthwormgaz | last post by:
I am trying to add the headers for a library I am using to a namespace to avert issues with name clashes. namespace Lib { #include <Lib/SomeFile.h> }; I am finding though that statements to...
3
2801
Axon
by: Axon | last post by:
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. I'm...
7
4347
Axon
by: Axon | last post by:
Is there a way to force std::size_t to be compiled as __uint64 (before STL etc are compiled). Where is size_t defined?
27
2314
by: mike3 | last post by:
Hi. I can't believe I may have to use an array here. I've got this bignum package I was making in C++ for a fractal generator, and tried an approach that was suggested to me here a while...
4
1827
by: Juha Nieminen | last post by:
Unknownmat wrote: VS2005 has a bug related to this. When you use size_t, it internally converts it to 'unsigned int'. In some situations it forgets that the type was actually size_t and only...
0
7202
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7086
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
6991
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7462
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
3167
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3154
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1512
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
736
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
382
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.