Questions tagged [adx]

ADX is the name of Intel's arbitrary-precision arithmetic instruction set for the x86 architecture. Questions about azure data explorer should NOT use this tag; the [azure-data-explorer] tag should be used instead.

Intel ADX (Multi-Precision Add-Carry Instruction Extensions) is Intel's arbitrary-precision arithmetic extension to the x86 instruction set architecture (ISA). Intel ADX was first supported in the Broadwell micro-architecture

The instruction set extension contains just two new instructions, though MULX from BMI2 is also considered as a part of the large integer arithmetic support

Both instructions are more efficient variants of the existing ADC instruction, with the difference that each of the two new instructions affects only one flag, where ADC as a signed addition may set both overflow and carry flags, and as an old-style x86 instruction also reset the rest of the CPU flags. Having two versions affecting different flags means that two chains of additions with carry can be calculated in parallel.

Source: Wikipedia (Intel ADX)

20 questions
27
votes
3 answers

Producing good add with carry code from clang

I'm trying to produce code (currently using clang++-3.8) that adds two numbers consisting of multiple machine words. To simplify things for the moment I'm only adding 128bit numbers, but I'd like to be able to generalise this. First some…
Clinton
  • 20,364
  • 13
  • 59
  • 142
8
votes
2 answers

_addcarry_u64 and _addcarryx_u64 with MSVC and ICC

MSVC and ICC both support the intrinsics _addcarry_u64 and _addcarryx_u64. According to Intel's Intrinsic Guide and white paper these should map to adcx and adox respectively. However, by looking at the generated assembly it's clear they map to adc…
Z boson
  • 29,230
  • 10
  • 105
  • 195
6
votes
1 answer

When to use ADOX instead of ADCX?

The only difference mentioned in the Intel instruction set reference is the usage of the overflow-flag instead of the carry-flag. When does one use ADOX instead of ADCX to perform an unsigned addition with a carry?
J-M. Gorius
  • 586
  • 3
  • 15
5
votes
1 answer

Why adox and adcx don't play well together on Ryzen?

I spent quite a lot of time hand-optimizing low-level integer arithmetic, with some success. For instance, my subroutine for 6x6 multiplication spends 66 ticks compared to 82 ticks of mpn_mul_basecase(6,6) on Skylake. My code is published on…
4
votes
1 answer

Kusto row_cumsum modifying the Term if Term reaches a point

I have a list of Employee names and Salaries in the following order I need to create the output table in the below format. ie, whenever the accumulated salary-total crosses 3000 I have to detect that and mark that row. I have tried to do…
Justin Mathew
  • 419
  • 2
  • 16
2
votes
2 answers

Test case for adcx and adox

I'm testing Intel ADX add with carry and add with overflow to pipeline adds on large integers. I'd like to see what expected code generation should look like. From _addcarry_u64 and _addcarryx_u64 with MSVC and ICC, I thought this would be a…
jww
  • 83,594
  • 69
  • 338
  • 732
1
vote
2 answers

Azure Data Explorer Command dynamic parameter error

I have added "Azure Data Explorer Command" in ADF pipeline, but it is not accepting dynamic parameters inside command expression. ex: Step 1: added Azure Data Explorer Command Step 2: Added two parameters Step 3: Added dynamic expression in…
sam
  • 205
  • 1
  • 2
  • 6
1
vote
2 answers

How to convert to dynamic type/ apply multiple functions on same 'pack' in KQL/Kusto

I am absolutely in love with ADX time series capabilities; having worked tons on sensor data with Python. Below are the requirements for my case: Handle Sensor data tags at different frequencies -- bring them to all to 1 sec frequency (if in…
pyeR_biz
  • 714
  • 6
  • 25
1
vote
1 answer

adx calculation to custom columns from a matrix rather than the default HLC

I have a matrix with stock prices and various other data. it is not the ordinary yahoo download therefore the titles for open, high, low and close are different. I want to apply adx <- adx(HLC(x),10) however by default the adx function uses the HLC…
np2000
  • 37
  • 5
1
vote
2 answers

ADX function result incorrect in r

When I use the ADX function, I'm not getting the correct answer. For example, the ADX(14) value from 10/4/2017 is 12.87. The code below gives me 9.53. Any ideas why this is off? require(quantmod) tickers<-c('SPY') getSymbols(tickers,…
S Novogoratz
  • 358
  • 2
  • 12
1
vote
1 answer

Directory listing in IBM 4690 CBASIC

I'm looking for the correct ADX call to perform a directory listing of a Controller drive. From the IBM programming guide, I see ADX_TDIR, which is for terminals, is there a variant for controller program?
user1168037
  • 120
  • 6
1
vote
1 answer

How to design an Average Directional Movement Index Expert Advisor in MQL4/5?

I have a trading strategy based on ADX, in a simplest way I enter when ADX is above 30 both on the 30 minutes and hourly chart. I need to create an EA in MQL5 just to give me a sound alert, when ADX has hit level 30 both on 30 minutes and hourly…
1
vote
0 answers

Google ADX Seller Rest API: get report by custom currency

I'm using Google ADX API to get revenues report by date range. By default I'm getting the revenues in ILS but I what to get the currency in USD or EUR and I don't want to use currency conversions like…
0
votes
0 answers

Excuse me, how to change

adxlen = input(14, title="ADX Smoothing") dilen = input(14, title="DI Length") xian=input(20) dirmov(len) => up = change(high) down = -change(low) plusDM = na(up) ? na : (up > down and up > 0 ? up : 0) minusDM = na(down) ? na :…
zhang
  • 1
0
votes
1 answer

Kusto functions migration to upper environment

I have several functions on the dev ADX environment. Now I need to migrate all of them into upper environment. Is there any handy commands to export all available functions from one environment to another. I tried to export all functions as csv…
Justin Mathew
  • 419
  • 2
  • 16
1
2