473,666 Members | 2,065 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

reinterpret_cas t portability/alignment issues

Greetings,

I have some code that is to read unformatted data from disc and interpret
it as blocks of unsigned integers. In an attempt to achieve efficiency
(it is pretty essential for my application that the code be
speed optimized[*]) I use reinterpret_cas t to alias a block of chars read
in from disc as a block of integer "words". My existing code (see
simplified code below) appears to work well enough on the platforms
available to me, but I would like to achieve maximum portability and would
really appreciate any commentary on possible portability (and also memory
alignment) issues that might arise from my approach.

I understand that in some sense all bets are off when using
reinterpret_cas t as details will be implementation-defined but I can't see
why my aliasing method (with suitable checks) should cause any problems.

As to memory alignment for efficient access to my memory buffer, I'm not
sure how global operator new handles memory alignment (I shouldn't think
the standard has anything to say about this), so I might be prepared to
either (i) "manually" align my memory blocks - not actually sure how to do
this or how much portability might be achieved with this approach) - or
(ii) use malloc / memalign, whatever, from the (or rather "a") C library,
where alignment behaviour might be more precisely specified (eg the GNU C
library). Of course there will be portability issues with this approach.

In essence my problem seems to involve a potential trade-off between
efficiency and portability. Again, any comments, suggestions, alternative
approaches welcome.

Simplified code below.
[*] The code to be used in anger is to grab random numbers from huge
binary data files for a statistical application ... I have identified
random number manipulation as a time bottleneck.

--- BEGIN CODE ----

// main.cpp

#include <iostream>
#include <fstream>
#include <string>

// Read unformatted data from disc and interpret as unsigned integers

int main()
{
// the word type (an unsigned integer type - season to taste)
typedef unsigned long word_t;

// number of chars per word
const size_t wordsize = sizeof(word_t);
std::cout << "wordsize = " << wordsize << '\n';

// data file (we open with ios::ate since we want to get file size first)
const std::string bitsfile = "bits.dat";
std::ifstream bfs(bitsfile.c_ str(),std::ios: :in|std::ios::b inary|std::ios: :ate);
if (!bfs.is_open() ) {
std::cerr << "failed to open file " << bitsfile << '\n';
return 1;
}

// get file size
const size_t cfilesize = bfs.tellg();
std::cout << "filesize = " << cfilesize << " chars\n";

// number of bytes (chars) to read - mustn't be bigger than file size!
const size_t cblocksize = 128;
std::cout << "block size (char) = " << cblocksize << '\n';
if (cblocksize>cfi lesize) {
std::cerr << "block size cannnot be larger than file size\n";
return 1;
}

// number of words to write - must be divisible by word size!
const size_t wblocksize = cblocksize/wordsize;
std::cout << "block size (word) = " << wblocksize << '\n';
if (wblocksize*wor dsize != cblocksize) {
std::cerr << "block size must be divisible by word size\n";
return 1;
}

// char buffer for reading
// COMMENTS? alignement issues?
char* const cbuf(new char[cblocksize]);

// word buffer for writing aliased to char buffer
// COMMENTS? how portable is this...?
// COMMENTS? alignement issues?
const word_t* const wbuf(reinterpre t_cast<word_t* const>(cbuf));

// seek to beginning of file and read block of chars
bfs.seekg(0);
bfs.read(cbuf,c blocksize);
bfs.close();

// write out words
for (size_t i;i<wblocksize; ++i) std::cout << "word " << i << " = " << wbuf[i] << '\n';

// clean up
delete [] cbuf;

return 0;
}

--- END CODE ----

--
Lionel B
Dec 31 '06 #1
10 3803
Hi

I didn't go through all your code but some quick nodes
I would new it as a 'word ' array not as a 'character' array just to make
sure it is at the right boundary. You can the reinterpret_cas t to char* and
now that it is correctly alligned.

There are usually compiler options you can set. In visual studio you can set
aliignement for your project or add pragma ... directives in different
places.

If you write and read from a systems with different architectures
(big/little endian) your code of course will fail

BTW does the getfilesize really work (shouldn't you relocate the get ptr to
the end of file first)?

Regards, Ron AF Greve

http://moonlit.xs4all.nl

"Lionel B" <me@privacy.net wrote in message
news:KK******** *********@newsf e5-win.ntli.net...
Greetings,

I have some code that is to read unformatted data from disc and interpret
it as blocks of unsigned integers. In an attempt to achieve efficiency
(it is pretty essential for my application that the code be
speed optimized[*]) I use reinterpret_cas t to alias a block of chars read
in from disc as a block of integer "words". My existing code (see
simplified code below) appears to work well enough on the platforms
available to me, but I would like to achieve maximum portability and would
really appreciate any commentary on possible portability (and also memory
alignment) issues that might arise from my approach.

I understand that in some sense all bets are off when using
reinterpret_cas t as details will be implementation-defined but I can't see
why my aliasing method (with suitable checks) should cause any problems.

As to memory alignment for efficient access to my memory buffer, I'm not
sure how global operator new handles memory alignment (I shouldn't think
the standard has anything to say about this), so I might be prepared to
either (i) "manually" align my memory blocks - not actually sure how to do
this or how much portability might be achieved with this approach) - or
(ii) use malloc / memalign, whatever, from the (or rather "a") C library,
where alignment behaviour might be more precisely specified (eg the GNU C
library). Of course there will be portability issues with this approach.

In essence my problem seems to involve a potential trade-off between
efficiency and portability. Again, any comments, suggestions, alternative
approaches welcome.

Simplified code below.
[*] The code to be used in anger is to grab random numbers from huge
binary data files for a statistical application ... I have identified
random number manipulation as a time bottleneck.

--- BEGIN CODE ----

// main.cpp

#include <iostream>
#include <fstream>
#include <string>

// Read unformatted data from disc and interpret as unsigned integers

int main()
{
// the word type (an unsigned integer type - season to taste)
typedef unsigned long word_t;

// number of chars per word
const size_t wordsize = sizeof(word_t);
std::cout << "wordsize = " << wordsize << '\n';

// data file (we open with ios::ate since we want to get file size first)
const std::string bitsfile = "bits.dat";
std::ifstream
bfs(bitsfile.c_ str(),std::ios: :in|std::ios::b inary|std::ios: :ate);
if (!bfs.is_open() ) {
std::cerr << "failed to open file " << bitsfile << '\n';
return 1;
}

// get file size
const size_t cfilesize = bfs.tellg();
std::cout << "filesize = " << cfilesize << " chars\n";

// number of bytes (chars) to read - mustn't be bigger than file size!
const size_t cblocksize = 128;
std::cout << "block size (char) = " << cblocksize << '\n';
if (cblocksize>cfi lesize) {
std::cerr << "block size cannnot be larger than file size\n";
return 1;
}

// number of words to write - must be divisible by word size!
const size_t wblocksize = cblocksize/wordsize;
std::cout << "block size (word) = " << wblocksize << '\n';
if (wblocksize*wor dsize != cblocksize) {
std::cerr << "block size must be divisible by word size\n";
return 1;
}

// char buffer for reading
// COMMENTS? alignement issues?
char* const cbuf(new char[cblocksize]);

// word buffer for writing aliased to char buffer
// COMMENTS? how portable is this...?
// COMMENTS? alignement issues?
const word_t* const wbuf(reinterpre t_cast<word_t* const>(cbuf));

// seek to beginning of file and read block of chars
bfs.seekg(0);
bfs.read(cbuf,c blocksize);
bfs.close();

// write out words
for (size_t i;i<wblocksize; ++i) std::cout << "word " << i << " = " <<
wbuf[i] << '\n';

// clean up
delete [] cbuf;

return 0;
}

--- END CODE ----

--
Lionel B

Dec 31 '06 #2
Lionel B wrote:
>
// char buffer for reading
// COMMENTS? alignement issues?
char* const cbuf(new char[cblocksize]);

// word buffer for writing aliased to char buffer
// COMMENTS? how portable is this...?
// COMMENTS? alignement issues?
const word_t* const wbuf(reinterpre t_cast<word_t* const>(cbuf));
If you're casting the direct return from new (as you are here), it
should be OK. new char[] is required to return a "universall y"
aligned thing as long as you allocate at least as much as the
thing you are aligning to.

Of course, the universal guarantee is you can always alias things
to chars and they work. So rather than allocating a buffer of
char, you can allocate a buffer of something else and then
cast it to char to read/copy-in the data.
Dec 31 '06 #3
Oops don't mind the BTW missed the ate and the comment :-(

Regards, Ron AF Greve

http://moonlit.xs4all.nl

"Moonlit" <news moonlit xs4all nlwrote in message
news:45******** *************@n ews.xs4all.nl.. .
Hi

I didn't go through all your code but some quick nodes
I would new it as a 'word ' array not as a 'character' array just to make
sure it is at the right boundary. You can the reinterpret_cas t to char*
and now that it is correctly alligned.

There are usually compiler options you can set. In visual studio you can
set aliignement for your project or add pragma ... directives in different
places.

If you write and read from a systems with different architectures
(big/little endian) your code of course will fail

BTW does the getfilesize really work (shouldn't you relocate the get ptr
to the end of file first)?

Regards, Ron AF Greve

http://moonlit.xs4all.nl

"Lionel B" <me@privacy.net wrote in message
news:KK******** *********@newsf e5-win.ntli.net...
>Greetings,

I have some code that is to read unformatted data from disc and interpret
it as blocks of unsigned integers. In an attempt to achieve efficiency
(it is pretty essential for my application that the code be
speed optimized[*]) I use reinterpret_cas t to alias a block of chars
read
in from disc as a block of integer "words". My existing code (see
simplified code below) appears to work well enough on the platforms
available to me, but I would like to achieve maximum portability and
would
really appreciate any commentary on possible portability (and also memory
alignment) issues that might arise from my approach.

I understand that in some sense all bets are off when using
reinterpret_ca st as details will be implementation-defined but I can't
see
why my aliasing method (with suitable checks) should cause any problems.

As to memory alignment for efficient access to my memory buffer, I'm not
sure how global operator new handles memory alignment (I shouldn't think
the standard has anything to say about this), so I might be prepared to
either (i) "manually" align my memory blocks - not actually sure how to
do
this or how much portability might be achieved with this approach) - or
(ii) use malloc / memalign, whatever, from the (or rather "a") C library,
where alignment behaviour might be more precisely specified (eg the GNU C
library). Of course there will be portability issues with this approach.

In essence my problem seems to involve a potential trade-off between
efficiency and portability. Again, any comments, suggestions, alternative
approaches welcome.

Simplified code below.

[*] The code to be used in anger is to grab random numbers from huge
binary data files for a statistical application ... I have identified
random number manipulation as a time bottleneck.

--- BEGIN CODE ----

// main.cpp

#include <iostream>
#include <fstream>
#include <string>

// Read unformatted data from disc and interpret as unsigned integers

int main()
{
// the word type (an unsigned integer type - season to taste)
typedef unsigned long word_t;

// number of chars per word
const size_t wordsize = sizeof(word_t);
std::cout << "wordsize = " << wordsize << '\n';

// data file (we open with ios::ate since we want to get file size first)
const std::string bitsfile = "bits.dat";
std::ifstrea m
bfs(bitsfile.c _str(),std::ios ::in|std::ios:: binary|std::ios ::ate);
if (!bfs.is_open() ) {
std::cerr << "failed to open file " << bitsfile << '\n';
return 1;
}

// get file size
const size_t cfilesize = bfs.tellg();
std::cout << "filesize = " << cfilesize << " chars\n";

// number of bytes (chars) to read - mustn't be bigger than file size!
const size_t cblocksize = 128;
std::cout << "block size (char) = " << cblocksize << '\n';
if (cblocksize>cfi lesize) {
std::cerr << "block size cannnot be larger than file size\n";
return 1;
}

// number of words to write - must be divisible by word size!
const size_t wblocksize = cblocksize/wordsize;
std::cout << "block size (word) = " << wblocksize << '\n';
if (wblocksize*wor dsize != cblocksize) {
std::cerr << "block size must be divisible by word size\n";
return 1;
}

// char buffer for reading
// COMMENTS? alignement issues?
char* const cbuf(new char[cblocksize]);

// word buffer for writing aliased to char buffer
// COMMENTS? how portable is this...?
// COMMENTS? alignement issues?
const word_t* const wbuf(reinterpre t_cast<word_t* const>(cbuf));

// seek to beginning of file and read block of chars
bfs.seekg(0) ;
bfs.read(cbuf, cblocksize);
bfs.close();

// write out words
for (size_t i;i<wblocksize; ++i) std::cout << "word " << i << " = " <<
wbuf[i] << '\n';

// clean up
delete [] cbuf;

return 0;
}

--- END CODE ----

--
Lionel B


Dec 31 '06 #4
On Sun, 31 Dec 2006 15:43:55 +0100, Moonlit wrote:
Hi

I didn't go through all your code but some quick nodes
I would new it as a 'word ' array not as a 'character' array just to make
sure it is at the right boundary. You can the reinterpret_cas t to char* and
now that it is correctly alligned.
Right. So if I do:

word_t* const wbuf(new word_t[wblocksize]);
const char* const cbuf(reinterpre t_cast<char* const>(wbuf));

then wbuf will be guaranteed to be aligned on a word boundary? If so, then
presumably the following:
There are usually compiler options you can set. In visual studio you can set
aliignement for your project or add pragma ... directives in different
places.
would not then be relevant.
If you write and read from a systems with different architectures
(big/little endian) your code of course will fail
I am aware of that - I will probably find/write a utility to reverse the
endianess of the raw data on disc as the simplest approach acceptable for
my app.

Thanks,

--
Lionel B
Jan 1 '07 #5
On Sun, 31 Dec 2006 09:45:18 -0500, Ron Natalie wrote:
Lionel B wrote:
>>
// char buffer for reading
// COMMENTS? alignement issues?
char* const cbuf(new char[cblocksize]);

// word buffer for writing aliased to char buffer
// COMMENTS? how portable is this...?
// COMMENTS? alignement issues?
const word_t* const wbuf(reinterpre t_cast<word_t* const>(cbuf));
If you're casting the direct return from new (as you are here), it
should be OK. new char[] is required to return a "universall y"
aligned thing as long as you allocate at least as much as the
thing you are aligning to.
Not sure I understand that...
Of course, the universal guarantee is you can always alias things
to chars and they work. So rather than allocating a buffer of
char, you can allocate a buffer of something else and then
cast it to char to read/copy-in the data.
Yes, my original code allocated a word_t buffer then aliased it to char*
.... can't remember why I changed it. So if I do it this way:

word_t* const wbuf(new word_t[wblocksize]);
const char* const cbuf(reinterpre t_cast<char* const>(wbuf));

does this then guarantee that wbuf will be aligned on a word boundary?

--
Lionel B
Jan 1 '07 #6

Lionel B wrote:
Greetings,

I have some code that is to read unformatted data from disc and interpret
it as blocks of unsigned integers. In an attempt to achieve efficiency
(it is pretty essential for my application that the code be
speed optimized[*]) I use reinterpret_cas t to alias a block of chars read
in from disc as a block of integer "words". My existing code (see
simplified code below) appears to work well enough on the platforms
available to me, but I would like to achieve maximum portability and would
really appreciate any commentary on possible portability (and also memory
alignment) issues that might arise from my approach.
The numbers you get back will be completely different if
reading/writing on architectures with different endianness.

Jan 1 '07 #7
Hi,

"Lionel B" <me@privacy.net wrote in message
news:Pw******** ********@newsfe 7-win.ntli.net...
On Sun, 31 Dec 2006 15:43:55 +0100, Moonlit wrote:
>Hi

I didn't go through all your code but some quick nodes
I would new it as a 'word ' array not as a 'character' array just to
make
sure it is at the right boundary. You can the reinterpret_cas t to char*
and
now that it is correctly alligned.

Right. So if I do:

word_t* const wbuf(new word_t[wblocksize]);
const char* const cbuf(reinterpre t_cast<char* const>(wbuf));

then wbuf will be guaranteed to be aligned on a word boundary? If so, then
presumably the following:
Yes
>There are usually compiler options you can set. In visual studio you can
set
aliignement for your project or add pragma ... directives in different
places.
would not then be relevant.
You sometimes still need to allign an array of characters. For instance say
you have a union of 2 classes (not pointers to) at sometime you want to make
the
reserved room into a real object. Before that as far as I know (but I may be
wrong) you can only allocate them as character arrays.

But there are probably more occasions when you want allignment maybe if you
generated assembly from within you app or something like that.
>
>If you write and read from a systems with different architectures
(big/little endian) your code of course will fail

I am aware of that - I will probably find/write a utility to reverse the
endianess of the raw data on disc as the simplest approach acceptable for
my app.

Thanks,

--
Lionel B
Regards, Ron AF Greve

http://moonlit.xs4all.nl
Jan 1 '07 #8
On Windows platform,you should call Windows API function to make sure
memory correctly aligned,such as VirtualAlloc.
And I think C++'s new operator don't do any alignment job.
"Lionel B дµÀ£º
"
Greetings,

I have some code that is to read unformatted data from disc and interpret
it as blocks of unsigned integers. In an attempt to achieve efficiency
(it is pretty essential for my application that the code be
speed optimized[*]) I use reinterpret_cas t to alias a block of chars read
in from disc as a block of integer "words". My existing code (see
simplified code below) appears to work well enough on the platforms
available to me, but I would like to achieve maximum portability and would
really appreciate any commentary on possible portability (and also memory
alignment) issues that might arise from my approach.

I understand that in some sense all bets are off when using
reinterpret_cas t as details will be implementation-defined but I can't see
why my aliasing method (with suitable checks) should cause any problems.

As to memory alignment for efficient access to my memory buffer, I'm not
sure how global operator new handles memory alignment (I shouldn't think
the standard has anything to say about this), so I might be prepared to
either (i) "manually" align my memory blocks - not actually sure how to do
this or how much portability might be achieved with this approach) - or
(ii) use malloc / memalign, whatever, from the (or rather "a") C library,
where alignment behaviour might be more precisely specified (eg the GNU C
library). Of course there will be portability issues with this approach.

In essence my problem seems to involve a potential trade-off between
efficiency and portability. Again, any comments, suggestions, alternative
approaches welcome.

Simplified code below.
[*] The code to be used in anger is to grab random numbers from huge
binary data files for a statistical application ... I have identified
random number manipulation as a time bottleneck.

--- BEGIN CODE ----

// main.cpp

#include <iostream>
#include <fstream>
#include <string>

// Read unformatted data from disc and interpret as unsigned integers

int main()
{
// the word type (an unsigned integer type - season to taste)
typedef unsigned long word_t;

// number of chars per word
const size_t wordsize = sizeof(word_t);
std::cout << "wordsize = " << wordsize << '\n';

// data file (we open with ios::ate since we want to get file size first)
const std::string bitsfile = "bits.dat";
std::ifstream bfs(bitsfile.c_ str(),std::ios: :in|std::ios::b inary|std::ios: :ate);
if (!bfs.is_open() ) {
std::cerr << "failed to open file " << bitsfile << '\n';
return 1;
}

// get file size
const size_t cfilesize = bfs.tellg();
std::cout << "filesize = " << cfilesize << " chars\n";

// number of bytes (chars) to read - mustn't be bigger than file size!
const size_t cblocksize = 128;
std::cout << "block size (char) = " << cblocksize << '\n';
if (cblocksize>cfi lesize) {
std::cerr << "block size cannnot be larger than file size\n";
return 1;
}

// number of words to write - must be divisible by word size!
const size_t wblocksize = cblocksize/wordsize;
std::cout << "block size (word) = " << wblocksize << '\n';
if (wblocksize*wor dsize != cblocksize) {
std::cerr << "block size must be divisible by word size\n";
return 1;
}

// char buffer for reading
// COMMENTS? alignement issues?
char* const cbuf(new char[cblocksize]);

// word buffer for writing aliased to char buffer
// COMMENTS? how portable is this...?
// COMMENTS? alignement issues?
const word_t* const wbuf(reinterpre t_cast<word_t* const>(cbuf));

// seek to beginning of file and read block of chars
bfs.seekg(0);
bfs.read(cbuf,c blocksize);
bfs.close();

// write out words
for (size_t i;i<wblocksize; ++i) std::cout << "word " << i << " = " << wbuf[i] << '\n';

// clean up
delete [] cbuf;

return 0;
}

--- END CODE ----

--
Lionel B
Jan 2 '07 #9
Lionel B wrote:
On Sun, 31 Dec 2006 09:45:18 -0500, Ron Natalie wrote:
>Lionel B wrote:
>> // char buffer for reading
// COMMENTS? alignement issues?
char* const cbuf(new char[cblocksize]);

// word buffer for writing aliased to char buffer
// COMMENTS? how portable is this...?
// COMMENTS? alignement issues?
const word_t* const wbuf(reinterpre t_cast<word_t* const>(cbuf));
If you're casting the direct return from new (as you are here), it
should be OK. new char[] is required to return a "universall y"
aligned thing as long as you allocate at least as much as the
thing you are aligning to.

Not sure I understand that...
If you call new char[n* sizeof (word_t) ]
it will return something guaranteed to meet the word_t requirements.
It's a hokiness added specifically for new char to let you use it
to allocate memory, lets say to further pass to placement new or
do cames like you want.
does this then guarantee that wbuf will be aligned on a word boundary?
Of course. wbuf will be aligned and so with cbuf
Jan 2 '07 #10

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

Similar topics

7
1616
by: fabio de francesco | last post by:
Hi, I'm not a professional programmer, but I've been writing C/C++ and Ada programs for a few years on GNU/Linux without ever concerning on standards and portability to other OSs. I've always noted that when I write code I must use lots of platform specific system calls (POSIX and X/OPEN). Often I found myself using threads and concurrent processes with some sort of IPC. Some time I need some socket API. When I just want to open a...
13
3092
by: Jakob Bieling | last post by:
Hi, I am trying to determine the endianness of the system as follows: int i = 1; bool is_little = *reinterpret_cast <char*> (&i) != 0; But now I was asking myself, if this use of reinterpret_cast is valid, according to the Standard.
93
3628
by: roman ziak | last post by:
I just read couple articles on this group and it keeps amazing me how the portability is used as strong argument for language cleanliness. In my opinion, porting the program (so you just take the source code and recompile) is a myth started 20-30 years ago when world consisted of UNIX systems. Well, world does not consist of UNIX systems anymore, but there are 100s of different systems running in cell-phones, DVD players, game consoles...
35
5444
by: Sunil | last post by:
Hi all, I am using gcc compiler in linux.I compiled a small program int main() { printf("char : %d\n",sizeof(char)); printf("unsigned char : %d\n",sizeof(unsigned char)); printf("short : %d\n",sizeof(short)); printf("unsigned short : %d\n",sizeof(unsigned short)); printf("int : %d\n",sizeof(int));
11
3791
by: Someonekicked | last post by:
I want to save tables of integers to files. One way to write the cells as fixed size in the file, is to use reinterpret_cast. Is that a bad choice, good choice? I remember once before I posted a program using it, and some suggested that I might get errors using it. are there any other ways to write the cells as fixed size in the file? (knowing the cells will only contain integers). here is how I plan to do it (without much caring...
4
2661
by: tkirankumar | last post by:
Hi all, This is regarding the issue I am facing while porting the my application from SuSe Linux to Sun Solaris. The Existing system details: Itanium boxes 1mhz 4 processor 8 gb machines with SuSe Linux $ uname -a Linux longrtedged01 2.4.21-215-itanium2-smp #1 SMP Mon Apr 26 16:28:29
27
4319
by: Noah Roberts | last post by:
What steps do people take to make sure that when dealing with C API callback functions that you do the appropriate reinterpret_cast<>? For instance, today I ran into a situation in which the wrong type was the target of a cast. Of course with a reinterpret_cast nothing complains until the UB bites you in the ass. It seems to me that there ought to be a way to deal with these kinds of functions yet still retain some semblance of type...
12
1763
by: ralpe | last post by:
Hi, I have a template class foo which stores pairs of Keys and Ts in a vector. Foo has an accessor function at(size_t) that returns a reference to the pair at the specified index. I do not want the users of foo to change the first value of a pair, so I want to return a reference to a pair<const Key, T>, just like std::map does. I cannot store pairs with a const first value in the vector because such pairs would not be assignable.
8
2818
by: Stephen Horne | last post by:
I understand that the next C++ standard will have features to handle the alignment of data types. This is good, but a bit late for me! I've been using some template trickery to handle alignment issues for some time. What I usually want is a type that takes the same amount of space and has the same alignment as some other type, but which doesn't have constructors, destructors etc. The idea is that initialisation and cleanup can be done...
0
8444
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
8551
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8639
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7386
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6198
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4198
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4368
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2011
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1775
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.