repo_name stringlengths 6 97 | path stringlengths 3 341 | text stringlengths 8 1.02M |
|---|---|---|
sophgo/tpu_compiler | include/tpuc/CustomOp.h | #ifndef CVI_CUSTOM_OP_H
#define CVI_CUSTOM_OP_H
#include <assert.h>
#include <iostream>
#include <map>
#include <cmath>
#include <vector>
#include <memory>
#include <string>
#include <typeinfo>
#include <stdint.h>
#include "tpuc/CustomOpParam.h"
namespace cvi {
class CustomOp {
public:
CustomOp(OpParam ¶m) : p... |
sophgo/tpu_compiler | include/tpuc/TPUOperationSupport.h | <reponame>sophgo/tpu_compiler
//===- Passes.h - Pass Entrypoints ------------------------------*- C++ -*-===//
//
// Copyright 2019 The MLIR Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the ... |
sophgo/tpu_compiler | include/tpuc/TPUTensorSupport.h | //===- Passes.h - Pass Entrypoints ------------------------------*- C++ -*-===//
//
// Copyright 2019 The MLIR Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.... |
sophgo/tpu_compiler | include/tpuc/CpuLayer_DetectionOutput.h | //===- Passes.h - Pass Entrypoints ------------------------------*- C++ -*-===//
//
// Copyright 2019 The MLIR Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.... |
sophgo/tpu_compiler | include/tpuc/MlirModuleInterpreter.h | #ifndef MLIR_MODULE_INTERPRETER_H_
#define MLIR_MODULE_INTERPRETER_H_
#include "mlir/Dialect/StandardOps/IR/Ops.h"
#include "mlir/IR/BuiltinOps.h"
#include "mlir/IR/MLIRContext.h"
#include "tpuc/Interpreter/cpukernel.h"
#include "tpuc/MachineInfo.h"
#include "tpuc/QuantizationArithmetic.h"
#include "tpuc/Support/Tenso... |
sophgo/tpu_compiler | include/tpuc/MachineInfo.h | <filename>include/tpuc/MachineInfo.h
#ifndef _TP_MACHINE_INFO_H_
#define _TP_MACHINE_INFO_H_
#include "llvm/Support/raw_ostream.h"
#include "llvm/Support/MathExtras.h"
#include "tpuc/Dialect/TPU/TPUDialect.h"
#include "tpuc/TPUOperationSupport.h"
#include "tpuc/TPUTensorSupport.h"
#include "tpuc/Passes.h"
#include "ml... |
sophgo/tpu_compiler | include/tpuc/CpuLayer_FasterRCNN.h | #ifndef CPU_LAYER_FASTER_RCNN_H
#define CPU_LAYER_FASTER_RCNN_H
#include <vector>
typedef struct {
float x1, y1, x2, y2;
} coord;
typedef struct {
coord bbox;
int cls;
float score;
} detections;
void _mkanchors(std::vector<float> ctrs, std::vector<float> &anchors) {
anchors.push_back(ctrs[2] - 0.... |
sophgo/tpu_compiler | include/tpuc/CustomOpPlugin.h | #ifndef CVI_CUSTOM_OP_PLUGIN_H_
#define CVI_CUSTOM_OP_PLUGIN_H_
#include <stdint.h>
#include <memory>
#include <vector>
#include <map>
#include "llvm/Support/DynamicLibrary.h"
#include "tpuc/CustomOpParam.h"
#include "tpuc/CustomOp.h"
namespace cvi {
using CustomOpCreateFn = CustomOp *(*) (OpParam &);
class CustomO... |
sophgo/tpu_compiler | include/tpuc/DivideOpsToSubFunc.h | <reponame>sophgo/tpu_compiler
//===- Passes.h - Pass Entrypoints ------------------------------*- C++ -*-===//
//
// Copyright 2019 The MLIR Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the ... |
timsnyder/ctng-compilers-feedstock | recipe/tests/libhowdy.c | #include <stdio.h>
void howdy(void) {
printf("Howdy Y'all!\n");
}
|
timsnyder/ctng-compilers-feedstock | recipe/tests/howdy-dso.c | #include <libhowdy.h>
int main(void) {
howdy();
return 0;
}
|
timsnyder/ctng-compilers-feedstock | recipe/tests/libhowdy.h | #ifndef _LIBHOWDY_H
#define _LIBHOWDY_H
extern void howdy(void);
#endif
|
poparide/IKHTTP | Pods/Headers/Public/IKResults/IKResultsCommon.h | //
// IKResultsCommon.h
// IKResults
//
// Created by <NAME> on 1/07/2015.
// Copyright (c) 2015 IanKeen. All rights reserved.
//
#define PERFORM_SELECTOR_WITHOUT_WARNINGS(code) _Pragma("clang diagnostic push") _Pragma("clang diagnostic ignored \"-Warc-performSelector-leaks\"") code; _Pragma("clang diagnostic pop"... |
poparide/IKHTTP | Pods/Headers/Public/IKResults/AsyncResultGroup.h | <gh_stars>1-10
//
// AsyncResultGroup.h
// IKResults
//
// Created by <NAME> on 30/06/2015.
// Copyright (c) 2015 IanKeen. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "AsyncResult.h"
typedef void(^asyncResultGroupFinally)(NSArray *results);
@interface AsyncResultGroup : NSObject
/**
* Rep... |
poparide/IKHTTP | IKHTTP/IKHTTP.h | //
// IKHTTP
//
// Created by <NAME> on 5/06/2015.
// Copyright (c) 2015 IanKeen. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <IKResults/AsyncResult.h>
@interface FileData : NSObject
+(instancetype)fileWithMimeType:(NSString *)mimeType fieldName:(NSString *)fieldName fileName:(NSString *)file... |
poparide/IKHTTP | Pods/IKEvents/IKEvents/WeakReference.h | /*
http://stackoverflow.com/a/14219598
*/
#import <Foundation/Foundation.h>
@interface WeakReference : NSObject {
__weak id nonretainedObjectValue;
__unsafe_unretained id originalObjectValue;
}
+(WeakReference *)weakReferenceWithObject:(id)object;
-(id)nonretainedObjectValue;
-(void *)originalObjectValue;
@e... |
poparide/IKHTTP | IKHTTP/IKHTTPResponseHandler.h | <reponame>poparide/IKHTTP
//
// IKHTTPResponseHandler
//
// Created by <NAME> on 5/06/2015.
// Copyright (c) 2015 IanKeen. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <IKResults/Result.h>
#import <IKEvents/IKEvent.h>
@protocol IKHTTPResponseHandler <NSObject>
-(Result *)handleResponse:(NSURLR... |
poparide/IKHTTP | Pods/Headers/Public/IKEvents/IKEvent.h | <reponame>poparide/IKHTTP
//
// IKEvent
//
// Created by <NAME> on 2/06/2015.
// Copyright (c) 2015 IanKeen. All rights reserved.
//
#import <Foundation/Foundation.h>
#define IKEVENTS
/**
* IKEvent provides a simple pub/sub mechanism that handles reference lifecycle so you dont have to
*/
@interface IKEvent : ... |
poparide/IKHTTP | IKHTTP/IKHTTPSession.h | <filename>IKHTTP/IKHTTPSession.h
//
// IKHTTPSession
//
// Created by <NAME> on 5/06/2015.
// Copyright (c) 2015 IanKeen. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "IKHTTP.h"
#import "IKHTTPResponseHandler.h"
typedef NSDictionary *(^httpCommonHeaders)(void);
typedef NSDictionary *(^httpComm... |
poparide/IKHTTP | IKHTTP/IKHTTPDefaultResponseHandler.h | <reponame>poparide/IKHTTP
//
// IKHTTPDefaultResponseHandler.h
// HitchPlanet
//
// Created by <NAME> on 9/07/2015.
// Copyright (c) 2015 HitchPlanet. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "IKHTTPResponseHandler.h"
@interface IKHTTPDefaultResponseHandler : NSObject <IKHTTPResponseHandl... |
poparide/IKHTTP | Pods/Headers/Public/IKResults/Result.h | <reponame>poparide/IKHTTP
//
// Result
//
// Created by <NAME> on 2/06/2015.
// Copyright (c) 2015 IanKeen. All rights reserved.
//
#import <Foundation/Foundation.h>
#define IKRESULT
@class Result;
typedef id (^mapResultFunction)(id value);
typedef Result * (^flatMapResultFunction)(id value);
typedef void(^resu... |
poparide/IKHTTP | Pods/Headers/Public/IKResults/AsyncResult.h | //
// AsyncResult
//
// Created by <NAME> on 2/06/2015.
// Copyright (c) 2015 IanKeen. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "Result.h"
#define IKASYNCRESULT
@class AsyncResult;
typedef AsyncResult * (^flatMapAsyncResultFunction)(id value);
/**
* A promise-like object that represent... |
poparide/IKHTTP | Pods/IKCore/IKCore/NSObject/NSObject+Null.h | //
// NSObject+Null
//
// Created by <NAME> on 2/06/2015.
// Copyright (c) 2015 IanKeen. All rights reserved.
//
#import <Foundation/Foundation.h>
/**
* Determine not only if an object is nil, but also if it is empty
* i.e.:
* NSArray/NSDictionary/NSSet with no items
* NSString with a length of 0
* any N... |
poparide/IKHTTP | Pods/IKEvents/IKEvents/IKEventHandler.h | <reponame>poparide/IKHTTP
//
// IKEventHandler
//
// Created by <NAME> on 2/06/2015.
// Copyright (c) 2015 IanKeen. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "WeakReference.h"
/**
* Simple class to hold information about an event subscriber
*/
@interface IKEventHandler : NSObject
@proper... |
poparide/IKHTTP | Pods/Headers/Public/IKEvents/IKEventHandlerCollection.h | //
// IKEventHandlerCollection
//
// Created by <NAME> on 2/06/2015.
// Copyright (c) 2015 IanKeen. All rights reserved.
//
#import <Foundation/Foundation.h>
typedef void (^eventHandlerEnumerateFunction)(id target, SEL selector, id block);
/**
* Manages a collection of event subscribers
* Takes care of discar... |
smarpl/bitlash | src/eeprom.c | <reponame>smarpl/bitlash
/***
eeprom.c: minimal eeprom interface
The author can be reached at: <EMAIL>
Copyright (C) 2008-2012 <NAME>
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software withou... |
smarpl/bitlash | src/bitlash-interpreter.c | /***
bitlash-interpreter.c
Bitlash is a tiny language interpreter that provides a serial port shell environment
for bit banging and hardware hacking.
See the file README for documentation.
Bitlash lives at: http://bitlash.net
The author can be reached at: <EMAIL>
Copyright (C) 2008-2013 <NAME>
Permission i... |
smarpl/bitlash | src/bitlash-api.c | /***
bitlash-api.c
Bitlash is a tiny language interpreter that provides a serial port shell environment
for bit banging and hardware hacking.
See the file README for documentation. Or just upload this file as a sketch and play.
Bitlash lives at: http://bitlash.net
The author can be reached at: <EMAIL... |
ana-pat/All_Program_helper | C/segmented_Sieve.c | //segmentedsieve
#include <stdio.h>
#include <stdbool.h>
#include <string.h>
#include <math.h>
int main()
{
int x;
scanf("%d", &x);
for (int y = 0; y < x; y++)
{
int n, high, low;
scanf("%d %d", &low, &high);
n = sqrt(high);
int temp[n];
bool prime[n + 1];
... |
ana-pat/All_Program_helper | C/bubble_Sort_iterative.c | #include <stdio.h>
void swap(int *x, int *y)
{
int temp;
temp = *x;
*x = *y;
*y = temp;
}
int main()
{
int i, n = 0;
printf("Number of elements: ");
scanf("%d", &n);
int A[n];
for (i = 0; i < n; i++)
{
scanf("%d", &A[i]);
}
i--;
while (i > 0)
{
for... |
ana-pat/All_Program_helper | C/modification.c | #include<stdio.h>
struct student
{
int rollno;
int sub1;
int sub2;
};
int main ()
{
FILE *ab;
struct student x;
int ch;
printf("Enter your choice:\n 1.Create File \n 2.See List\n 3.Add new record\n ");
scanf("%d",&ch);
switch(ch)
{
case 1 : ab=fopen("stu.d... |
ana-pat/All_Program_helper | C/radixSort.c | <reponame>ana-pat/All_Program_helper<gh_stars>10-100
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
#include <stdbool.h>
typedef struct Node
{
long long int token;
struct Node *next;
} Node;
void enqueue(Node *p, long long int x)
{
Node *temp = (Node *)malloc(sizeof(Node));
... |
ana-pat/All_Program_helper | C/selectionSort.c | /*
Author : <NAME>
Date : 08/10/2021
Description : Selection sort algorithm in c
*/
/*
Consider N = number of elements in the input array
Time Complexity : O(N^2)
Space Complexity : O(N)
*/
#include <stdio.h>
// Funtion for selection sort
void selection(int arr[], int n) {
int i, j, small;
for (i... |
ana-pat/All_Program_helper | C/Insertion_sort.c | <reponame>ana-pat/All_Program_helper
#include<stdio.h>
#define max 50
void InsertionSort(int arr[],int n){
int i,j,key;
for(j=2;j<=n;j++){
key=arr[j];
i=j-1;
while(i>0 && arr[i]>key)
{
arr[i+1]=arr[i];
i=i-1;
}
arr[i+1]=key;
}
}
int main(){
int arr[max],i,n;
printf("Enter the no. of elem... |
ana-pat/All_Program_helper | C/leapyear.c | #include <stdio.h>
int main() {
int year;
printf("Enter a year: ");
scanf("%d", &year);
if (year % 400 == 0) {
printf("%d is a leap year.", year);
}
else if (year % 100 == 0) {
printf("%d is not a leap year.", year);
}
else if (year % 4 == 0) {
printf("%d is a leap year.", ... |
ana-pat/All_Program_helper | C/N_Queens.c | #include<stdio.h>
#include<stdlib.h>
#include<math.h>
int chess_board[20], count;
int display(int);
void queen_function(int, int);
int placeholder(int, int);
void queen_function(int row_value, int limit) {
int column_value;
for(column_value = 1; column_value <= limit; column_value++) {
if(placeh... |
jeoe12/iPadPokerGameClient | PokerGameClient/Managers/GameSettingsManager.h | <filename>PokerGameClient/Managers/GameSettingsManager.h
//
// GameSettingsManager.h
// PokerGameClient
//
// Copyright (c) 2013 jacobhyphenated. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface GameSettingsManager : NSObject
+(NSString*)getServerURL;
+(void)saveServerUrl:(NSString*)serverURL;... |
jeoe12/iPadPokerGameClient | PokerGameClient/AppDelegate.h | //
// AppDelegate.h
// PokerGameClient
//
// Copyright (c) 2013 jacobhyphenated. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "PokerGameViewController.h"
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@property (strong, nonatomic) PokerGameV... |
jeoe12/iPadPokerGameClient | PokerGameClient/ViewControllers/CreateGameViewController.h | //
// CreateGameViewController.h
// PokerGameClient
//
// Copyright (c) 2013 jacobhyphenated. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface CreateGameViewController : UIViewController <UITableViewDataSource, UITableViewDelegate>
@property (weak, nonatomic) IBOutlet UITextField *gameNameField;
@proper... |
jeoe12/iPadPokerGameClient | PokerGameClient/ViewControllers/PokerGameViewController.h | <reponame>jeoe12/iPadPokerGameClient
//
// PokerGameViewController.h
// PokerGameClient
//
// Copyright (c) 2013 jacobhyphenated. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface PokerGameViewController : UIViewController <UIAlertViewDelegate, UITableViewDataSource, UITableViewDelegate>
@property (weak,... |
jeoe12/iPadPokerGameClient | PokerGameClient/ViewControllers/ServerSelectionViewController.h | <filename>PokerGameClient/ViewControllers/ServerSelectionViewController.h
//
// ServerSelectionViewController.h
// PokerGameClient
//
// Copyright (c) 2013 jacobhyphenated. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface ServerSelectionViewController : UIViewController
@property (weak, nonatomic) IBOut... |
jeoe12/iPadPokerGameClient | PokerGameClient/Managers/CardImageManager.h | //
// CardImageManager.h
// PokerGameClient
//
// Copyright (c) 2013 jacobhyphenated. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface CardImageManager : NSObject
+(NSString *)imageIdentifierFromKey:(NSString *)imageKey;
@end
|
jeoe12/iPadPokerGameClient | PokerGameClientTests/PokerGameClientTests.h | <filename>PokerGameClientTests/PokerGameClientTests.h<gh_stars>1-10
//
// PokerGameClientTests.h
// PokerGameClientTests
//
// Copyright (c) 2013 jacobhyphenated. All rights reserved.
//
#import <SenTestingKit/SenTestingKit.h>
@interface PokerGameClientTests : SenTestCase
@end
|
kv13/Parallel-And-Distributed-Systems | assignment4/inc/bmm.h | <gh_stars>0
#ifndef BMM_H
#define BMM_H
// ******* struct definitions *******
typedef struct
{
int *coo_I, *coo_J;
int N; // number of rows
int M; // number of columns
int max_nz; // max number of non zero elements
int cur_nz; // current number of non zero elements
}coo_format;
// to do... |
kv13/Parallel-And-Distributed-Systems | assignment2/inc/vptring.h | #ifndef VPTRING_H
#define VPTRING_H
#define MAX_POINTS 100000
typedef struct{
int *leaf_counter;
int *tree_counter;
int *indexes;
double *tag;
double *coords;
double *mu;
double *mu_points;
double step;
}tree_struct;
//function to initalize variables for the tree struct
tree_struct create_tree(do... |
kv13/Parallel-And-Distributed-Systems | assignment3/code/nlm_sequencial.c | /**************************************************************
* Implementation of non local means using only cpu,
* to prove the correctness of the algorithm
* and to compare timings.
* The algorithm follows the matlab code was given.
**************************************************************/
#include <stdio.h... |
kv13/Parallel-And-Distributed-Systems | assignment4/inc/utils.h | <reponame>kv13/Parallel-And-Distributed-Systems
#ifndef UTILS_H
#define UTILS_H
// ******* struct definitions *******
// struct to read coo matrices from maret matrix
typedef struct
{
int *coo_I, *coo_J;
int N; // number of rows
int M; // number of columns
int nz; // number of non zero elements
} ... |
kv13/Parallel-And-Distributed-Systems | assignment2/src/v1_mpi2.c | /***********************************
V1 IMPLEMENTATION USING RANDOM POINTS
************************************/
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <time.h>
#include <cblas.h>
#include <string.h>
#include <mpi.h>
#include "../inc/knnring.h"
int main(int argc, char *argv[]){
int p_ran... |
kv13/Parallel-And-Distributed-Systems | assignment1/src/V3_pthread.c | <gh_stars>0
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <pthread.h>
#include <math.h>
#include <time.h>
#include "../lib/mmio.h"
#include "../lib/triangles_library.h"
#define NUM_THREADS 15
pthread_mutex_t mut;
typedef struct{
uint32_t t_id;
uint32_t l_bound, u_bound;
uint32_t workload;
... |
kv13/Parallel-And-Distributed-Systems | assignment4/inc/parallel_bmm.h | #ifndef PARALLEL_BMM_H
#define PARALLEL_BMM_H
// ******* functions declaration *******
// ******* blocked bmm functions
void blocked_bmm_shared(coo_format *C, blocked_csr *blk_A, csr_format *AA, blocked_csc *blk_B, csc_format *BB);
// ******* filtered blocked bmm functions
void blocked_bmm_filtered_shared(coo_forma... |
kv13/Parallel-And-Distributed-Systems | assignment4/src/blocking.c | #include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <time.h>
#include "../inc/utils.h"
#include "../inc/blocking.h"
void blocked_csr_init(blocked_csr *blk_A, csr_format *csr_A, int b){
blk_A->nz = csr_A->nz;
blk_A->N = csr_A->N;
blk_A->M = csr_A->M;
blk_A->b ... |
kv13/Parallel-And-Distributed-Systems | assignment2/src/readlib.c | //%%%%% dumb read datasets functions
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "../inc/readlib.h"
double *read_1(char *file_path, int *n, int *d){
if(strstr(file_path,"ColorH")!=NULL){
*n=68040;
*d=32;
}else if(strstr(file_path,"ColorM")!=NULL){
*n = 68040;
*d = 9;
}else{... |
kv13/Parallel-And-Distributed-Systems | assignment1/lib/triangles_library.c | #include "triangles_library.h"
//function to transform coo format to csc format
void coo2csc(
uint32_t * const row, /*!< CSC row start indices */
uint32_t * const col, /*!< CSC column indices */
uint32_t const * const row_coo, /*!< COO row indices */
uint32_t const * const col_coo, ... |
kv13/Parallel-And-Distributed-Systems | assignment2/inc/readlib.h | <filename>assignment2/inc/readlib.h
#ifndef READLIB_H
#define READLIB_H
//read 1st dataset
double *read_1(char *file_path, int *n, int *d);
//read 2nd dataset
double *read_2(char *file_path, int *n, int *d);
//read 3rd dataset
double *read_3(char *file_path, int *n, int *d);
//read 4th dataset
double *read_4(char ... |
kv13/Parallel-And-Distributed-Systems | assignment4/bmm_sequential.c | /* This implementation is based on the simplest algorithm */
/* for matrices multiplication with out any improvements. */
/* It's used only as benchmarck and result testing */
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <time.h>
#include "inc/mmio.h"
#include "inc/utils.h"
#include "inc... |
kv13/Parallel-And-Distributed-Systems | assignment4/inc/blocking.h | <reponame>kv13/Parallel-And-Distributed-Systems<filename>assignment4/inc/blocking.h<gh_stars>0
#ifndef BLOCKING_H
#define BLOCKING_H
// ******* struct definitions *******
typedef struct{
uint32_t *blk_nz;
uint32_t *blk_ids;
uint32_t *csc_col;
uint32_t *csc_row;
uint32_t nz, nzb;
uint32_t N, M,... |
kv13/Parallel-And-Distributed-Systems | assignment2/src/knnring_mpi.c | #include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <time.h>
#include <cblas.h>
#include <string.h>
#include <mpi.h>
#include "../inc/knnring.h"
knnresult kNN(double *X, double *Y, int n, int m, int d, int k){
knnresult k_nearest;
//initalize the result's variable
k_nearest.nidx = (int *)malloc(m... |
kv13/Parallel-And-Distributed-Systems | assignment2/src/knnring_sequential.c | #include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <time.h>
#include <cblas.h>
#include <string.h>
#include "../inc/knnring.h"
knnresult kNN(double *X, double *Y, int n, int m, int d, int k){
knnresult k_nearest;
//initalize the result's variable
k_nearest.nidx = (int *)malloc(m*k*sizeof(int));
... |
kv13/Parallel-And-Distributed-Systems | assignment4/src/utils.c | <gh_stars>0
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include "../inc/mmio.h"
#include "../inc/utils.h"
// initialize csr matrices
void csr_init(csr_format *mtx1, market_matrix *mtx2){
mtx1->csr_col = (uint32_t *)malloc(sizeof(uint32_t)*mtx2->nz);
mtx1->csr_row = (uint32_t *)malloc(size... |
kv13/Parallel-And-Distributed-Systems | assignment4/blocked_bmm_distmem.c | /* This implementation is based on blocked matrix multiplication */
/* It provide two interfaces. One for boolean matrix multiplication */
/* and one for filtered boolean matrix multiplication. Also to speed */
/* up the processes openmpi for distributed memory parallelization is used */
... |
kv13/Parallel-And-Distributed-Systems | assignment2/src/vptree_ring.c | <reponame>kv13/Parallel-And-Distributed-Systems
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <string.h>
#include <math.h>
#include <mpi.h>
#include "../inc/knnring.h"
#include "../inc/vptring.h"
tree_struct create_tree(double *X, int *nidx,int n, int d, int B){
//variables mu_points,step,tag,... |
kv13/Parallel-And-Distributed-Systems | assignment1/src/HADAMARD_seq.c | <reponame>kv13/Parallel-And-Distributed-Systems
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <stdint.h>
#include "../lib/triangles_library.h"
#include "../lib/mmio.h"
int main(int argc, char *argv[])
{
//#################Read the sparse matrix from file.#################
int ret_code;
... |
kv13/Parallel-And-Distributed-Systems | assignment4/blocked_bmm_sequential.c | <filename>assignment4/blocked_bmm_sequential.c<gh_stars>0
/* This implementation is based on blocked matrix multiplication */
/* It provide two interfaces. One for boolean matrix multiplication */
/* and one for filtered boolean matrix multiplication */
#include <stdio.h>
#include <stdlib.h>
#include ... |
kv13/Parallel-And-Distributed-Systems | assignment4/src/bmm.c | <filename>assignment4/src/bmm.c
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <time.h>
#include "../inc/utils.h"
#include "../inc/blocking.h"
#include "../inc/bmm.h"
void coo_init(coo_format *C, blocked_csr *A, blocked_csc *B){
C->cur_nz = 0;
C->N = A->N;
C->M = B->M;
... |
kv13/Parallel-And-Distributed-Systems | assignment4/src/parallel_bmm.c | #include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <omp.h>
#include <time.h>
#include "../inc/utils.h"
#include "../inc/blocking.h"
#include "../inc/bmm.h"
#include "../inc/parallel_bmm.h"
void blocked_bmm_shared(coo_format *C, blocked_csr *blk_A, csr_format *AA, blocked_csc *blk_B, csc_format *BB){
... |
kv13/Parallel-And-Distributed-Systems | assignment1/lib/triangles_library.h | #ifndef TRIANGLES_H_INCLUDED
#define TRIANGLES_H_INCLUDED
//gather all functions are necessary for
//counting number of triangles.
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
//coo2csc from github.
void coo2csc(
uint32_t * const row, /*!< CSC row start indices */
uint32_t * const ... |
kv13/Parallel-And-Distributed-Systems | assignment2/src/v2_mpi2_2.c | /***********************************
V2 IMPLEMENTATION USING DATASETS
************************************/
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <time.h>
#include <cblas.h>
#include <string.h>
#include <mpi.h>
#include "../inc/knnring.h"
#include "../inc/readlib.h"
#include "../inc/vptring... |
kv13/Parallel-And-Distributed-Systems | assignment2/inc/knnring.h | #ifndef KNNLRING_H
#define KNNLRING_H
//STRUCT DEFINITION
typedef struct{
int *nidx; //!< Indices (0-based) of nearest neighbors [m-by-k]
double *ndist; //!< Distance of nearest neighbors [m-by-k]
int m; //!< Number of query points [scalar]
int k... |
kv13/Parallel-And-Distributed-Systems | assignment1/src/V3_openmp.c | #include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <pthread.h>
#include <omp.h>
#include <time.h>
#include "../lib/mmio.h"
#include "../lib/triangles_library.h"
//V3 ALGORITHM USING OPENMP
void V3_algorithm_openmp(uint32_t *csc_col,uint32_t *csc_row, uint32_t *c3, int n);
int main(int argc, char *... |
VoidmatrixHeathcliff/LuaJsonLib | src/LuaJsonLib.h | #ifndef _LUAJSONLIB_H_
#include "cJSON.h"
#include <lua.hpp>
#include <string>
#include <fstream>
#include <sstream>
using namespace std;
#define LIB_API extern "C" int
bool CheckArrary(lua_State* L, int iIndex);
void LuaTable2CJson(cJSON*& pJsonNode, int iIndex, lua_State* L);
void CJson2LuaObj(cJSON* pJsonNode... |
alexdauph/IPS-100 | source/lpc1769/inc/registers/clock.h | #ifndef CLOCK_H_
#define CLOCK_H_
/* Set power clock in PCONP & PCLK_SELn*/
static uint32_t volatile * const PtrCCLKCFG = (unsigned long *) 0x400FC104;
static uint32_t volatile * const PtrPCONP = (unsigned long *) 0x400FC0C4;
static uint32_t volatile * const PtrPCLKSEL0 = (uint32_t *) 0x400FC1A8;
static uint32_t vola... |
alexdauph/IPS-100 | exerciseur/Menu.h | #pragma once
#include <iostream>
#include "TB8.h"
using namespace std;
#define MENU_MAIN Menu::menus[0]
#define MENU_GPIO Menu::menus[1]
#define MENU_MEMORY Menu::menus[2]
#define MENU_UART Menu::menus[3]
#define MENU_RS232 Menu::menus[4]
#define MENU_MOTOROLA Menu::menus[5]
#define MENU_DEBUG Men... |
alexdauph/IPS-100 | source/lpc1769/inc/registers/interrupt.h | #ifndef INTERRUPT_H_
#define INTERRUPT_H_
#include "stdint.h"
static uint32_t volatile * const PtrISER0 = (uint32_t *) 0xE000E100;
static uint32_t volatile * const PtrISER1 = (uint32_t *) 0xE000E104;
static uint32_t volatile * const PtrICER0 = (uint32_t *) 0xE000E180;
static uint32_t volatile * const PtrICER1 = (ui... |
alexdauph/IPS-100 | source/lpc1769/inc/codes.h | #ifndef CODES_H_
#define CODES_H_
#define RQST_COUNT (sizeof(requests)/sizeof(requests[0]))
#define ACTION_COUNT (sizeof(operations)/sizeof(operations[0]))
#define COM_OK 0x00
#define COM_ERROR 0x01
#define COM_FAIL 0x02
#define LPC_RQST 0x10
#define LPC_PING 0x11
#define LPC_READY 0x11
#defi... |
alexdauph/IPS-100 | source/lpc1769/inc/registers/GPIO.h | #ifndef GPIO_H_
#define GPIO_H_
#include "stdint.h"
static uint32_t volatile * const PtrFIO0DIR = (uint32_t *) 0x2009C000;
static uint8_t volatile * const PtrFIO0DIR0 = (uint8_t *) 0x2009C000;
static uint8_t volatile * const PtrFIO0DIR1 = (uint8_t *) 0x2009C001;
static uint8_t volatile * const PtrFIO0DIR2 = (uint8... |
alexdauph/IPS-100 | source/lpc1769/inc/registers/timers.h | <filename>source/lpc1769/inc/registers/timers.h
#ifndef TIMERS_H_
#define TIMERS_H_
#include "stdint.h"
static uint32_t volatile * const PtrT0IR = (uint32_t *) 0x40004000;
static uint32_t volatile * const PtrT0TCR = (uint32_t *) 0x40004004;
static uint32_t volatile * const PtrT0TC = (uint32_t *) 0x40094008;
static ... |
alexdauph/IPS-100 | source/lpc1769/inc/registers/DMA.h | <reponame>alexdauph/IPS-100
#ifndef DMA_H_
#define DMA_H_
#include "stdint.h"
static uint32_t volatile * const PtrDMACIntStat = (uint32_t *) 0x50004000;
static uint32_t volatile * const PtrDMACIntTCStat = (uint32_t *) 0x50004004;
static uint32_t volatile * const PtrDMACIntTCClear = (uint32_t *) 0x50004008;
static u... |
alexdauph/IPS-100 | source/lpc1769/inc/vcom.h | #ifndef VCOM_H_
#define VCOM_H_
#include "stdint.h"
#ifdef __cplusplus
extern "C" {
#endif
void WFD(void);
extern void UART1_IRQHandler(void);
extern void UART3_IRQHandler(void);
extern uint32_t vcom_write (uint8_t *pBuf, uint32_t buf_len);
extern uint32_t vcom_bread(uint8_t *pBuf, uint32_t buf_len);
extern uint3... |
alexdauph/IPS-100 | exerciseur/TB8.h | #pragma once
#include <iostream>
#include <sstream>
using namespace std;
#define BASE_DEC 10
#define BASE_HEX 16
#define IS_CARACTER(key) key > 0x1F && key < 0x7F
struct MenuData_t;
class Menu;
class Window;
class TB8 {
private:
public:
Menu* currentMenu;
MenuData_t* currentMenuData_t;
private:
void Buil... |
alexdauph/IPS-100 | source/lpc1769/inc/registers/I2C.h | <filename>source/lpc1769/inc/registers/I2C.h
#ifndef I2C_H_
#define I2C_H_
static unsigned long volatile * const PtrI2C0CONSET = (unsigned long *) 0x4001C000;
static unsigned long volatile * const PtrI2C0STAT = (unsigned long *) 0x4001C004;
static unsigned long volatile * const PtrI2C0DAT = (unsigned long *) 0x4001C0... |
alexdauph/IPS-100 | exerciseur/Window.h | <filename>exerciseur/Window.h
#pragma once
#include <iostream>
#include <vector>
#include <Windows.h>
using namespace std;
#define WINDOW_STD Window::windows[0]
#define WINDOW_NONE Window::windows[1]
class TB8;
enum LogType;
struct WindowData_t;
extern const COORD COORD_TITLE;
extern const COORD COORD_DEBUG_L... |
alexdauph/IPS-100 | source/visual studio/Console.h | #pragma once
#include <iostream>
#include <Windows.h>
using namespace std;
#define GREY_ON_BLACK 0x08
#define WHITE_ON_BLACK 0x0F
#define BLACK_ON_GREY 0x80
#define BLACK_ON_WHITE 0xF0
#define YELLOW_ON_BLACK 0x0E
#define GREEN_ON_BLACK 0x0A
#define RED_ON_BLACK 0x0C
#define BLACK_ON_YELLOW 0x60
#defi... |
alexdauph/IPS-100 | source/lpc1769/inc/registers/UART.h | #ifndef UART_H_
#define UART_H_
/* UART0*/
static unsigned long volatile * const PtrUART0_RBR = (unsigned long *) 0x4000C000;
static unsigned long volatile * const PtrUART0_THR = (unsigned long *) 0x4000C000;
static unsigned long volatile * const PtrUART0_DLL = (unsigned long *) 0x4000C000;
static unsigned long volat... |
alexdauph/IPS-100 | source/visual studio/SerialPort.h | <gh_stars>0
#pragma once
#include <iostream>
#include <windows.h>
using namespace std;
#define Ouvrir Open
#define Fermer Close
#define Lire Read
#define Ecrire Write
#define VerifierDonnees CheckData
class SerialPort
{
public:
private:
HANDLE hComDev;
BOOL opened;
uint16_t mPort;
uint16_t mBaud;
... |
alexdauph/IPS-100 | source/lpc1769/inc/registers/macros.h | <gh_stars>0
#ifndef INC_macro_H_
#define INC_macro_H_
#include "timers.h"
#define SB(v,n) v |= ( 1 << n ) //SetBit
#define CB(v,n) v &= ~( 1 << n) //ClearBit
#define TB(v,n) v ^= (1 << n) //ToggleBit
#define IB(v,n,x) v = ((v & (~(1 << n))) | ... |
alexdauph/IPS-100 | source/lpc1769/inc/registers/pinFunctions.h | <reponame>alexdauph/IPS-100
#ifndef PINSFUNCTIONS_H_
#define PINSFUNCTIONS_H_
#include "stdint.h"
/* PIN function on GPIO */
static uint32_t volatile * const PtrPINSEL0 = (uint32_t *) 0x4002C000;
static uint32_t volatile * const PtrPINSEL1 = (uint32_t *) 0x4002C004;
static uint32_t volatile * const PtrPINSEL2 = (ui... |
wampirat/FamilyTree | FamilyTree2.0/FamilyTreeQtGui/mainwindow.h | #pragma once
#include <QMainWindow>
#include <QXmlStreamWriter>
#include <QCompleter>
#include <QSortFilterProxyModel>
#include <QStringListModel>
#include <memory>
#include "dialogaddfamily.h"
#include "dialogaddperson.h"
class FamilyTreeFramework;
namespace Ui {
class MainWindow;
}
class MainWind... |
wampirat/FamilyTree | FamilyTree2.0/FamilyTreeQtGui/dialogaddfamily.h | <gh_stars>0
#ifndef DIALOGADDFAMILY_H
#define DIALOGADDFAMILY_H
#include <QDialog>
#include <QListWidgetItem>
#include <QCompleter>
#include <vector>
#include <memory>
#include "Family.h"
#include "FamilyTreeFramework.hpp"
#include "dialogaddperson.h"
class SocialPerson;
namespace Ui {
class DialogAdd... |
wampirat/FamilyTree | FamilyTree2.0/FamilyTreeQtGui/treeview.h | <reponame>wampirat/FamilyTree
#pragma once
#include <QDialog>
#include <memory>
#include "FamilyTreeFramework.hpp"
#include <QPainter>
#include "FamilyTreePainterPathsPreparator.hpp"
namespace Ui {
class TreeView;
}
class TreeView : public QDialog
{
Q_OBJECT
public:
explicit TreeView(QWid... |
wampirat/FamilyTree | FamilyTree2.0/FamilyTreeQtGui/dialogaddperson.h | <reponame>wampirat/FamilyTree<filename>FamilyTree2.0/FamilyTreeQtGui/dialogaddperson.h
#ifndef DIALOGADDPERSON_H
#define DIALOGADDPERSON_H
#include <QDialog>
#include "Person.hpp"
class SocialPerson;
namespace Ui {
class DialogAddPerson;
}
class DialogAddPerson : public QDialog
{
Q_OBJECT
publi... |
wampirat/FamilyTree | FamilyTree2.0/FamilyTreeEngine/Family.h | #pragma once
#include <vector>
#include <memory>
#include <iostream>
class SocialPerson;
class Person;
using People = std::vector<std::shared_ptr<SocialPerson>>;
class Family
{
public:
Family() = default;
Family(const std::shared_ptr<Family> &);
void addPartner(const std::shared_ptr<So... |
elucideye/aglet | lib/aglet/aglet.h | <filename>lib/aglet/aglet.h
/*!
@file aglet.h
@author <NAME> (C++ implementation)
@brief Declaration of aglet namespace.
\copyright Copyright 2017 Elucideye, Inc. All rights reserved.
\license{This project is released under the 3 Clause BSD License.}
*/
#ifndef __aglet_aglet_h__
#define __aglet_aglet_h_... |
elucideye/aglet | lib/aglet/GLContext.h | /*!
@file GLContext.h
@author <NAME>
@brief Declaration of a cross platform offscreen OpenGL context.
\copyright Copyright 2017 Elucideye, Inc. All rights reserved.
\license{This project is released under the 3 Clause BSD License.}
*/
#ifndef __aglet_GLContext_h__
#define __aglet_GLContext_h__
#include... |
elucideye/aglet | lib/aglet/EGLContext.h | /*!
@file EGLContext
@author <NAME>
@brief Declaration of minimal "hidden" OpenGL context for Android.
\copyright Copyright 2017 Elucideye, Inc. All rights reserved.
*/
#ifndef __aglet_EGLContext_h__
#define __aglet_EGLContext_h__
#include "aglet/GLContext.h"
#include <EGL/egl.h>
AGLET_BEGIN
// NOTE: ... |
elucideye/aglet | lib/aglet/GLFWContext.h | /*!
@file GLFWContext.h
@author <NAME>
@brief Declaration of minimal "hidden" GLFW based OpenGL context.
\copyright Copyright 2017 Elucideye, Inc. All rights reserved.
*/
#ifndef __aglet_GLFWContext_h__
#define __aglet_GLFWContext_h__
#include "aglet/GLContext.h"
// clang-format off
#if defined(_WIN32) ... |
elucideye/aglet | lib/aglet/GLContextIOS.h | /*!
@file GLContextIOS
@author <NAME>
@brief Declaration of minimal "hidden" OpenGL context for IOS.
\copyright Copyright 2017 Elucideye, Inc. All rights reserved.
*/
#ifndef __aglet_GLContextIOS_h__
#define __aglet_GLContextIOS_h__
#include "aglet/GLContext.h"
#include <memory>
AGLET_BEGIN
class GLCo... |
elucideye/aglet | lib/aglet/gl_includes.h | <reponame>elucideye/aglet
/*!
@file gl_includes.h
@author <NAME> (C++ implementation)
@brief Declaration of aglet namespace.
\copyright Copyright 2017 Elucideye, Inc. All rights reserved.
\license{This project is released under the 3 Clause BSD License.}
*/
#ifndef __aglet_gl_includes_h__
#define __agle... |
seyhajin/corona | platform/linux/src/Rtt_LinuxIPCServer.h | #ifndef LINUX_IPC_SERVER_H
#define LINUX_IPC_SERVER_H
#include <wx/ipc.h>
// the default service name
#define IPC_SERVICE "/tmp/solar2d_logconsole"
// the hostname
#define IPC_HOST "localhost"
// the IPC topic
#define IPC_TOPIC "IPC Solar2D"
// the name of the item we're being advised about
#define IPC_ADVISE_NAME "I... |
seyhajin/corona | platform/linux/src/Rtt_LinuxApp.h | //////////////////////////////////////////////////////////////////////////////
//
// This file is part of the Corona game engine.
// For overview and more information on licensing please refer to README.md
// Home page: https://github.com/coronalabs/corona
// Contact: <EMAIL>
//
////////////////////////////////////////... |
seyhajin/corona | platform/linux/src/Rtt_LinuxConsoleApp.h | <filename>platform/linux/src/Rtt_LinuxConsoleApp.h<gh_stars>1000+
#ifndef LINUX_CONSOLE_APP_H
#define LINUX_CONSOLE_APP_H
#include <wx/app.h>
#include "Rtt_LinuxConsole.h"
class Rtt_LinuxConsoleApp: public wxApp
{
public:
enum MessageType {Normal, Warning, Error};
Rtt_LinuxConsole *Solar2DConsole;
bool OnInit();
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.