| Thread overview | |||||
|---|---|---|---|---|---|
|
November 12, 2019 Strange function | ||||
|---|---|---|---|---|
| ||||
In druntime (core/bitop.d line 302) I found this function
```
/**
* Tests and resets (sets to 0) the bit.
*/
int btr(size_t* p, size_t bitnum) pure @system;
```
Honestly don't understand: where is the body of the function?
I thought I could find something like that:
```
int btr(size_t* p, size_t bitnum) pure @system {
// body
}
Thank you
| ||||
November 12, 2019 Re: Strange function | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Orfeo | On Tuesday, 12 November 2019 at 20:45:11 UTC, Orfeo wrote:
> In druntime (core/bitop.d line 302) I found this function
it is a magic function that the compiler recognizes and outputs a cpu instruction instead of a regular call.
core.bitop has a few of those.
| |||
November 12, 2019 Re: Strange function | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Adam D. Ruppe | On Tuesday, 12 November 2019 at 21:05:35 UTC, Adam D. Ruppe wrote:
> On Tuesday, 12 November 2019 at 20:45:11 UTC, Orfeo wrote:
>> In druntime (core/bitop.d line 302) I found this function
>
> it is a magic function that the compiler recognizes and outputs a cpu instruction instead of a regular call.
>
> core.bitop has a few of those.
Wow! Thank you very much
| |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply