Skip to content

Instantly share code, notes, and snippets.

View 9prady9's full-sized avatar
🏠
Working from home

Pradeep Garigipati 9prady9

🏠
Working from home
View GitHub Profile
@9prady9
9prady9 / compile.sh
Last active July 7, 2020 03:35
bash script and simple c++ program that tests results of bare mkl, Eigen with mkl and ArrayFire
set -x
export ITOOLS_ROOT=/opt/intel
export MKLROOT=${ITOOLS_ROOT}/mkl
export AF_PATH=/home/pradeep/gitroot/ArrayFireWorkspace/worktrees/v3.7/build/pkg
mkl_options="-lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -ldl"
@9prady9
9prady9 / TemplateArgs.cpp
Created May 17, 2020 09:49
Convert type and non-type template arguments to a vector of strings
#include <type_traits>
#include <vector>
#include <string>
#include <algorithm>
#include <iostream>
#include <iterator>
typedef enum {
ADD = 0,
#include "itkFFTConvolutionImageFilter.h"
#include "itkImageFileReader.h"
#include "itkImageFileWriter.h"
#include "itkTikhonovDeconvolutionImageFilter.h"
#include "itkRescaleIntensityImageFilter.h"
#include "itkMacro.h"
#include "itkMath.h"
int main(int argc, char* argv[])
{
#include "itkImageFileReader.h"
#include "itkImageFileWriter.h"
#include "itkCurvatureAnisotropicDiffusionImageFilter.h"
#include "itkRescaleIntensityImageFilter.h"
int main( int argc, char* argv[] )
{
if( argc != 6 )
{
std::cerr << "Usage: "<< std::endl;
#include "itkFFTConvolutionImageFilter.h"
#include "itkImageFileReader.h"
#include "itkImageFileWriter.h"
#include "itkRichardsonLucyDeconvolutionImageFilter.h"
#include "itkRescaleIntensityImageFilter.h"
#include "itkMacro.h"
#include "itkMath.h"
int main(int argc, char* argv[])
{
#include "itkImageFileReader.h"
#include "itkImageFileWriter.h"
#include "itkGPUGradientAnisotropicDiffusionImageFilter.h"
#include "itkRescaleIntensityImageFilter.h"
#include "itkTimeProbe.h"
#include <time.h>
#include <stdio.h>
int main( int argc, char* argv[] )
@9prady9
9prady9 / itkLandweberDeconvolution.cxx
Last active July 21, 2017 14:22
Landweber Deconvolution example on grayscale images using ITK
#include "itkFFTConvolutionImageFilter.h"
#include "itkImageFileReader.h"
#include "itkImageFileWriter.h"
#include "itkLandweberDeconvolutionImageFilter.h"
#include "itkCastImageFilter.h"
#include "itkMacro.h"
#include "itkMath.h"
int main(int argc, char* argv[])
{
/* ************************************************************************
* Copyright 2013 Advanced Micro Devices, Inc.
*
* 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.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@9prady9
9prady9 / multigpu-no-threads.cpp
Last active March 8, 2017 13:13
ArrayFire example to split work across multiple GPUs - No threads Used.
/*******************************************************
* Copyright (c) 2017, ArrayFire
* All rights reserved.
*
* This file is distributed under 3-clause BSD license.
* The complete license agreement can be obtained at:
* http://arrayfire.com/licenses/BSD-3-Clause
********************************************************/
#include <arrayfire.h>
@9prady9
9prady9 / multigpu-threaded.cpp
Last active June 26, 2017 10:39
An illustrative example using ArrayFire to split work across multiple GPUs - One thread launched per GPU; Thread safety is available starting v3.5.0
/*******************************************************
* Copyright (c) 2017, ArrayFire
* All rights reserved.
*
* This file is distributed under 3-clause BSD license.
* The complete license agreement can be obtained at:
* http://arrayfire.com/licenses/BSD-3-Clause
********************************************************/
#include <arrayfire.h>