Files
DefinitelyTyped/types/cwise-compiler/index.d.ts
taoqf 8f7ff04d07 Add type definition for cwise-parser (#16282)
* add weixin-app

* add wx

* add new line at end of file

* tslint wx and wx-app

* fixed test error

* change project name weixin

* rename

* weixin-app Add param this

* change discription of jweixin

* add some Event declaration

* change tslint config
extends dtslint/dt.json

* add defination of ccap, qr-image

* remove redundant jsdoc

* remove doc

* allow overloads

* inline some types

* fix tslint error

* ndarray
add tslint
export like a module style

* ndarray make ndarray as a interface

* ndarray: export type Data

* add defination of cwise-parser

* add type definition for cwise-copiler

* fix tslint error

* add type definition for cwise
2017-05-03 11:10:52 -07:00

50 lines
1.3 KiB
TypeScript

// Type definitions for cwise-compiler 1.1
// Project: https://github.com/scijs/cwise-compiler
// Definitions by: taoqf <https://github.com/taoqf>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import { CompiledRoutine } from 'cwise-parser';
import * as ndarray from 'ndarray';
declare namespace cwise_compiler {
interface BlockIndice {
blockIndices: number;
}
interface OffsetArg {
offset: number[];
array: number;
}
type ArgType = 'array' | 'offset' | 'shape' | 'scalar' | 'index' | BlockIndice | OffsetArg;
interface UserArgs {
args: ArgType[];
pre: CompiledRoutine;
body: CompiledRoutine;
post: CompiledRoutine;
debug: boolean;
funcName: string;
blockSize: number;
printCode?: boolean;
}
interface Procedure {
argTypes: ArgType[];
shimArgs: string[];
arrayArgs: number[];
arrayBlockIndices: number[];
scalarArgs: number[];
offsetArgs: OffsetArg[];
offsetArgIndex: number[];
indexArgs: number[];
shapeArgs: number[];
funcName: string;
pre: CompiledRoutine;
body: CompiledRoutine;
post: CompiledRoutine;
debug: boolean;
blockSize?: number;
}
}
declare function cwise_compiler(user_args: cwise_compiler.UserArgs): (a: ndarray, b: ndarray, ...args: ndarray[]) => ndarray;
export = cwise_compiler;